High-Level Architecture
Relevant source files
The following files were used as context for generating this wiki page:
RDM Digital is a civic-territorial digital platform designed as a "smart territory / digital twin" system for Real del Monte, Mexico. The architecture is built upon the TAMV MD-X4 Kernel, a heptafederated model that integrates digital identity, territorial mapping, intelligent tourism, and federated economic operations. It is not merely a landing page but a productive operational stack utilizing a React frontend, domain-specific state stores, and Supabase Edge Functions for critical backend processes.
Sources: README.md:1-25, src/components/rdm/hero.tsx:34-45
The Heptafederated Model
The system is organized into seven distinct federations, each governing a specific domain of the territory's digital life. This "Canon Federado" ensures that technical execution is strictly governed by ontological, constitutional, and memorial frameworks.
Federation Domains
| Federation | Motto / Focus | Key Modules |
|---|---|---|
| Educativa | Knowledge as Sovereignty | utamv, masterclass, biblioteca |
| Cultural | Living Memory | manuscrito, museos, rituales |
| Economica | Sovereign Commerce | mercado, msr, bookpi, stripe |
| Tecnologica | Cognitive Infrastructure | isabella, kernel, nexus, quantum |
| Salud | Federated Wellbeing | telesalud, clinicas |
| Comunicacion | Voice of the Territory | radio, prensa, blog |
| Gubernamental | Digital Sovereignty | protocolos, eoct, citemesh, nodos |
Sources: supabase/migrations/20260512080845_110fe96e-4027-403f-98c8-f6d495c1bf4c.sql:12-30, scripts/002_rdm_seed.sql:8-45
The 7 Civilizational Layers
The architecture follows a strict hierarchy of seven layers where upper layers govern the lower ones.
- L1 Ontological: Defines existence and nature of subjects/territory.
- L2 Constitutional: Defines rights, duties, and sovereignty.
- L3 Political: Jurisdictional power and conflict resolution.
- L4 Economic: Value circulation and sustainability.
- L5 Cognitive: Algorithmic limits and AI governance (Isabella IA).
- L6 Technical: Infrastructure, software, and sensors.
- L7 Memorial: Truth, versioning, and institutional memory.
Sources: src/components/rdm/layers.tsx:3-45
System Component Stack
The platform utilizes a modern web stack designed for real-time operational awareness and decentralized data management.
The diagram above illustrates the interaction between the React frontend, the Supabase serverless backend, and external service integrations.
Sources: README.md:47-65, package.json:20-60
Data Architecture and Persistence
The persistence layer is managed via Supabase (PostgreSQL), featuring a schema that supports federated entities, Points of Interest (POIs), and immutable audit logs.
Primary Data Entities
- Federations: Defines the 7 sovereign domains.
- Repositories: Tracks GitHub repositories classified by federation.
- POIs & Routes: Geospatial data for the digital twin (Leaflet integration).
- Audit Signatures: Immutable SHA-256 logs for protocol executions and resource changes.
- Profiles & User Roles: Manages "Sovereign Identity" (ID-NVIDA) with roles like
tourist,merchant,operator, andadmin.
Sources: supabase/migrations/20260512080845_110fe96e-4027-403f-98c8-f6d495c1bf4c.sql:12-140, supabase/migrations/202605080001_lovable_federated_kernel.sql:50-85
Logic and Execution Flow
Backend logic is decentralized into Supabase Edge Functions, handling specific use cases from repository synchronization to protocol execution.
This sequence shows the github-sync flow, where repositories are fetched, classified according to the Heptafederated model, and persisted.
Sources: supabase/functions/_shared/github.ts:28-60, src/pages/Repositorio.tsx:38-55
Core Operational Modules
- Command Center (Dashboard): Provides real-time telemetry, ECG (Operational Health), and node monitoring.
- Territorio (Digital Twin): A 1:1 digital mirror of Real del Monte using
react-leafletfor mapping POIs and forensic urban monitoring. - Turismo Digital: An operational platform for visitors including maps, cultural narratives, and gamified "Insignias".
- Isabella IA: A multi-agent AI entity governed by a "Statute of Dignity," providing XAI (Explainable AI) with a reasoning threshold of 95%.
Sources: src/App.tsx:30-65, src/components/tourism/tourism-platform.tsx:150-200, src/components/rdm/isabella.tsx:10-50
Conclusion
The RDM Digital architecture represents a transition from "Smart City" to "Sovereign Fortress City." By nesting technical implementation within seven layers of civilizational governance and distributing operations across federated domains, the system ensures territorial autonomy. The integration of immutable ledgers (BookPI™) and Explainable AI (Isabella) provides a robust framework for local digital governance that resists external data extraction models.
Sources: README.md:95-105, src/components/rdm/territory.tsx:10-20