How rohit79003/trishul_crm works
Trishul CRM is a role-based CRM with a Next.js client and an Express/MongoDB API. Users sign in, work with leads, customers, tasks and team records, and access reporting, settings and an AI co-pilot; API routes apply authentication and role checks before controller operations. The README documents these product areas, while sampled controllers show record filtering and model access. Client-to-API call sites and several unsampled controllers were not shown, so those links are omitted rather than inferred.
Main entry points: server.js Express API · User.js User records · employee.controller.js Team and workload · customer.routes.js Customer routes
Components 34
CRM client
- Sign in
client/app/(auth)/login/page.tsx - Dashboard
client/app/(dashboard)/dashboard/page.tsx - Lead workspace
client/app/(dashboard)/leads/page.tsx - Customer directory
client/app/(dashboard)/customers/page.tsx - Task workspace
client/app/(dashboard)/tasks/page.tsx - Team management
client/app/(dashboard)/employees/page.tsx - Analytics reports
client/app/(dashboard)/reports/page.tsx - Workspace settings
client/app/(dashboard)/settings/page.tsx - AI co-pilot
client/app/(dashboard)/ai-assistant/page.tsx
API access
- Express API
server/server.js - Authentication routes
server/routes/auth.routes.js - Customer routes
server/routes/customer.routes.js - Lead routes
server/routes/lead.routes.js - Task routes
server/routes/task.routes.js - Employee routes
server/routes/employee.routes.js - Report routes
server/routes/report.routes.js - Settings routes
server/routes/settings.routes.js - Assistant routes
server/routes/assistant.routes.js - JWT and role checks
server/middleware/auth.middleware.js
CRM capabilities
- Account authentication
server/controllers/auth.controller.js - Customer operations
server/controllers/customer.controller.js - Lead pipeline
server/controllers/lead.controller.js - Task management
server/controllers/task.controller.js - Team and workload
server/controllers/employee.controller.js - Analytics reporting
server/controllers/report.controller.js - Company settings
server/controllers/settings.controller.js - AI assistance
server/controllers/assistant.controller.js - Workload rules
server/constants/workload.js
Persistence
- User records
server/models/User.js - Customer records
server/models/Customer.js - Lead records
server/models/Lead.js - Task records
server/models/Task.js
Other components
- CRM user
- MongoDB
Connections 36
- CRM user → Sign in: signs in
README.md - Express API → Authentication routes: mounts
server/server.js - Express API → Customer routes: mounts
server/server.js - Express API → Lead routes: mounts
server/server.js - Express API → Task routes: mounts
server/server.js - Express API → Employee routes: mounts
server/server.js - Express API → Report routes: mounts
server/server.js - Express API → Settings routes: mounts
server/server.js - Express API → Assistant routes: mounts
server/server.js - Authentication routes → Account authentication: dispatches
server/routes/auth.routes.js - Customer routes → Customer operations: dispatches
server/routes/customer.routes.js - Customer routes → JWT and role checks: authenticates
server/routes/customer.routes.js - Lead routes → Lead pipeline: dispatches
server/routes/lead.routes.js - Lead routes → JWT and role checks: authenticates
server/routes/lead.routes.js - Task routes → Task management: dispatches
server/routes/task.routes.js - Employee routes → Team and workload: dispatches
server/routes/employee.routes.js - Employee routes → JWT and role checks: authenticates
server/routes/employee.routes.js - Report routes → Analytics reporting: dispatches
server/routes/report.routes.js - Settings routes → Company settings: dispatches
server/routes/settings.routes.js - Assistant routes → AI assistance: dispatches
server/routes/assistant.routes.js - Account authentication → User records: reads/writes
server/controllers/auth.controller.js - Customer operations → Customer records: reads/writes
server/controllers/customer.controller.js - Customer operations → User records: filters by team
server/controllers/customer.controller.js - Lead pipeline → Lead records: reads/writes
server/controllers/lead.controller.js - Lead pipeline → User records: resolves assignees
server/controllers/lead.controller.js - Task management → Task records: reads/writes
server/controllers/task.controller.js - Task management → User records: resolves assignees
server/controllers/task.controller.js - Team and workload → User records: manages accounts
server/controllers/employee.controller.js - Team and workload → Lead records: aggregates leads
server/controllers/employee.controller.js - Team and workload → Task records: aggregates tasks
server/controllers/employee.controller.js - Team and workload → Workload rules: applies thresholds
server/controllers/employee.controller.js - Express API → MongoDB: connects
server/server.js - Customer records → MongoDB: persists in
- Lead records → MongoDB: persists in
- Task records → MongoDB: persists in
- User records → MongoDB: persists in