ms-alumnos is a NestJS microservice that handles full CRUD management of student (alumno) records. It runs as a standalone service communicating exclusively over NATS message patterns, making it suitable for deployment in distributed or microservices architectures. All student data is persisted in a PostgreSQL database via TypeORM.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Distribuidos-Org/ms-alumnos/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get the microservice running locally in minutes with Docker and NATS.
Configuration
Configure environment variables for NATS, PostgreSQL, and the service port.
Architecture Overview
Understand how ms-alumnos fits into a distributed system with NATS and a gateway.
Message Reference
Explore all NATS message patterns — create, read, update, delete, and seed.
How It Works
ms-alumnos listens for NATS messages from an API gateway or other services. Each operation is handled by a dedicated@MessagePattern handler on the controller. The service validates all incoming payloads using class-validator, hashes passwords with bcrypt before persisting, and maps errors to RpcException for proper propagation back through NATS.
Start PostgreSQL
Use Docker Compose to spin up a local PostgreSQL instance with the configured credentials.
Configure environment
Copy
.env.example to .env and fill in your NATS server URLs and database credentials.Key Features
NATS Messaging
All operations are exposed as NATS
cmd message patterns — no HTTP server needed.Input Validation
Every payload is validated with
class-validator. Invalid requests are rejected before reaching the database.Paginated Listing
The
find_all_alumnos pattern supports page and limit parameters for cursor-free pagination.Database Seeding
Load 100 sample student records with a single
seed_alumnos NATS message for rapid development.