Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LMendoza70/SSA/llms.txt
Use this file to discover all available pages before exploring further.
The Content abstraction is the architectural cornerstone of the SSA CMS. Rather than building independent, disconnected models for news, diseases, campaigns, and every other entity type, the platform defines a single base content structure that all types extend. This design keeps the data model lean, avoids duplicated logic for status management, SEO, tagging, and soft-deletion, and allows cross-cutting concerns — like the chatbot’s indexing pipeline and the social media publisher — to work uniformly across every content type without special-casing each one.
Shared Base Fields
Every content type in the CMS shares the following fields regardless of its specific type. These fields are defined once at the Content domain level and inherited by all entities.
| Field | Type | Description |
|---|
id | UUID | Primary key, auto-generated. |
title | string | The display title shown on public pages and in the admin list. |
slug | string | URL-friendly unique identifier. Auto-generated from title at creation; editable by administrators. |
body | JSON (Tiptap) | Rich text content stored as Tiptap-compatible JSON. Rendered on the frontend by the Tiptap viewer. |
status | enum | Current lifecycle state: DRAFT | PUBLISHED | ARCHIVED. |
publishedAt | timestamp | null | Timestamp of first publication. Null while in DRAFT or before a scheduled publish date is reached. |
seoTitle | string | null | Custom SEO meta title. Falls back to title if null. |
seoDescription | string | null | Meta description for search engine result snippets and social sharing previews. |
tags | string[] | Keyword tags for filtering, related-content display, and chatbot semantic indexing. |
media | MediaAsset[] | Array of attached multimedia assets referenced from the Multimedia Module. |
createdAt | timestamp | Set automatically when the record is first created. Never modified after creation. |
updatedAt | timestamp | Auto-updated by Prisma on every write. Tracks the most recent change. |
deletedAt | timestamp | null | Soft delete field. Non-null when the record has been logically deleted. Records with a non-null deletedAt are excluded from all queries by default. |
createdBy | User ID | Foreign key referencing the administrator who created the content. |
updatedBy | User ID | Foreign key referencing the last administrator to modify the content. |
Type-Specific Fields
Beyond the shared base, each content type defines additional fields that capture the domain-specific information required for that entity. Types with no extra fields — like News — rely entirely on the base structure.
News
News items carry no fields beyond the base. The title, body, tags, SEO fields, and attached media are sufficient to represent a press release or health news article.
Disease
Disease entries provide structured clinical metadata alongside the rich-text body, enabling the platform to present symptom lists and prevention guidelines in a consistent, machine-readable format.
| Field | Type | Description |
|---|
icd10Code | string | null | ICD-10 classification code for the disease (e.g. J11 for influenza). |
symptoms | string[] | Structured list of symptom strings for templated display and chatbot retrieval. |
prevention | string | Prevention guidelines in plain text or short prose. |
transmission | string | Description of transmission routes (airborne, contact, vector-borne, etc.). |
isNotifiable | boolean | Whether this disease must be formally reported to health authorities under Mexican epidemiological surveillance regulations. |
Campaign
Campaigns represent time-bounded preventive health initiatives with a defined target population and measurable objective.
| Field | Type | Description |
|---|
startDate | Date | The date the campaign begins. |
endDate | Date | null | The date the campaign ends. Null for open-ended campaigns. |
targetGroup | string | The intended population segment (e.g. “Niños de 0 a 5 años”, “Adultos mayores”). |
objective | string | The campaign’s stated public health objective. |
Program
Programs represent ongoing institutional health programs administered by the Jurisdicción, each identified by an official code and coordinated by a named officer.
| Field | Type | Description |
|---|
programCode | string | Official institutional code that identifies the program (e.g. PROG-DIABETES-2025). |
coordinator | string | Full name of the responsible officer or coordinator for the program. |
isActive | boolean | Whether the program is currently active and accepting participants. |
Event
Events represent scheduled public health activities with a physical or virtual location and optional capacity constraints.
| Field | Type | Description |
|---|
eventDate | Date | The date (and optionally time) the event takes place. |
location | string | Venue name and address, or a virtual meeting URL. |
capacity | number | null | Maximum attendee capacity. Null if the event is open to all. |
registrationUrl | string | null | External URL for attendee registration, if applicable. |
Document
Documents represent official institutional files — protocols, manuals, reports, and forms — stored as PDF assets in the Multimedia Module.
| Field | Type | Description |
|---|
documentType | enum | Category of document: PROTOCOL | MANUAL | REPORT | FORM | OTHER. |
fileAsset | MediaAsset reference | The associated PDF MediaAsset from the Multimedia Module. |
version | string | Version identifier for the document (e.g. "2.1", "2025-Q1"). |
Infographic
Infographics are image-based educational materials. The imageAsset field links to the visual file, and altText ensures accessibility compliance.
| Field | Type | Description |
|---|
imageAsset | MediaAsset reference | The associated image MediaAsset (JPEG, PNG, WebP, or SVG) from the Multimedia Module. |
altText | string | Descriptive accessibility text for the image, required for WCAG compliance. |
FAQ
FAQ entries are discrete question-and-answer pairs organized into categories, designed for quick retrieval by both the public portal and the chatbot.
| Field | Type | Description |
|---|
question | string | The question as it would be asked by a member of the public. |
answer | string | The answer, which may be plain text or Tiptap JSON for richer formatting. |
category | string | Grouping category for display and filtering (e.g. "Vacunación", "Dengue", "Trámites"). |
Creating Content via API
All content types are created through the same /content endpoint. The type field in the request body determines which type-specific fields are validated and persisted. The following example creates a new news item in DRAFT status.
{
"type": "news",
"title": "Campaña de Vacunación contra la Influenza 2025",
"slug": "campana-vacunacion-influenza-2025",
"body": { "type": "doc", "content": [] },
"status": "DRAFT",
"tags": ["vacunación", "influenza", "prevención"],
"seoTitle": "Vacunación contra Influenza — Jurisdicción Sanitaria Huejutla",
"seoDescription": "Inicia la campaña anual de vacunación contra la influenza en la Jurisdicción Sanitaria de Huejutla de Reyes."
}
The slug field is auto-generated from title if omitted. When providing it explicitly, ensure it is lowercase, uses only hyphens as word separators, and is unique across all content types. Duplicate slugs are rejected with a 409 Conflict response.
To create a disease entry, include the type-specific fields (icd10Code, symptoms, prevention, transmission, isNotifiable) alongside the base fields in the same request body. The API validates the complete payload in a single request.