How niroj925/gadget-store works
Main Components
A. Frontend Applications (3 separate applications):
• Client Portal (React + Vite)
• Admin Dashboard (React + Vite)
• Delivery Portal (React + Vite)
B. Backend Server:
• Nest.js Application
• Authentication Services (Google OAuth)
• API Modules (Products, Orders, Customers, etc.)
C. External Services:
• eSewa Payment Gateway
• OpenStreetMap Integration
• Google OAuth Service
D. Database:
• PostgreSQL Database with multiple entities
Component Relationships
A. Client Applications → Backend:
• REST API connections
• WebSocket connections for real-time features
• Authenticated routes
B. Backend → External Services:
• Payment gateway integration
• Service integration
• OAuth flow
C. Backend → Database:
• Entity relationships
• Data flow
Detailed Components
A. Frontend Applications (show as separate containers):
• Client Portal:
• Product browsing
• Shopping cart
• Payment integration
• Location services
• Admin Dashboard:
• Product management
• Order tracking
• Customer management
• Delivery Portal:
• Order management
• Navigation system
• Delivery tracking
B. Backend Services (show as microservices):
• Auth Module
• Product Module
• Order Module
• Customer Module
• Payment Module
• Delivery Module
• Review Module
C. Database Entities (show major tables):
• Products
• Orders
• Customers
• Categories
• Reviews
• Payments
• Delivery
• Admin
• Auth
Security Layer
A security layer showing:
• JWT Authentication
• Role-based Access Control
• Google OAuth Integration
• Access Token/Refresh Token Flow
Additional Elements
• API Gateway layer
• Environment configurations
• Scalable components
• Caching mechanisms if any
Infrastructure Layer (Optional)
Docker containers and their relationships:
• Frontend containers
• Backend container
• Database container
• Network configuration
Remember to:
• Use consistent symbols throughout
• Clear labels and annotations
• Version information
• Document all external service integrations
• Primary and secondary data flows
• Error handling paths