Skip to main content

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 SSA Health Platform is a specialized Content Management System built for the Jurisdicción Sanitaria de Huejutla de Reyes, a public health jurisdiction in Hidalgo, Mexico. It provides health authorities with a unified, secure, and extensible platform to create, manage, and distribute authoritative public health information — from disease alerts and vaccination campaigns to institutional documents, historical timelines, and an AI-powered citizen chatbot. Every module of the platform is purpose-built for the realities of public-sector health communication: strict accuracy requirements, multilayered access control, and the need to reach citizens across multiple digital channels from a single source of truth.
Documentation is treated as a first-class product artifact in this platform. Every feature, architectural decision, and domain rule is documented before code is written — ensuring long-term maintainability across staff and technology changes.

The Problem It Solves

Before this platform, the Jurisdicción Sanitaria de Huejutla de Reyes had no dedicated institutional portal. Official health information was scattered across personal social media accounts, WhatsApp groups, and improvised static pages — making it impossible to guarantee accuracy, control publication workflows, or maintain an auditable record of what was published and when. Citizens had no reliable digital channel to consult health guidance, and staff had no tools to coordinate content publication across platforms. The SSA Health Platform was built to solve exactly this: replace informal, fragmented communication with a governed, traceable, and institutionally owned information system. Its core mission is captured in a single phrase:
“Publicar información confiable.” — Publish reliable information.

Key Modules

CMS

The core domain module. Manages all content types: News, Diseases, Campaigns, Programs, Events, Announcements, FAQs, Infographics, Documents, and Institutional Information — all built on a shared Content base entity.

Multimedia

Centralized media library for images, videos, PDFs, and audio files. Files are stored once and reused across any number of publications — eliminating duplication and ensuring consistent media governance.

AI Chatbot

A citizen-facing assistant powered by RAG (Retrieval-Augmented Generation). The chatbot answers health questions by performing semantic search against the platform’s own CMS content via pgvector — never a separately trained model.

Social Publishing

Adapter-based integration for publishing content to Facebook, Instagram, X (Twitter), TikTok, and YouTube. Each platform is an independent adapter behind a shared SocialPublisher interface.

Timeline

An administrable historical event timeline. Each event is a full entity with date, period, description, multimedia attachments, categories, and relationships — not static HTML content.

Authentication

Role-based access control using JWT access tokens, Refresh Tokens stored in HttpOnly cookies, and Argon2 password hashing. Every endpoint validates authentication, authorization, DTO integrity, and input sanitization.

Technology Stack

The platform is built on a modern, type-safe stack chosen for long-term maintainability and institutional reliability.

Frontend

TechnologyRole
React + TypeScriptComponent-based UI with full type safety
ViteFast build tooling and local development server
Material UIInstitutional, accessible, responsive design system
React RouterClient-side navigation
TanStack QueryServer state management and data fetching
React Hook Form + ZodForm handling with schema validation
AxiosHTTP client for API communication
Tiptap EditorRich text authoring for CMS content

Backend

TechnologyRole
NestJS + TypeScriptModular, opinionated Node.js framework
Prisma ORMType-safe database access and schema management
PostgreSQLPrimary relational database
pgvectorVector similarity search for the AI chatbot
JWT + Argon2Secure authentication and password hashing

Storage

Local filesystem by default, with the architecture fully prepared to switch to Amazon S3, Azure Blob Storage, or Google Cloud Storage — all storage access goes through a StorageProvider interface, never directly to disk.

Architecture Principles

The platform follows a strict set of software engineering principles applied consistently across every module and every layer of the stack.
PrincipleHow it applies
Clean ArchitectureDomain logic is isolated from frameworks, databases, and HTTP — each layer depends only inward
Modular MonolithIndependent, self-contained modules that minimize cross-cutting dependencies, ready to evolve into microservices
DDD LiteDomain-driven design applied pragmatically: Entities, Value Objects, and bounded module ownership without full CQRS overhead
SOLIDSingle responsibility, open/closed, Liskov substitution, interface segregation, and dependency inversion applied at every class boundary
DRY / KISSNo duplicated logic; standard solutions are preferred over clever ones
Separation of ConcernsControllers hold no business logic; Services own all domain rules; Repositories own all data access
For a full technical breakdown, see the Architecture Overview.

Build docs developers (and LLMs) love