chai

bySinan Kazhungil

You are a senior software architect, UI/UX designer, backend engineer, DevOps engineer, and product manager. I want you to build a production-quality SaaS called "ChaiOS". Do not generate demo code or placeholder pages. Everything should be modular, scalable, reusable, and production-ready. ======================================================== PROJECT OVERVIEW ======================================================== Product Name: ChaiOS Tagline: The Operating System for Cafés & Tea Shops. Purpose: ChaiOS is a SaaS platform that helps cafés, tea shops, bakeries, and small restaurants manage their business from one dashboard. The software should replace notebooks, Excel sheets, and WhatsApp-based management. The target audience includes: • Tea Shops • Cafés • Coffee Shops • Bakeries • Juice Shops • Small Restaurants The platform should feel modern like: • Shopify • Stripe Dashboard • Linear • Notion • Vercel Dashboard Minimal Fast Premium Professional ======================================================== TECH STACK ======================================================== Frontend React TypeScript Vite Tailwind CSS shadcn/ui React Router Backend Supabase Use Supabase Auth Supabase Database Supabase Storage Supabase Edge Functions where necessary Deployment Vercel ======================================================== DESIGN SYSTEM ======================================================== Design Language Modern SaaS Rounded corners Large spacing Soft shadows Responsive Dark mode ready Use shadcn/ui Lucide Icons Cards Dialogs Dropdowns Tables Badges Skeleton loaders Toast notifications Everything should be reusable. Create: components/ layouts/ hooks/ services/ types/ utils/ ======================================================== AUTHENTICATION ======================================================== Owner Login Email Password Forgot Password Remember Me Protected Routes Logout Session Persistence ======================================================== MULTI TENANT ======================================================== Every café has its own workspace. Each owner only sees: Products Orders Customers Inventory Staff Analytics Settings belonging to their café. Never expose another café's data. ======================================================== DATABASE ======================================================== Design a scalable relational database. Tables should include: profiles cafes employees products categories customers orders order_items inventory ingredients recipes suppliers purchases expenses payments loyalty_transactions coupons notifications audit_logs subscriptions Each table should include UUID primary key created_at updated_at soft delete where appropriate ======================================================== DASHBOARD ======================================================== Dashboard should display Today's Sales Today's Orders Revenue Top Products Recent Orders Pending Orders Inventory Alerts Quick Actions Sales Chart Weekly Revenue Monthly Revenue ======================================================== PRODUCT MANAGEMENT ======================================================== Create full CRUD. Fields Name Description Category Price Image Available Preparation Time Tax SKU Barcode Search Filter Sorting Pagination Bulk Delete Bulk Availability Toggle Image Upload ======================================================== CATEGORY MANAGEMENT ======================================================== CRUD Category Image Category Color Display Order ======================================================== ORDER MANAGEMENT ======================================================== POS Interface Create Order Cart Quantity Modifiers Special Notes Taxes Discounts Coupon Code Kitchen Status Pending Preparing Ready Completed Cancelled Generate Invoice Print Receipt ======================================================== CUSTOMERS ======================================================== Customer Profile Phone Email Birthday Visit Count Lifetime Value Order History Loyalty Points Membership Tier Rewards ======================================================== LOYALTY SYSTEM ======================================================== Points per purchase Redeem rewards QR Code Referral Rewards Coupons Reward Wallet ======================================================== INVENTORY ======================================================== Ingredients Current Stock Minimum Stock Auto Low Stock Alert Suppliers Purchase Orders Recipe Management Ingredient Consumption Stock History ======================================================== STAFF MANAGEMENT ======================================================== Employees Roles Permissions Attendance Salary Shift Timing Performance ======================================================== ANALYTICS ======================================================== Charts Revenue Orders Customers Products Peak Hours Average Order Value Profit Expenses Inventory Usage Export PDF Export Excel ======================================================== EXPENSE TRACKER ======================================================== Rent Salary Electricity Internet Supplies Marketing Maintenance Reports ======================================================== PAYMENTS ======================================================== Support Cash UPI Card Wallet Split Payments Refunds Payment History ======================================================== NOTIFICATIONS ======================================================== Low Stock New Orders Failed Payments Subscription Alerts Announcements ======================================================== SETTINGS ======================================================== Cafe Details Branding Logo GST Invoice Template Tax Working Hours Theme Users Roles Security ======================================================== SUBSCRIPTIONS ======================================================== Plans Free Starter Growth Enterprise Subscription Status Billing History Invoices Stripe Integration ======================================================== SUPER ADMIN PANEL ======================================================== Separate Admin Dashboard View all cafés Revenue Subscriptions Feature Flags Support Tickets User Management Analytics ======================================================== API STRUCTURE ======================================================== Create service files. Example product.service.ts order.service.ts customer.service.ts inventory.service.ts Every service should Create Read Update Delete Handle errors Return typed responses ======================================================== PROJECT STRUCTURE ======================================================== Use feature-based architecture. Example src/ modules/ products/ orders/ customers/ inventory/ analytics/ auth/ shared/ components/ hooks/ services/ types/ utils/ ======================================================== CODING STANDARDS ======================================================== Use TypeScript everywhere. No any. Strict typing. Reusable hooks. Reusable dialogs. Reusable forms. Reusable tables. Reusable pagination. Reusable search. Reusable filters. Use React best practices. No duplicated code. ======================================================== PERFORMANCE ======================================================== Lazy loading Code splitting Optimized queries Optimized images Pagination Virtualized tables if needed ======================================================== SECURITY ======================================================== Protected Routes Supabase RLS Input Validation Rate Limiting Environment Variables Sanitize Inputs ======================================================== UI REQUIREMENTS ======================================================== Premium dashboard. Smooth animations. Loading skeletons. Empty states. Meaningful error messages. Success toasts. Responsive mobile layout. Beautiful tables. Professional forms. ======================================================== OUTPUT REQUIREMENTS ======================================================== Do NOT generate everything in one huge response. Instead: 1. Create the folder structure. 2. Generate the database schema. 3. Configure Supabase. 4. Build authentication. 5. Build layouts. 6. Build dashboard. 7. Build Products module completely. 8. Build Categories. 9. Build Orders. 10. Build Customers. 11. Build Inventory. 12. Build Analytics. 13. Build Settings. 14. Build Subscription. 15. Refactor. 16. Testing. 17. Documentation. After each milestone, verify the project builds successfully before continuing. Always write production-quality code.

