About this project

Chefsy is an internal order management system designed for food service establishments. This first stage provides a complete functional foundation for tracking orders from creation to delivery. ## Tech Stack - **Next.js 14** with App Router - **TypeScript** (100% typed code) - **Tailwind CSS** for utility-first styling - **React Context + useReducer** for in-memory state, without external libraries ## Main Features - **Dashboard**: Daily metrics and recent orders - **Order Management**: Full list with status filters, creation of new orders via form - **Delivery View**: Mobile interface for riders - **Status Flow**: New → In Kitchen → Ready → In Delivery → Delivered, with the ability to cancel from any active status ## Project Structure The project is organized into main routes: - `/dashboard` - Metrics and recent orders - `/pedidos` - Full list with filters - `/nuevo-pedido` - Creation form - `/cadeteria` - Rider's mobile view Components are divided into layout (Sidebar, Header), orders (OrderCard, StatusBadge, OrderForm), and dashboard (MetricCard). Global state is managed through a context with useReducer, and test data is located in a mock file. ## How to Run 1. Install dependencies: `npm install` 2. Development mode: `npm run dev` (available at http://localhost:3000) 3. Production build: `npm run build` and `npm run start` ## Scaling Plan The project includes a clear roadmap for future stages: - **Stage 2**: Persistence with REST API or Supabase - **Stage 3**: Authentication with next-auth and roles (operator, kitchen, rider) - **Stage 4**: Real-time with WebSockets or Supabase Realtime - **Stage 5**: Menu and products module with autocomplete ## Architecture Decisions - Use of Route Group `(principal)` to separate the layout with sidebar from the simple delivery layout - `useReducer` instead of multiple `useState` to centralize logic - Synchronous mock data without useEffect, facilitating migration to async - Components without animations to prioritize functionality and speed - Code in Spanish for consistency with the target team