# mcantonio09/appbloguteq architecture

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

- Interactive diagram: https://gitdiagram.com/mcantonio09/appbloguteq
- Repository: https://github.com/mcantonio09/appbloguteq

## Overview

AppBlogUTEQ is a Flutter blog app backed by a FastAPI API and MySQL. Its main user workflow is account registration or login, browsing blog posts, creating posts with optional images, and commenting. The backend exposes user, login, blog, and comment endpoints, uses schemas for request/response validation and SQLAlchemy models for persistence, and serves uploaded images. The README documents the mobile app’s API connection, but mobile source excerpts were not provided; mobile screen-to-service links are therefore shown as unverified rather than asserted.

Main entry points: [`backend/main.py`](https://github.com/mcantonio09/appbloguteq/blob/main/backend/main.py) (FastAPI endpoints), [`mobile/lib/main.dart`](https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/main.dart) (Flutter app), [`mobile/lib/screen`](https://github.com/mcantonio09/appbloguteq/tree/main/mobile/lib/screen) (Account screens), [`backend/database.py`](https://github.com/mcantonio09/appbloguteq/blob/main/backend/database.py) (DB sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile app"]
  node_mobile_app["Flutter app<br/>[main.dart]"]
  node_auth_screens["Account screens"]
  node_auth_services["Authentication service<br/>[auth_service.dart]"]
  node_blog_screens["Blog screens"]
  node_post_service["Post service<br/>[post_service.dart]"]
  node_comment_service["Comment service"]
  node_user_service["User service<br/>[user_service.dart]"]
  node_map_screen["Map view<br/>[mapa_page.dart]"]
end

subgraph group_api["REST API"]
  node_api["FastAPI endpoints<br/>[main.py]"]
  node_schemas["Request schemas<br/>[schemas.py]"]
end

subgraph group_persistence["Persistence and media"]
  node_db_session["DB sessions<br/>[database.py]"]
  node_orm_models["SQLAlchemy models<br/>[models.py]"]
  node_mysql[("MySQL database<br/>[proyecto_blog.sql]")]
  node_image_store["Uploaded images<br/>[main.py]"]
end

node_reader(("App user"))

node_reader -.->|"uses"| node_mobile_app
node_mobile_app -.->|"offers"| node_auth_screens
node_mobile_app -.->|"offers"| node_blog_screens
node_mobile_app -.->|"offers"| node_map_screen
node_auth_screens -.->|"uses"| node_auth_services
node_blog_screens -.->|"uses"| node_post_service
node_blog_screens -.->|"uses"| node_comment_service
node_auth_screens -.->|"uses"| node_user_service
node_auth_services -.->|"calls API"| node_api
node_user_service -.->|"calls API"| node_api
node_post_service -.->|"calls API"| node_api
node_comment_service -.->|"calls API"| node_api
node_api -->|"validates"| node_schemas
node_api -->|"opens sessions"| node_db_session
node_api -->|"queries and writes"| node_orm_models
node_orm_models -->|"uses base"| node_db_session
node_db_session -.->|"connects"| node_mysql
node_api -->|"writes uploads"| node_image_store

click node_mobile_app "https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/main.dart"
click node_auth_screens "https://github.com/mcantonio09/appbloguteq/tree/main/mobile/lib/screen"
click node_auth_services "https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/services/auth_service.dart"
click node_blog_screens "https://github.com/mcantonio09/appbloguteq/tree/main/mobile/lib/screen"
click node_post_service "https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/services/post_service.dart"
click node_comment_service "https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/services/comentario_service.dart"
click node_user_service "https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/services/user_service.dart"
click node_map_screen "https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/screen/mapa_page.dart"
click node_api "https://github.com/mcantonio09/appbloguteq/blob/main/backend/main.py"
click node_schemas "https://github.com/mcantonio09/appbloguteq/blob/main/backend/schemas.py"
click node_db_session "https://github.com/mcantonio09/appbloguteq/blob/main/backend/database.py"
click node_orm_models "https://github.com/mcantonio09/appbloguteq/blob/main/backend/models.py"
click node_mysql "https://github.com/mcantonio09/appbloguteq/blob/main/database/proyecto_blog.sql"
click node_image_store "https://github.com/mcantonio09/appbloguteq/blob/main/backend/main.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_mobile_app,node_auth_screens,node_auth_services,node_blog_screens,node_post_service,node_comment_service,node_user_service,node_map_screen,node_reader toneBlue
class node_api,node_schemas toneAmber
class node_db_session,node_orm_models,node_mysql,node_image_store toneMint
```

## Components

### Mobile app

- [Flutter app](https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/main.dart): `mobile/lib/main.dart`
- [Account screens](https://github.com/mcantonio09/appbloguteq/tree/main/mobile/lib/screen): `mobile/lib/screen`
- [Authentication service](https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/services/auth_service.dart): `mobile/lib/services/auth_service.dart`
- [Blog screens](https://github.com/mcantonio09/appbloguteq/tree/main/mobile/lib/screen): `mobile/lib/screen`
- [Post service](https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/services/post_service.dart): `mobile/lib/services/post_service.dart`
- [Comment service](https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/services/comentario_service.dart): `mobile/lib/services/comentario_service.dart`
- [User service](https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/services/user_service.dart): `mobile/lib/services/user_service.dart`
- [Map view](https://github.com/mcantonio09/appbloguteq/blob/main/mobile/lib/screen/mapa_page.dart): `mobile/lib/screen/mapa_page.dart`

### REST API

- [FastAPI endpoints](https://github.com/mcantonio09/appbloguteq/blob/main/backend/main.py): `backend/main.py`
- [Request schemas](https://github.com/mcantonio09/appbloguteq/blob/main/backend/schemas.py): `backend/schemas.py`

### Persistence and media

- [DB sessions](https://github.com/mcantonio09/appbloguteq/blob/main/backend/database.py): `backend/database.py`
- [SQLAlchemy models](https://github.com/mcantonio09/appbloguteq/blob/main/backend/models.py): `backend/models.py`
- [MySQL database](https://github.com/mcantonio09/appbloguteq/blob/main/database/proyecto_blog.sql): `database/proyecto_blog.sql`
- [Uploaded images](https://github.com/mcantonio09/appbloguteq/blob/main/backend/main.py): `backend/main.py`

### Other components

- **App user**

## Connections

- App user → Flutter app: uses
- Flutter app → Account screens: offers
- Flutter app → Blog screens: offers
- Flutter app → Map view: offers
- Account screens → Authentication service: uses
- Blog screens → Post service: uses
- Blog screens → Comment service: uses
- Account screens → User service: uses
- Authentication service → FastAPI endpoints: calls API (evidence: `README.md`)
- User service → FastAPI endpoints: calls API (evidence: `README.md`)
- Post service → FastAPI endpoints: calls API (evidence: `README.md`)
- Comment service → FastAPI endpoints: calls API (evidence: `README.md`)
- FastAPI endpoints → Request schemas: validates (evidence: `backend/main.py`)
- FastAPI endpoints → DB sessions: opens sessions (evidence: `backend/main.py`)
- FastAPI endpoints → SQLAlchemy models: queries and writes (evidence: `backend/main.py`)
- SQLAlchemy models → DB sessions: uses base (evidence: `backend/models.py`)
- DB sessions → MySQL database: connects (evidence: `README.md`)
- FastAPI endpoints → Uploaded images: writes uploads (evidence: `backend/main.py`)