LandingCategoriesLoginInventory
Landing

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 5

ChaiOS System Requirements Document

Introduction

ChaiOS is a production-quality SaaS platform designed to streamline operations for cafés, tea shops, bakeries, and small restaurants. The platform aims to replace traditional management tools like notebooks, Excel sheets, and WhatsApp-based systems with a modern, integrated dashboard. The target audience includes tea shops, cafés, coffee shops, bakeries, juice shops, and small restaurants.

System Overview

ChaiOS provides a comprehensive suite of tools for managing various aspects of a café or tea shop, including product management, order processing, customer relationship management, inventory tracking, staff management, analytics, and more. The platform is designed to be minimal, fast, premium, and professional, drawing inspiration from modern SaaS platforms like Shopify, Stripe Dashboard, Linear, Notion, and Vercel Dashboard.

Source Content Inventory

  • Tech Stack: React, TypeScript, Vite, Tailwind CSS, shadcn/ui, React Router, Supabase, Vercel
  • Design System: Modern SaaS with rounded corners, large spacing, soft shadows, responsive design, and dark mode readiness
  • Database Tables: Profiles, Cafes, Employees, Products, Categories, Customers, Orders, Order Items, Inventory, Ingredients, Recipes, Suppliers, Purchases, Expenses, Payments, Loyalty Transactions, Coupons, Notifications, Audit Logs, Subscriptions
Page 2 of 5

