How phatvo2002/crm works
This repository is a Vietnamese CRM application: a React client presents sales, customer, activity, reporting, and administration workflows backed by an ASP.NET Core API and relational CRM model. The user-facing path begins at login and role-filtered navigation, then enters CRM screens; API calls connect those screens to server controllers and persisted records. The supplied excerpts show routing, selected controller-to-service calls, and database modeling, but not the client API request implementations or most server service implementations, so those links are marked unverified or omitted.
Main entry points: Router.js Screen routes · Api API clients · Services Domain services · KhachHangMucTieuController.cs Customer controllers
Components 23
CRM client
- App shell
client/src/App.js - Authentication
client/src/App/Context/AuthContext.js - Role navigation
client/src/App/AppRouter.js - Screen routes
client/src/App/Router.js - API clients
client/src/App/Api
Sales workflows
- Prospect management
client/src/App/View/KhachHangTiemNang/index.jsx - Target customers
client/src/App/View/KhachHangMucTieu/index.jsx - Opportunities
client/src/App/View/CoHoi/index.jsx - Quotes
client/src/App/View/BaoGia/index.jsx - Orders
client/src/App/View/DonHang/index.jsx - Activities and tasks
client/src/App/View/NhiemVu/index.jsx - Sales workspace
client/src/App/View/BanLamViec/BanLamViec.jsx
CRM API
- Customer controllers
server/CRM/CRM/Controllers/KhachHangMucTieus/KhachHangMucTieuController.cs - Prospect controller
server/CRM/CRM/Controllers/KhachHangTiemnangs/KhachHangTiemNangController.cs - Quote controller
server/CRM/CRM/Controllers/BaoGias/BaoGiaController.cs - Reporting controller
server/CRM/CRM/Controllers/BaoCaos/BaoCaoController.cs - Lookup controller
server/CRM/CRM/Controllers/GetDatas/GetDataController.cs - Domain services
server/CRM/CRM/Services
CRM data
- CRM data model
server/CRM/CRM/Entities/CrmDbContext.cs - Target customer record
server/CRM/CRM/Entities/KhachHangMucTieu.cs - User and sales records
server/CRM/CRM/Entities/Nguoidung.cs - Quote response model
server/CRM/CRM/DTO/BaoGiaDTO.cs
Other components
- CRM user
Connections 30
- CRM user → App shell: uses
client/src/App.js - App shell → Authentication: loads
client/src/App.js - Authentication → API clients: auth requests
client/src/App/Context/AuthContext.js - App shell → Role navigation: renders
client/src/App.js - Role navigation → Screen routes: selects screens
client/src/App/AppRouter.js - Role navigation → API clients: loads role menu
client/src/App/AppRouter.js - Screen routes → Prospect management: routes to
client/src/App/Router.js - Screen routes → Target customers: routes to
client/src/App/Router.js - Screen routes → Opportunities: routes to
client/src/App/Router.js - Screen routes → Quotes: routes to
client/src/App/Router.js - Screen routes → Orders: routes to
client/src/App/Router.js - Screen routes → Activities and tasks: routes to
client/src/App/Router.js - Screen routes → Sales workspace: routes to
client/src/App/Router.js - Prospect management → API clients: uses endpoints
- Target customers → API clients: uses endpoints
- Quotes → API clients: uses endpoints
- API clients → Customer controllers: HTTP requests
- API clients → Prospect controller: HTTP requests
- API clients → Quote controller: HTTP requests
- Customer controllers → Domain services: delegates
server/CRM/CRM/Controllers/KhachHangMucTieus/KhachHangMucTieuController.cs - Prospect controller → Domain services: delegates
server/CRM/CRM/Controllers/KhachHangTiemnangs/KhachHangTiemNangController.cs - Quote controller → Domain services: delegates
server/CRM/CRM/Controllers/BaoGias/BaoGiaController.cs - Reporting controller → Domain services: delegates
server/CRM/CRM/Controllers/BaoCaos/BaoCaoController.cs - Lookup controller → Domain services: delegates
server/CRM/CRM/Controllers/GetDatas/GetDataController.cs - Customer controllers → CRM data model: reads and writes
server/CRM/CRM/Controllers/KhachHangMucTieus/KhachHangMucTieuController.cs - Prospect controller → CRM data model: reads and writes
server/CRM/CRM/Controllers/KhachHangTiemnangs/KhachHangTiemNangController.cs - Quote controller → CRM data model: queries model
server/CRM/CRM/Controllers/BaoGias/BaoGiaController.cs - Customer controllers → Target customer record: creates records
server/CRM/CRM/Controllers/KhachHangMucTieus/KhachHangMucTieuController.cs - Prospect controller → User and sales records: uses user context
server/CRM/CRM/Controllers/KhachHangTiemnangs/KhachHangTiemNangController.cs - Quote controller → Quote response model: returns quotes
server/CRM/CRM/Controllers/BaoGias/BaoGiaController.cs