How badugusivalokesh-code/mini-crs works
Clientra is a full-stack CRM for authenticated, user-scoped customer, deal, and follow-up task management. Users sign in, work with these records, and view dashboard metrics and pipeline values; the React frontend communicates with an Express API backed by MongoDB. The graph preserves the documented feature areas and the sampled backend’s route-to-service-to-repository structure. Several frontend connections and unsampled service internals are shown only as unverified links; source excerpts do not establish their exact runtime calls.
Main entry points: App.tsx SPA and routing · app.ts API application · apiClient.ts HTTP client · customerService.ts Customer logic
Components 24
React frontend
- SPA and routing
frontend/src/App.tsx - Auth experience
frontend/src/pages/LoginPage.tsx - Customer workspace
frontend/src/pages/CustomersPage.tsx - Deal pipeline
frontend/src/pages/DealsPage.tsx - Task workspace
frontend/src/pages/TasksPage.tsx - Dashboard views
frontend/src/components/dashboard/PipelineValueChart.tsx - HTTP client
frontend/src/lib/apiClient.ts
Express API
- API application
backend/src/app.ts - Authentication routes
backend/src/routes/auth.routes.ts - Customer routes
backend/src/routes/customers.routes.ts - Deal routes
backend/src/routes/deals.routes.ts - Task routes
backend/src/routes/tasks.routes.ts - Dashboard route
backend/src/routes/dashboard.routes.ts
CRM services
- Authentication logic
backend/src/services/authService.ts - Customer logic
backend/src/services/customerService.ts - Deal logic
backend/src/services/dealService.ts - Task logic
backend/src/services/taskService.ts - Dashboard logic
backend/src/services/dashboardService.ts
MongoDB persistence
- User records
backend/src/models/User.ts - Customer records
backend/src/models/Customer.ts - Deal records
backend/src/models/Deal.ts - Task records
backend/src/models/Task.ts - Dashboard aggregation
backend/src/models/Dashboard.ts
Other components
- CRM user
Connections 29
- CRM user → SPA and routing: uses
- SPA and routing → Auth experience: routes to
- SPA and routing → Customer workspace: routes to
- SPA and routing → Deal pipeline: routes to
- SPA and routing → Task workspace: routes to
- SPA and routing → Dashboard views: routes to
- Auth experience → HTTP client: requests through
- Customer workspace → HTTP client: requests through
- Deal pipeline → HTTP client: requests through
- Task workspace → HTTP client: requests through
- Dashboard views → HTTP client: requests through
- HTTP client → API application: sends API requests
- API application → Authentication routes: mounts
backend/src/app.ts - API application → Customer routes: mounts
backend/src/app.ts - API application → Deal routes: mounts
backend/src/app.ts - API application → Task routes: mounts
backend/src/app.ts - API application → Dashboard route: mounts
backend/src/app.ts - Authentication routes → Authentication logic: calls
backend/src/routes/auth.routes.ts - Customer routes → Customer logic: calls
backend/src/routes/customers.routes.ts - Deal routes → Deal logic: calls
backend/src/routes/deals.routes.ts - Task routes → Task logic: calls
backend/src/routes/tasks.routes.ts - Dashboard route → Dashboard logic: uses
backend/src/routes/dashboard.routes.ts - Authentication logic → User records: reads and writes
backend/src/services/authService.ts - Customer logic → Customer records: uses repository
backend/src/services/customerService.ts - Deal logic → Deal records: uses repository
backend/src/services/dealService.ts - Task logic → Task records: uses repository
backend/src/services/taskService.ts - Dashboard logic → Dashboard aggregation: uses repository
- Customer logic → Deal records: loads related deals
backend/src/services/customerService.ts - Customer logic → Task records: loads related tasks
backend/src/services/customerService.ts