Functional Requirements as Story Points

  • As a café owner, I should be able to log in using email and password to access my dashboard.
  • As a café owner, I should be able to manage products with full CRUD operations.
  • As a café owner, I should be able to view and manage orders through a POS interface.
  • As a café owner, I should be able to track customer profiles and their order history.
  • As a café owner, I should be able to manage inventory with alerts for low stock.
  • As a café owner, I should be able to manage staff roles, permissions, and attendance.
  • As a café owner, I should be able to view analytics on revenue, orders, and customer behavior.
  • As a café owner, I should be able to track expenses and generate reports.
  • As a café owner, I should be able to manage payment methods and view payment history.
  • As a café owner, I should be able to configure café settings, branding, and theme.
  • As a super admin, I should be able to view all cafés and manage subscriptions and user support.

User Personas

  • Café Owner: Manages the daily operations of the café, including products, orders, customers, and staff.
  • Super Admin: Oversees all cafés on the platform, manages subscriptions, and handles support tickets.

Core User Flows

  • Café Owner logs in -> views dashboard -> manages products/orders/customers -> updates inventory -> views analytics
  • Super Admin logs in -> views all cafés -> manages subscriptions -> handles support tickets
Page 3 of 5

Visuals Colors and Theme

  • primary: #FF5722 (ChaiOS brand color)
  • primary_light: #FF8A50 (lighter tint for hover states)
  • secondary: #FFC107 (supporting color for highlights)
  • accent: #4CAF50 (emphasis color for CTAs)
  • highlight: #FFEB3B (color for notifications and active indicators)
  • bg: #FFFFFF (page background color)
  • surface: #F5F5F5 (card/panel background)
  • text: #212121 (primary text color)
  • text_muted: #757575 (secondary text color)
  • border: #E0E0E0 (subtle border color)

Signature Design Concept

The ChaiOS landing page will feature an interactive "Tea Brewing Journey" animation. As users scroll, they will see a teapot filling with water, tea leaves being added, and the tea brewing. The animation will use motion/react for smooth transitions and will be interactive, allowing users to click on different stages to learn more about the process. The background will subtly change colors to reflect the brewing stages, creating an engaging and memorable experience.

Page 4 of 5

Landing Hero Motion Brief

The hero section will depict a teapot on a stove. As users scroll, the teapot fills with water, tea leaves are added, and steam rises, indicating the brewing process. The animation will loop every 10 seconds, with interactive elements allowing users to click on the teapot to see detailed information about each brewing stage. The animation will be responsive, adjusting to different screen sizes, and will settle into a static image when motion is reduced.

Interaction Model & Motion Direction

  • Intended Interaction Model: Parallax
  • Internal Pages: Static for clarity and minimal motion
  • Distinctive Section Mechanics: Each section will have a unique interactive element, such as morphing SVGs or scroll-linked reveals.

Non-Functional Requirements

  • Ensure high performance with lazy loading, code splitting, and optimized queries.
  • Implement robust security measures, including protected routes, input validation, and rate limiting.
  • Maintain a responsive design that adapts to various devices and screen sizes.

Tech Stack

  • Frontend: React, TypeScript, Vite, Tailwind CSS, shadcn/ui, React Router
  • Backend: Supabase (Auth, Database, Storage, Edge Functions)
  • Deployment: Vercel
Page 5 of 5

Assumptions and Constraints

  • The platform will primarily target small to medium-sized cafés and tea shops.
  • Supabase will handle all backend services, including authentication and database management.
  • The design will prioritize a modern, minimal aesthetic with a focus on usability and performance.

Glossary

  • CRUD: Create, Read, Update, Delete
  • POS: Point of Sale
  • RLS: Row-Level Security
  • SaaS: Software as a Service
  • UI/UX: User Interface/User Experience
Landing design preview
Landing: View Info
Login: Sign In
Dashboard: View Stats
Products: Manage Products
Categories: Manage Categories
Orders: Create Order
Orders: Track Status
Customers: View Profiles
Inventory: Track Stock
Staff: Manage Employees
Analytics: View Reports
Settings: Configure Cafe
Subscription: Manage Plan
Landing design preview
Landing: View Info
Login: Sign In
Dashboard: View Stats
Products: Manage Products
Categories: Manage Categories
Orders: Create Order
Orders: Track Status
Customers: View Profiles
Inventory: Track Stock
Staff: Manage Employees
Analytics: View Reports
Settings: Configure Cafe
Subscription: Manage Plan