How amar2kk/dar-al-bashir-dashboard works
Main System Components
A. Frontend Layer
• Client-Side Components
• Server Components (Next.js App Router)
• Authentication Layer
• Theme/UI Components
B. API Layer
• REST API Routes
• Store Management
• Product Management
• Order Management
• Billboard/Category Management
C. Database Layer
• Prisma ORM
• Database Tables/Relations
Key Architectural Elements to Highlight
a) App Router Structure:
• (auth) routes for authentication
• (dashboard) routes for store management
• (root) routes for main application
• Dynamic routes with [storeId] parameter
b) Feature Modules:
• Products
• Orders
• Billboards
• Categories
• Types
• Settings
c) Shared Components:
• UI Components
• Modals
• Providers
• Hooks
┌─────────────────────────────────────────────────────────┐
• Client Browser Layer │
• ┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Next.js Frontend Layer │
• ┬─────────────────┬────────────────────┤
• Auth Routes │ Dashboard Routes │ Root Routes │
• ┴─────────────────┴────────────────────┘
• ↕
┌─────────────────────────────────────────────────────────┐
• API Layer │
• ┬──────────┬──────────┬──────────┬───────────┤
• Stores │ Products │ Orders │Categories│Billboards │
• ┴──────────┴──────────┴──────────┴───────────┘
• ↕
┌─────────────────────────────────────────────────────────┐
• Database Layer │
• ┤
• Prisma ORM │
• ┘
Important Relationships
• Authentication flow between auth routes and API
• Dashboard routes interaction with API endpoints
• API routes connection to Prisma ORM
• Store-specific route parameters and their relationship to data access
• Component relationships within the dashboard features
Additional Elements
Supporting components:
• Modal providers
• Theme providers
• Toast notifications
• Hooks and utilities
• Shared UI components