The Timeline module preserves the institutional memory of the Jurisdicción Sanitaria de Huejutla de Reyes by maintaining a structured, administrable chronological record of significant public-health events. Rather than hard-coding historical milestones into static pages, every entry is a first-class database entity that administrators can create, enrich, categorise, and retire through the same CMS workflow used for all other content. This design ensures the record stays accurate, grows over time, and can be searched and filtered programmatically — both by the public portal and by the AI chatbot.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.
What Is a Timeline Event?
A Timeline Event is a dated institutional fact — a disease outbreak, a vaccination campaign launch, a programme milestone, or any other moment worth preserving in the public record. Each event is an independent entity with its own lifecycle and the following fields:date— exact date or approximate period expressed as aDateTimeperiod— human-readable label shown to users (e.g."2020–2022")title— short, descriptive event namedescription— rich-text body (authored in the Tiptap editor)category— classification tag (e.g.epidemic,campaign,infrastructure,legislation)mediaIds— references to assets managed by the Multimedia ModulerelatedContent— links to CMS content items that expand on the event- Standard audit fields:
createdAt,updatedAt,deletedAt,createdBy,updatedBy
Timeline Events follow the platform-wide soft-delete convention. Setting
deletedAt hides an event from public views without permanently destroying the historical record.Timeline Event Schema
Every timeline event maps to the following Prisma model. Audit columns are shared across all entities in the system.mediaIds stores UUIDs of MediaAsset records managed by the Multimedia Module. The Timeline module never owns or duplicates media files — it only holds references.
API Reference
All endpoints follow the platform’s REST conventions. Requests to mutating endpoints (POST, PATCH, DELETE) require a valid JWT bearer token.
Query Parameters (GET /timeline)
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by event category (e.g. epidemic) |
year | number | Filter events whose date falls within the year |
from | string | ISO 8601 start date for a date-range filter |
to | string | ISO 8601 end date for a date-range filter |
page | number | Page number (default 1) |
limit | number | Results per page (default 20, max 100) |
order | string | asc (oldest first) or desc (newest first) |
Create a Timeline Event
201 Created with the full event object, including the generated id.
Update a Timeline Event
PATCH body; only the fields provided are updated. The updatedAt and updatedBy columns are set automatically by the service layer.
Delete a Timeline Event
204 No Content. The event is soft-deleted by setting deletedAt to the current timestamp. It no longer appears in public API responses but remains in the database for audit purposes.
Filtering and Views
The timeline API is designed for flexible querying without returning unbounded lists.Filter by Category
Pass
?category=epidemic to retrieve only events classified under that category. Categories are free-form strings; no enumeration is enforced at the API level.Filter by Year or Date Range
Use
?year=2020 for a single year, or combine ?from=2019-01-01&to=2022-12-31 for a custom range. Both parameters are optional and composable.Pagination
All list endpoints return paginated results with
page and limit. The response envelope includes total, page, limit, and data.Sorting
Use
?order=asc to present events oldest-first (ideal for a reading experience) or ?order=desc for newest-first (ideal for a news-feed style view).Example Paginated Response
Frontend Display
The React frontend renders the timeline as a vertical chronological list sorted oldest-to-newest by default. Events are grouped by year, with the year displayed as a prominent section header. Each event card shows:- Title — as the primary heading
- Date / Period — formatted for the
es-MXlocale - Category badge — colour-coded by category
- Thumbnail — the first attached media asset, if any
- Excerpt — the first 160 characters of
description - Related content links — inline chips linking to associated CMS articles
timeline:write permission scope.
Related Modules
Multimedia
Manage the images, videos, and documents attached to timeline events.
CMS Overview
Understand how timeline events relate to the broader content model.
Chatbot
See how timeline data is indexed and surfaced via semantic search.