- Add Cloud for Sovereignty landing zone architecture and deployment - Implement complete legal document management system - Reorganize documentation with improved navigation - Add infrastructure improvements (Dockerfiles, K8s, monitoring) - Add operational improvements (graceful shutdown, rate limiting, caching) - Create comprehensive project structure documentation - Add Azure deployment automation scripts - Improve repository navigation and organization
Legal Documents Service
Comprehensive document management service for law firms and courts.
Features
- Document Management: Full CRUD operations with versioning
- Template System: Template-based document generation
- Legal Matters: Matter management and document linking
- Document Assembly: Multi-clause document assembly
- Collaboration: Comments, annotations, and review workflows
- Workflows: Approval, signing, and filing workflows
- Court Filings: E-filing and deadline tracking
- Audit Trail: Comprehensive audit logging
- Search: Full-text search and discovery
- Security: Watermarking, encryption, access control
- Retention: Retention policies and disposal workflows
- Clause Library: Reusable clause management
API Endpoints
Documents
POST /documents- Create documentGET /documents/:id- Get documentGET /documents- List documentsPATCH /documents/:id- Update documentPOST /documents/:id/checkout- Checkout documentPOST /documents/:id/checkin- Checkin document
Versions
GET /documents/:id/versions- List versionsGET /documents/:id/versions/:version- Get versionGET /documents/:id/versions/latest- Get latest versionGET /documents/:id/versions/history- Get version historyGET /documents/:id/versions/:v1/compare/:v2- Compare versionsPOST /documents/:id/versions/:version/restore- Restore version
Templates
POST /templates- Create templateGET /templates/:id- Get templateGET /templates- List templatesPATCH /templates/:id- Update templatePOST /templates/:id/version- Create template versionPOST /templates/:id/render- Render templateGET /templates/:id/variables- Extract variables
Matters
POST /matters- Create matterGET /matters/:id- Get matterGET /matters- List mattersPATCH /matters/:id- Update matterPOST /matters/:id/participants- Add participantGET /matters/:id/participants- Get participantsPOST /matters/:matter_id/documents/:document_id- Link documentGET /matters/:id/documents- Get matter documents
Assembly
POST /assembly/generate- Generate from templatePOST /assembly/preview- Preview template renderingPOST /assembly/from-clauses- Assemble from clauses
Collaboration
POST /documents/:id/comments- Create commentGET /documents/:id/comments- Get commentsPATCH /comments/:id- Update commentPOST /comments/:id/resolve- Resolve comment
Workflows
POST /workflows- Create workflowGET /workflows/:id- Get workflowGET /documents/:id/workflows- Get document workflowsPATCH /workflows/:id/status- Update workflow status
Filings
POST /filings- Create filingGET /filings/:id- Get filingGET /filings- List filingsGET /matters/:id/filing-deadlines- Get deadlines
Audit
GET /documents/:id/audit- Get audit logsGET /audit/search- Search audit logsGET /audit/statistics- Get statistics
Search
POST /search- Search documentsGET /search/suggestions- Get search suggestions
Retention
POST /retention/policies- Create policyGET /retention/policies- List policiesPOST /documents/:id/retention- Apply policyGET /documents/:id/retention- Get retention recordGET /retention/expired- Get expired recordsPOST /documents/:id/dispose- Dispose documentGET /retention/statistics- Get statistics
Clauses
POST /clauses- Create clauseGET /clauses/:id- Get clauseGET /clauses- List clausesPOST /clauses/:id/render- Render clause
Development
# Install dependencies
pnpm install
# Run development server
pnpm dev
# Build
pnpm build
# Start production server
pnpm start
# Run tests
pnpm test
Environment Variables
PORT- Server port (default: 4005)DATABASE_URL- PostgreSQL connection stringNODE_ENV- Environment (development/production)SWAGGER_SERVER_URL- Swagger server URL
API Documentation
Swagger documentation available at /docs when running.