How mohamedabakhir/elcartable-platforme works
elCartable is a Moroccan school-supplies ordering platform with a React storefront and NestJS API. Buyers browse schools and official lists, build a cart, place cash-on-delivery orders, then track them; staff manage orders and catalog data, while admins also review dashboard and analytics. The map separates buyer-facing stages, staff operations, backend domain services, and shared infrastructure. The README documents the API/database and file-storage setup; some service-to-store and page-to-API call details were not sampled, so those connections are omitted rather than inferred.
Main entry points: App.tsx Web application · api.ts HTTP API client · orders.controller.ts Order lifecycle · storage.service.ts File storage
Components 24
Buyer storefront
- Web application
apps/frontend/src/App.tsx - School discovery
apps/frontend/src/pages/SchoolListPage.tsx - Product catalogue
apps/frontend/src/pages/CatalogPage.tsx - Cart state
apps/frontend/src/store/cart.tsx - Checkout
apps/frontend/src/pages/CheckoutPage.tsx - Order tracking
apps/frontend/src/pages/TrackPage.tsx
Staff operations
- Protected admin UI
apps/frontend/src/components/ProtectedRoute.tsx - Order management
apps/frontend/src/pages/admin/OrdersPage.tsx - Catalog administration
apps/frontend/src/pages/admin/AdminProductsPage.tsx - Operations dashboard
apps/frontend/src/pages/admin/DashboardPage.tsx
Backend domains
- Authentication
apps/backend/src/auth/auth.service.ts - Schools and grades
apps/backend/src/schools/schools.controller.ts - Official school lists
apps/backend/src/school-lists/school-lists.controller.ts - Products and stock
apps/backend/src/products/products.controller.ts - Order lifecycle
apps/backend/src/orders/orders.controller.ts
Analytics and insights
- Visitor analytics
apps/backend/src/analytics/analytics.controller.ts - Dashboard metrics
apps/backend/src/dashboard/dashboard.controller.ts - Audit logs
apps/backend/src/audit/audit.controller.ts
Shared infrastructure
- HTTP API client
apps/frontend/src/lib/api.ts - File storage
apps/backend/src/storage/storage.service.ts - Neon PostgreSQL
Other components
- Buyer
- Staff user
- Cloudflare R2
Connections 31
- Buyer → Web application: uses
apps/frontend/src/App.tsx - Web application → School discovery: routes to
apps/frontend/src/App.tsx - Web application → Product catalogue: routes to
apps/frontend/src/App.tsx - Web application → Cart state: routes to
apps/frontend/src/App.tsx - Web application → Checkout: routes to
apps/frontend/src/App.tsx - Web application → Order tracking: routes to
apps/frontend/src/App.tsx - Staff user → Protected admin UI: uses
- Web application → Protected admin UI: protects routes
apps/frontend/src/App.tsx - Web application → Order management: routes to
apps/frontend/src/App.tsx - Web application → Catalog administration: routes to
apps/frontend/src/App.tsx - Web application → Operations dashboard: routes to
apps/frontend/src/App.tsx - Checkout → HTTP API client: submits via
- Order tracking → HTTP API client: queries via
apps/frontend/src/pages/TrackPage.tsx - Order management → HTTP API client: operates via
- Catalog administration → HTTP API client: manages via
- Operations dashboard → HTTP API client: loads via
- HTTP API client → Order lifecycle: calls API
- HTTP API client → Schools and grades: calls API
- HTTP API client → Official school lists: calls API
- HTTP API client → Products and stock: calls API
- HTTP API client → Authentication: calls API
- Order lifecycle → Neon PostgreSQL: persists orders
- Schools and grades → Neon PostgreSQL: stores school data
- Official school lists → Neon PostgreSQL: stores lists
- Products and stock → Neon PostgreSQL: stores products
- Visitor analytics → Neon PostgreSQL: stores events
- Dashboard metrics → Neon PostgreSQL: reads metrics
- Audit logs → Neon PostgreSQL: stores audit data
- File storage → Cloudflare R2: stores files
README.md - File storage → Neon PostgreSQL: persists file URLs
README.md - Order lifecycle → File storage: generates order files