How zas512/verdict works
Verdict is a law-firm management platform: firm users work through the web dashboard, authenticate and manage matters and related business operations through the NestJS API, with PostgreSQL-backed domain services. For legal-document assistance, the API proxies chat, query and upload requests to a separate Python RAG service. That service parses and chunks documents, embeds and indexes them, then retrieves matter-scoped context for guarded LLM responses. README documents HR, expenses, case-document versioning and other capabilities not represented by sampled controller excerpts; those branches are shown at their supported module paths. RAG wiring is evidenced by the sampled routes and ingestion pipeline.
Main entry points: route.ts Web API routes · routes.py RAG API · auth.service.ts Identity and access · tasks.controller.ts Tasks and files
Components 23
Web experience
- Dashboard workflows
apps/web/src/app/(dashboard) - Web API routes
apps/web/src/app/api/[...path]/route.ts
Business API
- Identity and access
apps/api/src/modules/auth/auth.service.ts - Firm administration
apps/api/src/modules/firms - Matter lifecycle
apps/api/src/modules/matters/matters.controller.ts - Client management
apps/api/src/modules/clients/clients.controller.ts - Case documents
apps/api/src/modules/case-documents/case-documents.controller.ts - Tasks and files
apps/api/src/modules/tasks/tasks.controller.ts - Associates and users
apps/api/src/modules/hr/associates - Attendance and leave
apps/api/src/modules/hr/attendance - Expense management
apps/api/src/modules/expenses - Hearings
apps/api/src/modules/matters/hearings - AI gateway
apps/api/src/modules/ai/ai.controller.ts
Legal AI
- RAG API
apps/ai/src/api/routes.py - Document ingestion
apps/ai/src/ingestion/pipeline.py - Matter retrieval
apps/ai/src/retrieval/retriever.py - Guarded generation
apps/ai/src/generation/llm.py
Persistence and services
- Vector store
apps/ai/src/retrieval/vector_store.py - PostgreSQL
Other components
- Firm user
- Ollama models
- Cloudinary
- Email delivery
apps/api/src/modules/mail/mail.service.ts
Connections 32
- Firm user → Dashboard workflows: uses
- Dashboard workflows → Web API routes: requests
- Web API routes → Identity and access: authenticates
- Web API routes → Matter lifecycle: manages matters
- Web API routes → Client management: manages clients
- Web API routes → Case documents: manages documents
- Web API routes → Tasks and files: manages tasks
- Web API routes → Associates and users: manages people
- Web API routes → Attendance and leave: tracks attendance
- Web API routes → Expense management: manages expenses
- Web API routes → Hearings: manages hearings
- Web API routes → Firm administration: administers firms
- Identity and access → PostgreSQL: reads and writes
- Firm administration → PostgreSQL: reads and writes
- Matter lifecycle → PostgreSQL: reads and writes
- Client management → PostgreSQL: reads and writes
- Case documents → PostgreSQL: reads and writes
- Tasks and files → PostgreSQL: reads and writes
- Associates and users → PostgreSQL: reads and writes
- Attendance and leave → PostgreSQL: reads and writes
- Expense management → PostgreSQL: reads and writes
- Hearings → PostgreSQL: reads and writes
- Identity and access → Email delivery: sends invitations
- Tasks and files → Cloudinary: requests signatures
- Web API routes → AI gateway: requests AI
- AI gateway → RAG API: proxies requests
- RAG API → Document ingestion: indexes uploads
- Document ingestion → Vector store: writes embeddings
- RAG API → Matter retrieval: searches matter context
- Matter retrieval → Vector store: queries chunks
- RAG API → Guarded generation: generates responses
- Guarded generation → Ollama models: calls models