Introduction to SSP Backend API
The SSP Backend API is a RESTful API service built with NestJS that provides comprehensive management capabilities for the Sistema de Servicio Penal/Social (SSP) platform. This API handles beneficiary information, activities, health profiles, and user authentication with role-based access control.What is SSP Backend API?
SSP Backend API is designed to support social and penal service programs by providing:- Beneficiary Management: Track and manage individuals enrolled in service programs
- Activity Tracking: Organize and monitor community service activities across multiple categories
- Health Profiles: Maintain comprehensive health information for each beneficiary
- User Authentication: Secure JWT-based authentication with role-based permissions
Who is this for?
This API is designed for:- Developers building client applications for SSP management systems
- System Administrators deploying and maintaining the SSP platform
- Social Workers and program coordinators who need to understand the system architecture
Key Features
JWT Authentication
Secure authentication with JSON Web Tokens and role-based access control for four user types: Admin, Psicologo, TrabajoSocial, and Guia
Complete CRUD Operations
Full create, read, update, and delete operations for beneficiaries, activities, and health profiles
PostgreSQL with TypeORM
Robust data persistence using PostgreSQL database with TypeORM for type-safe database operations
Role-Based Authorization
Four distinct user roles with granular permissions: Admin, Psicologo, TrabajoSocial, and Guia
Technology Stack
The SSP Backend API is built with modern, production-ready technologies:- Framework: NestJS v11 - A progressive Node.js framework
- Language: TypeScript - For type safety and better developer experience
- Database: PostgreSQL - Reliable relational database
- ORM: TypeORM v0.3 - Type-safe database operations
- Authentication: JWT (JSON Web Tokens) with Passport.js
- Validation: class-validator and class-transformer
- Testing: Jest for unit and e2e testing
Core Modules
The API is organized into the following modules:Authentication Module
Handles user login, JWT token generation, and validation. Supports secure password hashing with bcrypt.Users Module
Manages user accounts with four distinct roles and permissions.Beneficiarios Module
Complete CRUD operations for beneficiary management, including filtering by entry date and assigned time.Actividades Module
Manages community service activities across five categories:- Trabajo Comunitario (Community Work)
- Liderazgo Comunitario (Community Leadership)
- Atención a Sustancias (Substance Care)
- Educación para la Vida (Life Education)
- Promoción Cultural y Deportiva (Cultural & Sports Promotion)
Salud Module
Maintains comprehensive health profiles including physical aptitude, illnesses, substance use, and medical observations.Getting Started
Ready to get started? Here’s what to do next:Quickstart
Get the API running in under 5 minutes
Installation
Detailed installation and setup instructions
Authentication
Learn how authentication and authorization work
API Reference
Explore all available API endpoints
API Endpoints Overview
The API provides the following endpoint groups:- Authentication:
/auth/login- User login and token generation - Users:
/users- User management (admin only) - Beneficiarios:
/beneficiarios- Beneficiary CRUD and filtering - Actividades:
/actividades- Activity management and categorization - Salud:
/salud- Health profile management
/auth/login. Role-based permissions control access to specific operations.