# henryhengabriel-dotcom/comunidad-vida architecture

> Architecture diagram of the GitHub repository henryhengabriel-dotcom/comunidad-vida, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/henryhengabriel-dotcom/comunidad-vida
- Repository: https://github.com/henryhengabriel-dotcom/comunidad-vida

## Overview

Comunidad Vida is a Flask/MySQL contact-registration site with a separate FastMCP server exposing user CRUD tools to Claude. The web flow renders pages and lists contacts, while form submissions are handled by Flask routes and persisted through the ORM. The MCP flow invokes SQL-backed tools through its own session factory. Major web pages and the MCP capabilities are documented in the README; sampled sources confirm route, configuration, and database wiring. Templates and styling are represented at their exact tree paths; their detailed behavior was not sampled.

Main entry points: [`routes/contacto.py`](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/routes/contacto.py) (Page and contact routes), [`app.py`](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/app.py) (Flask application), [`db_mcp.py`](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/db_mcp.py) (MCP database sessions), [`utils/db.py`](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/utils/db.py) (SQLAlchemy extension)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_web_app["Flask application<br/>[app.py]"]
  node_web_routes["Page and contact routes<br/>[contacto.py]"]
  node_home_page["Home page<br/>[home.html]"]
  node_about_page["About page<br/>[acerca.html]"]
  node_contact_page["Contact form and list<br/>[contactanos.html]"]
  node_browser_behavior["Browser interactions<br/>[main.js]"]
end

subgraph group_persistence["Configuration and data"]
  node_app_config["Flask configuration<br/>[config.py]"]
  node_orm_extension["SQLAlchemy extension<br/>[db.py]"]
  node_user_model["User model<br/>[usuarios.py]"]
  node_mysql[("MySQL database")]
end

subgraph group_mcp["MCP integration"]
  node_mcp_server["MCP CRUD tools<br/>[servidor_mcp.py]"]
  node_mcp_sessions["MCP database sessions<br/>[db_mcp.py]"]
end

node_visitor(("Community visitor"))
node_claude(("Claude Desktop"))

node_visitor -->|"requests pages"| node_web_routes
node_web_app -->|"registers routes"| node_web_routes
node_web_app -->|"loads config"| node_app_config
node_web_app -->|"initializes ORM"| node_orm_extension
node_web_routes -->|"renders"| node_home_page
node_web_routes -->|"renders"| node_about_page
node_web_routes -->|"renders"| node_contact_page
node_web_routes -->|"queries and creates"| node_user_model
node_user_model -->|"defines table with"| node_orm_extension
node_orm_extension -.->|"persists records"| node_mysql
node_claude -->|"invokes tools"| node_mcp_server
node_mcp_server -->|"gets sessions"| node_mcp_sessions
node_mcp_sessions -->|"reads database config"| node_web_app
node_mcp_sessions -.->|"opens sessions"| node_mysql
node_web_routes -.->|"form behavior"| node_browser_behavior

click node_web_app "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/app.py"
click node_web_routes "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/routes/contacto.py"
click node_home_page "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/templates/home.html"
click node_about_page "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/templates/acerca.html"
click node_contact_page "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/templates/contactanos.html"
click node_browser_behavior "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/static/js/main.js"
click node_app_config "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/config/config.py"
click node_orm_extension "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/utils/db.py"
click node_user_model "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/models/usuarios.py"
click node_mcp_server "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/servidor_mcp.py"
click node_mcp_sessions "https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/db_mcp.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web_app,node_web_routes,node_home_page,node_about_page,node_contact_page,node_browser_behavior toneBlue
class node_app_config,node_orm_extension,node_user_model,node_mysql toneAmber
class node_mcp_server,node_mcp_sessions toneMint
class node_visitor,node_claude toneIndigo
```

## Components

### Web experience

- [Flask application](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/app.py): `app.py`
- [Page and contact routes](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/routes/contacto.py): `routes/contacto.py`
- [Home page](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/templates/home.html): `templates/home.html`
- [About page](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/templates/acerca.html): `templates/acerca.html`
- [Contact form and list](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/templates/contactanos.html): `templates/contactanos.html`
- [Browser interactions](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/static/js/main.js): `static/js/main.js`

### Configuration and data

- [Flask configuration](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/config/config.py): `config/config.py`
- [SQLAlchemy extension](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/utils/db.py): `utils/db.py`
- [User model](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/models/usuarios.py): `models/usuarios.py`
- **MySQL database**

### MCP integration

- [MCP CRUD tools](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/servidor_mcp.py): `servidor_mcp.py`
- [MCP database sessions](https://github.com/henryhengabriel-dotcom/comunidad-vida/blob/main/db_mcp.py): `db_mcp.py`

### Other components

- **Community visitor**
- **Claude Desktop**

## Connections

- Community visitor → Page and contact routes: requests pages (evidence: `README.md`)
- Flask application → Page and contact routes: registers routes (evidence: `app.py`)
- Flask application → Flask configuration: loads config (evidence: `app.py`)
- Flask application → SQLAlchemy extension: initializes ORM (evidence: `app.py`)
- Page and contact routes → Home page: renders (evidence: `routes/contacto.py`)
- Page and contact routes → About page: renders (evidence: `routes/contacto.py`)
- Page and contact routes → Contact form and list: renders (evidence: `routes/contacto.py`)
- Page and contact routes → User model: queries and creates (evidence: `routes/contacto.py`)
- User model → SQLAlchemy extension: defines table with (evidence: `models/usuarios.py`)
- SQLAlchemy extension → MySQL database: persists records
- Claude Desktop → MCP CRUD tools: invokes tools (evidence: `README.md`)
- MCP CRUD tools → MCP database sessions: gets sessions (evidence: `servidor_mcp.py`)
- MCP database sessions → Flask application: reads database config (evidence: `db_mcp.py`)
- MCP database sessions → MySQL database: opens sessions
- Page and contact routes → Browser interactions: form behavior
