How derekgan08/caseace-law-firm-management-system-backend works
CaseAce is a law-firm case-management backend. Staff and clients enter through HTTP routes or authenticated case-chat sockets; route handlers implement identity/CRM, cases, documents, tasks, appointments, and dashboard statistics, with Mongo-backed models and notification helpers supporting those workflows. The README also describes client ratings and calendar reminders, but the sampled evidence does not establish their implementation details. Edges reflect the app wiring, route references, and source-index imports; some storage and integration behavior is therefore not expanded beyond what those sources show.
Main entry points: app.js HTTP and Socket Server · documentController.js Document Management · authMiddleware.js Access Middleware · user.js User Records
Components 30
Backend Runtime
- HTTP and Socket Server
app.js - Access Middleware
middlewares/authMiddleware.js - Auth Routes
routes/auth.js - CRM Routes
routes/crm.js - Case Routes
routes/case.js - Document Routes
routes/document.js - Task Routes
routes/task.js - Appointment Routes
routes/appointment.js - Statistics Routes
routes/statistic.js
Identity and CRM
- Authentication
controllers/authController.js - Client and Staff CRM
controllers/crmController.js
Casework Operations
- Case Management
controllers/caseController.js - Document Management
controllers/documentController.js - Task Management
controllers/taskController.js - Appointment Scheduling
controllers/appointmentController.js - Dashboard Statistics
controllers/statisticController.js
Collaboration
- Case Chat
socketHandler/caseMessageHandlers.js - Notification Helper
helpers/saveNotification.js
Data and Integrations
- User Records
models/user.js - Case Records
models/case.js - Document Records
models/document.js - Task Records
models/task.js - Appointment Records
models/appointment.js - Message Records
models/message.js - Notification Records
models/notification.js - Google Drive Utility
utils/googleDrive.js - Cloudinary Setup
config/cloudinary.js
Other components
- Firm staff
- Clients
- MongoDB
Connections 48
- Firm staff → HTTP and Socket Server: use API
README.md - Clients → HTTP and Socket Server: use API
README.md - HTTP and Socket Server → Auth Routes: mounts
app.js - HTTP and Socket Server → CRM Routes: mounts
app.js - HTTP and Socket Server → Case Routes: mounts
app.js - HTTP and Socket Server → Document Routes: mounts
app.js - HTTP and Socket Server → Task Routes: mounts
app.js - HTTP and Socket Server → Appointment Routes: mounts
app.js - HTTP and Socket Server → Statistics Routes: mounts
app.js - HTTP and Socket Server → Access Middleware: uses middleware
app.js - HTTP and Socket Server → Case Chat: registers handler
app.js - HTTP and Socket Server → MongoDB: connects
app.js - Auth Routes → Authentication: routes to
routes/auth.js - CRM Routes → Client and Staff CRM: routes to
routes/crm.js - CRM Routes → Access Middleware: uses middleware
routes/crm.js - Case Routes → Case Management: routes to
routes/case.js - Case Routes → Access Middleware: uses middleware
routes/case.js - Document Routes → Document Management: routes to
routes/document.js - Document Routes → Access Middleware: uses middleware
routes/document.js - Task Routes → Task Management: routes to
routes/task.js - Task Routes → Access Middleware: uses middleware
routes/task.js - Appointment Routes → Appointment Scheduling: routes to
routes/appointment.js - Appointment Routes → Access Middleware: uses middleware
routes/appointment.js - Statistics Routes → Dashboard Statistics: routes to
routes/statistic.js - Statistics Routes → Access Middleware: uses middleware
routes/statistic.js - Authentication → User Records: reads and writes
controllers/authController.js - Client and Staff CRM → User Records: reads and writes
controllers/crmController.js - Client and Staff CRM → Case Records: reads cases
controllers/crmController.js - Client and Staff CRM → Google Drive Utility: uses utility
controllers/crmController.js - Client and Staff CRM → Cloudinary Setup: uses setup
controllers/crmController.js - Case Management → Case Records: reads and writes
controllers/caseController.js - Case Management → Message Records: uses messages
controllers/caseController.js - Document Management → Document Records: reads and writes
controllers/documentController.js - Document Management → Case Records: checks case access
controllers/documentController.js - Document Management → Message Records: updates messages
controllers/documentController.js - Document Management → User Records: reads user details
controllers/documentController.js - Document Management → Notification Helper: sends alerts
controllers/documentController.js - Document Management → Google Drive Utility: uses utility
controllers/documentController.js - Document Management → Cloudinary Setup: uses setup
controllers/documentController.js - Task Management → Task Records: reads and writes
controllers/taskController.js - Task Management → User Records: reads user details
controllers/taskController.js - Task Management → Notification Helper: sends alerts
controllers/taskController.js - Appointment Scheduling → Appointment Records: reads and writes
controllers/appointmentController.js - Appointment Scheduling → User Records: reads user details
controllers/appointmentController.js - Appointment Scheduling → Notification Helper: sends alerts
controllers/appointmentController.js - Dashboard Statistics → Case Records: queries
controllers/statisticController.js - Dashboard Statistics → Document Records: queries
controllers/statisticController.js - Dashboard Statistics → User Records: queries
controllers/statisticController.js