How fatimatanveer76/devflow-crm works
DevFlow CRM is a role-aware CRM for managing leads, deals, projects, tasks, users, notes, and activity, with dashboard analytics. Users enter through the web app, authenticate or restore a session, then use protected pages that dispatch client state actions to an API; server routes authorize and validate requests before controllers and services perform domain operations against PostgreSQL. The graph preserves the documented CRM domains and analytics, but several links are based on the SOURCE INDEX rather than inspected implementations; those links are limited to references it explicitly records.
Main entry points: AppRoutes.jsx Page routing · App.jsx App startup · TasksPage.jsx Task workspace · index.js API route registry
Components 34
Web application
- App startup
client/src/App.jsx - Page routing
client/src/routes/AppRoutes.jsx - Analytics dashboard
client/src/pages/DashboardPage.jsx - Lead workspace
client/src/pages/LeadsPage.jsx - Deal workspace
client/src/pages/DealsPage.jsx - Project workspace
client/src/pages/ProjectsPage.jsx - Task workspace
client/src/pages/TasksPage.jsx - User management
client/src/pages/UsersPage.jsx
Client state and API
- Session state
client/src/features/auth/authSlice.js - Lead state
client/src/features/leads/leadsSlice.js - Deal state
client/src/features/deals/dealsSlice.js - Project state
client/src/features/projects/projectsSlice.js - Task state
client/src/features/tasks/tasksSlice.js - User state
client/src/features/users/usersSlice.js - HTTP client
client/src/api/axiosClient.js
API and security
- API application
server/src/app.js - API route registry
server/src/routes/index.js - Authentication service
server/src/services/auth.service.js - JWT operations
server/src/services/jwt.service.js - Request authentication
server/src/middleware/auth.middleware.js - Role permissions
server/src/middleware/rbac.middleware.js - Role definitions
server/src/config/roles.js
CRM domains
- Lead endpoints
server/src/routes/lead.routes.js - Lead requests
server/src/controllers/lead.controller.js - Lead operations
server/src/services/lead.service.js - Deal endpoints
server/src/routes/deal.routes.js - Deal requests
server/src/controllers/deal.controller.js - Deal operations
server/src/services/deal.service.js - Project requests
server/src/controllers/project.controller.js - Project operations
server/src/services/project.service.js - Task management
server/src/services/task.service.js - User management
server/src/services/user.service.js - Dashboard analytics
server/src/services/dashboard.service.js
Other components
- CRM user
Connections 31
- CRM user → App startup: opens
client/src/App.jsx - App startup → Session state: restores session
client/src/App.jsx - App startup → Page routing: renders
client/src/App.jsx - Page routing → Analytics dashboard: routes to
client/src/routes/AppRoutes.jsx - Page routing → Lead workspace: routes to
client/src/routes/AppRoutes.jsx - Page routing → Deal workspace: routes to
client/src/routes/AppRoutes.jsx - Page routing → Project workspace: routes to
client/src/routes/AppRoutes.jsx - Page routing → Task workspace: routes to
client/src/routes/AppRoutes.jsx - Page routing → User management: role-gates
client/src/routes/AppRoutes.jsx - Session state → HTTP client: sets token
client/src/features/auth/authSlice.js - Lead workspace → Lead state: dispatches
- Deal workspace → Deal state: dispatches
client/src/pages/DealsPage.jsx - Task workspace → Task state: dispatches
client/src/pages/TasksPage.jsx - Task workspace → User state: loads users
client/src/pages/TasksPage.jsx - API application → API route registry: mounts API
server/src/app.js - API route registry → Lead endpoints: registers
- Lead endpoints → Lead requests: routes requests
server/src/routes/lead.routes.js - Lead requests → Lead operations: calls
server/src/controllers/lead.controller.js - Deal endpoints → Deal requests: routes requests
server/src/routes/deal.routes.js - Deal requests → Deal operations: calls
server/src/controllers/deal.controller.js - API route registry → Deal endpoints: registers
- Request authentication → JWT operations: verifies token
server/src/middleware/auth.middleware.js - Request authentication → Role definitions: loads identity
- Role permissions → Role definitions: checks permissions
server/src/middleware/rbac.middleware.js - Authentication service → JWT operations: issues tokens
server/src/services/auth.service.js - Authentication service → Role definitions: uses roles
server/src/services/auth.service.js - Lead operations → Deal operations: validates lead references
- Project requests → Project operations: calls
server/src/controllers/project.controller.js - Deal operations → Project operations: references projects
- Task management → Lead operations: references leads
- Dashboard analytics → API application: serves dashboard API