How medusajs/medusa-eats works
Project Type and Core Components
a. Frontend Layer (Next.js)
• Store/Customer Interface
• Restaurant Dashboard
• Driver Dashboard
• Authentication System
b. Backend Layer (Medusa)
• API Services
• Workflow Engine
• Real-time Events System
• Database Layer
Client Layer
Frontend Services
Backend Services
Data Layer
Key Components
A. Client Layer
• Web Browsers
• Mobile Devices
B. Frontend Services (Next.js)
• Store Routes (/app/(store))
• Checkout System (/app/(checkout))
• Dashboard Routes (/app/dashboard)
• Real-time Components
• API Routes
C. Backend Services (Medusa)
• API Endpoints (/src/api)
• Module Services
• Delivery Module
• Restaurant Module
• Workflow Engine
• Delivery Workflows
• Restaurant Workflows
• User Workflows
• Real-time Event System
D. Data Layer
• PostgreSQL Database
• Redis (for real-time features)
Important Flows to Highlight
• Order Creation Flow
• Delivery Assignment Flow
• Real-time Status Updates
• Authentication Flow
Detailed Component Breakdown
Frontend Components:
• Store Interface
• Restaurant Listing
• Menu Display
• Cart Management
• Checkout System
• Order Tracking
• Dashboards
• Restaurant Dashboard
• Driver Dashboard
Backend Components:
• API Layer
• Store APIs
• Restaurant APIs
• Driver APIs
• Service Layer
• Delivery Service
• Restaurant Service
• User Service
• Workflow Engine
• Real-time Events
Additional Elements
Supporting elements:
• External service integrations
• Security layers
• Caching mechanisms
• API gateway
• Load balancers (if applicable)
Notes for Implementation
• Use standard UML or C4 model notation
• Keep component names consistent with codebase
• Clear boundaries between services
• Version numbers for major components
• Document all external dependencies