Comunidades Vecinos is built around a strict multi-tenant model. Every resource in the platform — users, fees, receipts, financial movements, documents, and announcements — belongs to exactly one community (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.
Comunidad). This isolation is enforced at the API level through the community ID that is embedded in each authenticated user’s JWT token; requests never need to pass a community identifier in the body because the backend extracts it from the token automatically.
The Comunidad Entity
Thecomunidades table stores the core identity information for each residential community:
| Field | Column | Type | Description |
|---|---|---|---|
id | id_comunidad | Long (auto) | Primary key |
nombre | nombre | String | Display name of the community |
direccion | direccion | String | Street address |
ciudad | ciudad | String | City |
codPostal | cod_postal | String | Postal code |
API Endpoints
All community endpoints live under/api/comunidades. Only SUPER_ADMIN users can create or modify communities. ADMIN users can read their own community via GET /api/comunidades/{id}.
- List all communities
- Active-user summary
- Get by ID
- Create community
- Update community
Comunidad objects. Restricted to SUPER_ADMIN.Multi-Tenant Isolation
JWT-embedded community ID
When a user logs in, the JWT issued by the backend contains both the user’s ID and their community ID as custom claims. Every subsequent request that requires community-scoped data reads these claims directly from the token — no
idComunidad body field is required or accepted in most endpoints.ADMIN community scope
An
ADMIN user can only read and manage the single community they belong to. Attempting to access another community’s resources returns 403 Forbidden. Only SUPER_ADMIN can cross community boundaries.Cascading ownership
All child resources —
Usuario, Cuota, Recibo, Movimiento, Documento, and Publicacion — carry a mandatory foreign key to their parent Comunidad. There are no shared or global records below the community level.Active-user count
The
GET /api/comunidades/activos endpoint returns the ActivoComunidad DTO, which includes a usuarios field showing the number of active residents (those with estado = true). This is used by the SUPER_ADMIN dashboard to monitor community size at a glance.Community deletion is not yet implemented in the current version. No
DELETE /api/comunidades endpoint exists in the backend; communities cannot be removed through the API.