How bdu-fira/22050026_tramgianguyen_cd1 works
Project type and purpose
• This is a full-stack e-commerce platform (Gamine) for gaming gear, comprising three main parts:
• Public website (React)
• Admin panel (React + TypeScript)
• Backend REST API (Django + DRF + PostgreSQL)
• It supports product browsing, cart & checkout, user accounts, promotions, plus a management interface for products, orders, users, content, and stats.
File structure
• Two deployment variants:
a. project-docker/ – Dockerized version with Dockerfiles for each service and a docker-compose.yml
b. gamine-local/ – Local development version with the same three subprojects
• Top-level subfolders under each variant:
• gamine-react/ – client-facing storefront (React JS)
• admin-panel/ – administrative UI (React TS)
• admin/backend/ – Django project (settings, URLs, ASGI/WGSI) plus “core” app with models, serializers, views, migrations, commands
• Supporting files:
• Dockerfile & nginx.conf in gamine-react & admin-panel for container image & static-asset serving
• docker-compose.yml orchestrating three containers plus DB (PostgreSQL)
• package.json, tsconfig.json, requirements.txt
README for additional insights
• Confirms 3-tier architecture: frontend, admin UI, backend
• Lists tech stack: React, TS, Material UI, Django REST Framework, JWT auth, PostgreSQL, Nginx, Docker
• Describes endpoints & ports for each service
a. Main components
• Browser (end user or admin user)
• Public Website container (React)
• Admin Panel container (React TS)
• Nginx reverse proxy (in each web container)
• Backend API container (Django + DRF)
• Database container (PostgreSQL)
• Docker Compose orchestration
b. Relationships & interactions
• Browser → HTTP(S) → Nginx (React apps)
• React apps → HTTP(S) REST → Django API (/api/…)
• Django API → SQL → PostgreSQL
• Admin panel and public site share the same API but different routes/permissions
• JWT Authentication issued by API → stored in browser by React → sent on subsequent API calls
c. Architectural patterns & design principles
• 3-tier separation (presentation → application → data)
• Containerized micro-services (each UI + API isolated)
• RESTful API pattern powered by Django REST Framework
• Role-based access control in Admin (PermissionRoute components, DRF permissions)
• React componentization and Context API for state (AuthContext, SessionManager)
d. Key technologies & libraries
• React, React Router, Context API (AuthContext, ProtectedRoute)
• Material UI (for Admin styling)
• Django, Django REST Framework, JWT
• PostgreSQL (persistent data store)
• Docker & docker-compose, Nginx (static serving + proxy)