Skip to main content

Software Manual - EML Backend

1. Introduction

The EML Backend is a platform designed to enhance call centers through a robust infrastructure based on microservices. Its goal is to connect customers with service agents and manage automated messages such as reminders and notifications.

This manual provides a detailed description of the software architecture, its modules, and internal functionality.


2. System Architecture

The system follows a microservices-based architecture, with the following key components:

  • API Gateway: Manages authentication and traffic distribution to internal services.
  • Communication Microservices: Handles calls and messages.
  • Notification Manager: Automates reminders and notifications.
  • Database: Stores user information, sessions, and logs.
  • Messaging Queues (RabbitMQ/Kafka): Facilitates asynchronous communication between services.

Each microservice is developed in NestJS and uses PostgreSQL/MongoDB as databases. The infrastructure is containerized in Docker and Kubernetes.

Architecture Diagram

(A visual diagram of the general architecture would be included here)


3. Main Modules

3.1 API Gateway

  • Function: The main entry point of the platform.
  • Technology: NestJS with Express.
  • Features:
    • Authentication with JWT and OAuth2.
    • Request validation.
    • Logging and request monitoring.

3.2 Communication Microservice

  • Function: Call routing and message management.
  • Technology: NestJS with WebSockets.
  • Features:
    • Real-time message sending and receiving.
    • Intelligent call routing.
    • Integration with databases.

3.3 Notification Microservice

  • Function: Automating reminders and alerts.
  • Technology: NestJS with RabbitMQ.
  • Features:
    • Message queue management.
    • Customization of notifications.
    • Scheduling of delivery times.

3.4 Database

  • Type: Relational (PostgreSQL) and NoSQL (MongoDB).
  • Structure:
    • Users: Customer and agent information.
    • Messages: Communication records.
    • Events: Activity history.

4. Infrastructure and Deployment

4.1 Requirements

  • Docker and Docker Compose
  • Node.js 14+
  • PostgreSQL or MongoDB

4.2 Local Installation

  1. Clone the repository:
    git clone https://gitlab.com/eml-backend.git
    cd eml-backend
  2. Install dependencies:
    yarn install
  3. Configure environment variables:
    cp .env.example .env
    nano .env # Edit values as needed
  4. Start services with Docker:
    docker-compose up -d

4.3 Production Deployment

(Instructions on deployment in Kubernetes/AWS/GCP would be included here)


5. Security and Authentication

5.1 Authentication Methods

  • JWT: Tokens signed with private keys.
  • OAuth2: Integration with external providers.

5.2 Endpoint Protection

  • Use of middlewares to validate permissions.
  • Logging of access attempts and activity logs.

6. Monitoring and Logs

6.1 Tools Used

  • Prometheus & Grafana: Metric monitoring.
  • ELK Stack: Centralized log management.

6.2 Error Logging

Errors are logged in the database, and alerts are generated in case of critical failures.


7. Scalability and Performance

  • Use of load balancing to distribute traffic.
  • Caching strategies with Redis.
  • Database query optimization.

8. Conclusion

This manual describes the architecture, main modules, and infrastructure of EML Backend. For more details, refer to the technical documentation of each service.

🚀 This document will be updated as the platform evolves.