Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/GuillermoNavarro/Proyecto_comunidades/llms.txt

Use this file to discover all available pages before exploring further.

The Comunidades Vecinos API is a Spring Boot REST service that powers the full lifecycle of a residential homeowners community — from user and fee management to document uploads and financial movements. Every resource is exposed under the /api prefix at http://localhost:8081 (the port is configurable via the server.port property in application.properties). All responses use JSON, and all state is kept in the database — the server itself is completely stateless.

Base URL

http://localhost:8081
All endpoint paths are prefixed with /api. For example, the login endpoint is reachable at:
POST http://localhost:8081/api/login
The port 8081 is set by server.port in application.properties. Change it there if you need to run the backend on a different port.

Authentication

Every request to the API — except the three public paths listed below — must include a valid JSON Web Token in the Authorization header:
Authorization: Bearer <token>
Tokens are obtained by calling POST /api/login. The server validates the token on every request without performing a database lookup; all necessary identity information is embedded directly in the JWT claims.

Public endpoints (no token required)

PathPurpose
/api/loginObtain a JWT token (POST)
/swagger-ui/**Interactive API documentation UI
/v3/api-docs/**OpenAPI 3 specification (JSON)
The API uses SessionCreationPolicy.STATELESS — no cookies and no server-side session are ever created. Every single request must carry its own JWT.

Swagger UI

An interactive OpenAPI 3 interface is available at:
http://localhost:8081/swagger-ui/index.html
Use it to explore all endpoints, inspect schemas, and fire test requests directly from the browser without needing a separate HTTP client.

Response format

All endpoints return application/json bodies, with the single exception of POST /api/login, which returns a raw JWT string (plain text) rather than a JSON-wrapped object.

Endpoint groups

Authentication

Obtain a JWT token via POST /api/login. The entry point for every client session.

Communities

CRUD operations for residential communities (/api/comunidades).

Users

Create, read, update, and deactivate community members (/api/usuarios).

Fees

Define and manage periodic fees charged to residents (/api/cuotas).

Receipts

Track fee receipts issued to individual users (/api/recibos).

Movements

Financial ledger entries for income and expenses (/api/movimientos).

Documents

Upload and retrieve PDF documents for a community (/api/documentos).

Publications

Publish and read community news and announcements (/api/publicaciones).

Role permissions

The API enforces three roles — USER, ADMIN, and SUPER_ADMIN. The table below summarises the general permission level each role holds over each endpoint group.
Endpoint groupUSERADMINSUPER_ADMIN
/api/login
/api/usuariosRead own profileFull access within own communityFull platform access
/api/comunidadesRead own communityFull CRUD
/api/cuotasFull accessFull access
/api/recibosRead own receiptsFull access within community
/api/movimientosRead own / community movementsFull accessFull access
/api/documentosReadFull accessFull access
/api/publicacionesReadFull access
Fine-grained authorization is enforced at the method level using Spring Security’s @EnableMethodSecurity. Refer to each endpoint group’s reference page for the exact rules that apply to individual operations.

Build docs developers (and LLMs) love