Backend Overview
The robust microservices architecture powering LibreApps Desktop.
Overview
LibreApps Desktop's backend is built on a modern, scalable microservices architecture. It leverages the Spring Boot ecosystem to provide a set of independent, highly available services that handle everything from user authentication to AI processing.
Key Components
1. Microservices
A collection of specialized services (User Management, Account Service, etc.) that communicate with each other via REST and service discovery.
2. Authentication & Security
A centralized security layer powered by Keycloak, providing robust JWT-based authentication and role-based access control (RBAC).
3. Data Persistence
A combination of PostgreSQL for relational data and Redis for high-performance caching and session management.
4. API Gateway
The LibreApps Gateway acts as the single entry point for all frontend requests, handling routing and security.
Why a Microservices Architecture?
- Scalability: Scale individual services independently based on their specific resource needs.
- Resilience: If one service fails, the rest of the system can continue to function.
- Maintainability: Smaller, focused codebases are easier to understand, test, and deploy.
- Technology Agnostic: Different services can be built using different languages or frameworks if needed (e.g., Java for core services, Python for AI).
Best Practices
- ✅ Do this: Keep each microservice focused on a single business capability.
- ✅ Do this: Use the API Gateway for all external communication.
- ❌ Don't do this: Share databases between microservices; each service should own its own data.