How nhatlong12112005/htttdn-crm works
This repository implements an e-commerce platform with a customer storefront, a separate administration/CRM portal, and a NestJS API. Customer routes cover discovery, accounts, cart, checkout, orders, favorites, and surveys; admins manage catalog, orders, reviews, surveys, and analytics. The backend separates these domains into API modules and uses Prisma for persistence. Dataset generation is a supporting data-preparation capability. Some API and realtime connections are not visible in the sampled evidence, so those links are marked unverified.
Main entry points: services Storefront API services · App.jsx Admin portal routes · AppRoutes.jsx Storefront routes · axiosClient.js Admin API client
Components 25
Customer storefront
- Storefront routes
client/src/routes/AppRoutes.jsx - Product discovery
client/src/pages/Product - Cart and checkout
client/src/pages/Cart - Customer accounts
client/src/pages/Account - Survey participation
client/src/pages/Survey/SurveyPage.jsx - Storefront API services
client/src/services
Admin and CRM
- Admin portal routes
admin/src/App.jsx - Admin authentication
admin/src/contexts/AuthContext.jsx - Admin API client
admin/src/api/axiosClient.js - Account management
admin/src/pages/accounts/AccountManagement.jsx - Review moderation
admin/src/pages/reviews/ReviewManagement.jsx - Survey management
admin/src/pages/surveys/SurveyManagement.jsx - Analytics and reconciliation
admin/src/pages/analytics
Backend services
- Authentication API
backend/src/app/auth - Catalog API
backend/src/app/products - Cart and orders API
backend/src/app/orders - Reviews API
backend/src/app/reviews - Surveys API
backend/src/app/surveys - Reports API
backend/src/app/reports - Prisma persistence
backend/src/common/prisma/prisma.service.ts
Data generation
- Dataset generators
dataset/generators - Fake data utilities
dataset/utils/faker.ts - SQL builder
dataset/utils/sqlBuilder.ts
Other components
- Customer
- Administrator
Connections 29
- Customer → Storefront routes: uses
client/src/routes/AppRoutes.jsx - Storefront routes → Product discovery: routes to
client/src/routes/AppRoutes.jsx - Storefront routes → Cart and checkout: routes to
client/src/routes/AppRoutes.jsx - Storefront routes → Customer accounts: routes to
client/src/routes/AppRoutes.jsx - Storefront routes → Survey participation: routes to
client/src/routes/AppRoutes.jsx - Product discovery → Storefront API services: uses
- Cart and checkout → Storefront API services: uses
- Customer accounts → Storefront API services: uses
- Survey participation → Storefront API services: uses
- Storefront API services → Catalog API: HTTP requests
- Storefront API services → Cart and orders API: HTTP requests
- Storefront API services → Authentication API: HTTP requests
- Storefront API services → Surveys API: HTTP requests
- Administrator → Admin portal routes: uses
admin/src/App.jsx - Admin portal routes → Admin authentication: provides auth
admin/src/App.jsx - Admin portal routes → Account management: routes to
admin/src/App.jsx - Admin portal routes → Review moderation: routes to
admin/src/App.jsx - Admin portal routes → Survey management: routes to
admin/src/App.jsx - Admin portal routes → Analytics and reconciliation: routes to
admin/src/App.jsx - Admin authentication → Admin API client: calls
admin/src/contexts/AuthContext.jsx - Account management → Admin API client: calls
admin/src/pages/accounts/AccountManagement.jsx - Review moderation → Admin API client: calls
admin/src/pages/reviews/ReviewManagement.jsx - Admin API client → Authentication API: HTTP requests
- Admin API client → Reviews API: HTTP requests
- Authentication API → Prisma persistence: reads and writes
backend/src/app/auth/auth.service.ts - Reviews API → Prisma persistence: reads and writes
backend/src/app/reviews/reviews.service.ts - Surveys API → Prisma persistence: persists responses
- Dataset generators → Fake data utilities: imports
dataset/generators/reviews.generator.ts - Dataset generators → SQL builder: imports
dataset/generators/reviews.generator.ts