Backend Architecture Overview
The backend of Olanna is designed as a modular, service-oriented architecture. Each service is responsible for a specific domain, ensuring scalability, maintainability, and clear separation of concerns. This documentation provides an overview of the backend structure, core services, and integration patterns.
Table of Contents
Architecture Principles
- Microservices: Each domain is encapsulated in its own service.
- API-First: All services expose RESTful APIs for communication.
- Statelessness: Services are stateless where possible, with state managed in dedicated databases.
- Security: Authentication and authorization are enforced at the API gateway and service level.
- Observability: Logging, monitoring, and tracing are implemented across all services.
Core Services
π³ Accounting
Manages financial accounting, ledger entries, account hierarchies, and financial statements with multi-currency support and reconciliation capabilities.
π€ Appointment
Handles appointment scheduling, availability management, resource allocation, and automated reminders with calendar integration.
πΌ Business
Manages business workflows, process orchestration, business rules engine, and operational metrics tracking.
βοΈ Config
Provides centralized configuration management with support for feature flags, environment profiles, version control, and dynamic property reloading.
π₯ CRM
Manages customer relationships, interactions tracking, sales pipelines, and customer lifecycle management.
π Delivery
Handles logistics and delivery management including shipment tracking, route optimization, driver management, and real-time GPS tracking.
π Discovery
Implements service discovery and registration, health checking, load balancing, and automatic service deregistration.
π Document
Manages document storage, retrieval, and lifecycle with support for multiple cloud storage providers (AWS, GCP, Azure, Cloudinary).
ποΈ E-commerce
Manages product catalogs, shopping carts, inventory, orders, and customer purchases with search and review capabilities.
π Gateway
Acts as the API gateway, routing requests, enforcing security, rate limiting, and aggregating responses from microservices.
π¨ Hotel
Manages hotel properties, room inventory, reservations, guest profiles, and check-in/check-out processes.
π Knowledge Base
Provides knowledge management capabilities with article management, categorization, full-text search, and version control.
βοΈ Notification
Handles multi-channel notification delivery via email, SMS, push notifications, and in-app messages with templating and scheduling.
π° Payment
Integrates with payment gateways, manages payment processing, settlements, refunds, and financial reconciliation.
π Search
Provides full-text search, faceted search, real-time indexing, and advanced query capabilities powered by Elasticsearch.
βοΈ Telephony
Manages voice calls, SMS messaging, voicemail, call recording, and communication tracking with IVR support.
π₯ User
Handles user registration, authentication, authorization, profile management, role-based access control, and multi-factor authentication.
π³ Wallet
Manages digital wallets, balances, fund transfers, transactions, and ledger operations with multi-currency support.
Integration & Communication
- API Gateway: All external and internal API calls are routed through the gateway for security and observability.
- Service-to-Service Communication: Uses RESTful APIs and, where needed, message queues for asynchronous processing.
- Database: Each service has its own database schema; sensitive data is encrypted at rest.
Security
- Authentication: OAuth2 and JWT-based authentication for all APIs.
- Authorization: Role-based access control (RBAC) enforced at the service level.
- Data Protection: Encryption in transit (TLS) and at rest. Regular security audits and vulnerability scanning.
Deployment & Operations
- Containerization: All services are containerized (Docker) for consistent deployment.
- Orchestration: Managed via Docker Compose or Kubernetes.
- CI/CD: Automated build, test, and deployment pipelines.
- Monitoring: Centralized logging, metrics, and alerting using tools like Prometheus, Grafana, and ELK stack.