How jagadishitwine/justiceflow works
JusticeFlow is a legal-practice management platform with an Angular attorney interface and separate client portal, backed by an Express API gateway and domain services. The main workflow is staff or client use of the frontend, gateway routing, domain operations, and MySQL persistence. Domain branches cover matters, clients and conflicts, documents and AI research, billing and retainers, time, and court calendars. README and the source index establish the overall architecture and several module dependencies; unsampled frontend API wiring and some service routes are not inferred as confirmed calls.
Main entry points: routes.js API gateway · db.js MySQL database · auth.controller.js Authentication · document.controller.js Documents and AI research
Components 21
Frontend
- Angular application
frontend/src/main.ts - Application routes
frontend/src/app/app.routes.ts - Staff workspace
frontend/src/app/pages/dashboard/dashboard.component.ts - Client portal
frontend/src/app/pages/portal/portal-dashboard.component.ts - API services
frontend/src/app/core/services/api.service.ts
Gateway and security
- API gateway
backend/api-gateway/routes.js - Authentication
backend/auth-service/controllers/auth.controller.js - Auth middleware
backend/shared/authMiddleware.js
Legal operations
- Client and conflicts
backend/client-service/controllers/client.controller.js - Cases and retainers
backend/case-service/controllers/case.controller.js - Documents and AI research
backend/documents-service/controllers/document.controller.js - Case intelligence
backend/documents-service/services/case-rag.service.js - Local summarizer
backend/documents-service/services/local-summarizer.service.js - Invoices and trust
backend/billing-service/controllers/billing.controller.js - Court calendar
backend/calendar-service/controllers/calendar.controller.js - Time tracking
backend/time-tracking-service/controllers/time-entry.controller.js
Data and shared services
- MySQL database
backend/database/db.js - Audit logging
backend/shared/audit.js - Email service
backend/shared/emailService.js
Other components
- Staff user
- Portal client
Connections 31
- Staff user → Angular application: uses
- Portal client → Angular application: uses portal
- Angular application → Application routes: loads routes
frontend/src/app/app.routes.ts - Application routes → Staff workspace: routes staff
frontend/src/app/app.routes.ts - Application routes → Client portal: routes clients
frontend/src/app/app.routes.ts - Angular application → API services: uses API
- API services → API gateway: sends HTTP JSON
- API gateway → Authentication: routes auth
- API gateway → Client and conflicts: routes clients
- API gateway → Cases and retainers: routes cases
- API gateway → Documents and AI research: routes documents
- API gateway → Time tracking: routes time
- API gateway → Invoices and trust: routes billing
- API gateway → Court calendar: routes calendar
- Authentication → Auth middleware: uses token secret
backend/auth-service/controllers/auth.controller.js - Authentication → MySQL database: reads and writes
- Client and conflicts → MySQL database: persists records
- Cases and retainers → MySQL database: persists records
- Documents and AI research → Case intelligence: invokes analysis
backend/documents-service/controllers/document.controller.js - Documents and AI research → Local summarizer: uses summarizer
backend/documents-service/controllers/document.controller.js - Case intelligence → Local summarizer: processes text
backend/documents-service/services/case-rag.service.js - Documents and AI research → MySQL database: stores metadata
- Case intelligence → MySQL database: queries case data
backend/documents-service/services/case-rag.service.js - Invoices and trust → MySQL database: persists billing
- Court calendar → MySQL database: persists events
- Time tracking → MySQL database: persists entries
- Authentication → Audit logging: records actions
backend/auth-service/controllers/auth.controller.js - Invoices and trust → Audit logging: records actions
backend/billing-service/controllers/billing.controller.js - Time tracking → Audit logging: records actions
backend/time-tracking-service/controllers/time-entry.controller.js - Client and conflicts → Email service: sends email
backend/client-service/controllers/client.controller.js - Audit logging → MySQL database: writes audit logs
backend/shared/audit.js