How victorcazuriaga/backend_letssign works
Project type and purpose
• This is a NestJS-based monorepo containing three backend microservices (auth, document, notification) plus a shared library (common).
• Each “app” is a standalone NestJS application, communicating over HTTP (and potentially RabbitMQ) and sharing reusable modules for database access and messaging.
Core components
a. Microservices
• Auth Service (apps/auth)
• Document Service (apps/document)
• Notification Service (apps/notification)
b. Shared Library
• Common Library (libs/common) with two sub-modules:
• Database Module (abstract repository/schema)
• RMQ Module (RabbitMQ wrapper)
c. Infrastructure
• MongoDB (for persisting users, companies, documents)
• RabbitMQ broker (for event-driven interactions)
d. Clients / External Actors
• API Consumers (web/mobile clients or API Gateway)
• Optional administration console or other microservices
Relationships and interactions
• Clients → HTTP → Auth Service (login, signup, JWT issuance)
• Clients → HTTP → Document Service (CRUD operations on documents)
• Clients → HTTP → Notification Service (dispatch or query notifications)
• Auth/Document Services → MongoDB (via Common Database Module)
• Auth/Document Services → RabbitMQ (publish domain events via Common RMQ Module)
• Notification Service → RabbitMQ (subscribe to relevant event queues and send out notifications)
• All three microservices import the Common Library for shared abstractions
Architectural patterns and design principles
• Microservice architecture: each service has its own code, configuration, and lifecycle.
• Modular code sharing: libs/common provides centralized data-access and messaging modules.
• Dependency inversion: controllers depend on service interfaces, and those rely on abstract repositories/schemas.
• Event-driven communication: RabbitMQ for decoupling and asynchronous workflows.
Detailed elements
• Component labels (Auth Service, Document Service, Notification Service, Common Library, MongoDB, RabbitMQ, Clients)
• Arrowheads and direction for data flow
• Optional: ports/endpoints (e.g., Auth Service: POST /login, POST /users) and queue names/topics (e.g., user.created)