Tech Stack
Description
Karachi-Flavor Catering Solution is a multi-tenant MIS platform designed for business users to manage workspaces through an orgSlug-based portal. The backend provides the API and integrations, while the frontend delivers the admin/organization experience with protected routing and workspace-aware pages.
On the backend (karachi-flavour-mis-backend), the system is built with Node.js, Express, and TypeScript. It loads environment configuration, sets up core middleware (CORS, helmet, JSON parsing, and logging), exposes a `/health` endpoint, and registers REST routes using TSOA (RegisterRoutes + generated Swagger) for consistent API contracts.
A key feature is background processing for payment reminders. Using MongoDB with an Agenda scheduler, the reminder job scans eligible orders, checks for outstanding pending balances, applies configurable “day offset” reminder rules, generates payment links, sends reminder emails, and writes to ReminderLog to prevent duplicate sends.
The platform also supports pluggable file storage via a provider switch (local, S3, or Supabase). In local mode it serves public assets through file-storage routes, while semantic retrieval is supported using MongoDB Atlas vector search (e.g., scrapedContent_vector_index with 3072-d embeddings and cosine similarity for grounded retrieval/search).
On the frontend (karachi-flavour-mis-frontend), Next.js (App Router) powers both marketing pages and protected organization portals such as the orgSlug dashboard. The UI stack includes Tailwind CSS, Redux Toolkit, React Query, React Hook Form, and Zod validation, with a generated TypeScript API client derived from the backend Swagger schema.