About This Architecture
LegalTech Platform integrates a monolithic backend (TrueMonolith) with specialized microservices for retrieval, billing, document processing, and extraction, orchestrated across Linux and Windows servers. Data flows from the Web UI through a JWT-authenticated Backend API to core services: PostgreSQL stores users and documents, Redis manages workflow streams and job queues, while Retrieval-Service handles RAG-based legal document search and Extractor Stack processes DOCX, PDF, and OCR inputs. The architecture demonstrates enterprise patterns—multi-tenant RBAC, AI agent orchestration, async job workers, and external integrations (LLM providers, payment gateways, SMTP)—balancing monolithic simplicity with service-oriented scalability. This design is ideal for teams building document-heavy, AI-powered legal applications requiring high availability, audit trails, and complex workflow automation. Fork and customize this diagram on Diagrams.so to adapt tenant isolation, add deployment targets, or document your own microservice boundaries. The separation of billing (Tarrification-Service) and templating (Template-Service) from the core monolith shows a pragmatic path to incremental service extraction.