How 169398/strathmall works
Main System Components
a) Frontend Layer:
• Client-side application (Next.js App Router structure)
• Authentication interfaces (/(auth) route)
• Admin dashboard (/admin route)
• Seller dashboard (/seller route)
• User dashboard (/user route)
• Delivery interface (/delivery route)
b) Backend Layer:
• API Routes (/api directory)
• Authentication system (NextAuth.js)
• Payment processing (Stripe & M-Pesa integration)
• File upload system (UploadThing)
c) Database Layer:
• PostgreSQL (indicated by Drizzle ORM usage)
• Redis (for caching)
Architectural Patterns to Highlight
a) Next.js App Router Architecture:
• Route Groups: (auth), (root)
• Parallel Routes: @modal
• API Routes structure
• Server vs Client Components
b) Service Architecture:
• Authentication flows
• Payment processing services
• Email service system
• File storage system
Specific Implementation Details
a) Data Flow:
• Client-to-API interactions
• Authentication flows
• Payment processing flows
• Real-time updates
b) Integration Points:
• Third-party services (Stripe, M-Pesa)
• File upload service
• Email service
• External APIs
Component Relationships
Key interactions:
• User authentication flow
• Product management pipeline
• Order processing system
• Payment processing flow
• Seller-buyer interactions
• Admin management capabilities
[Client Layer]
• ↕
[API/Server Layer]
• ↕
[Service Layer]
• ↕
[Database Layer]