# mrmonkey09/requerimientos_de_sistema architecture

> Architecture diagram of the GitHub repository mrmonkey09/requerimientos_de_sistema, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mrmonkey09/requerimientos_de_sistema
- Repository: https://github.com/mrmonkey09/requerimientos_de_sistema

## Overview

##### Project type and purpose
- This is a full-stack, multi-tenant content management system (CMS) built with Django (Python).
- The README only contains the title “Requerimientos_de_Sistema,” but the file tree shows a Django project named `cms_multitenant` with apps for core functionality (`main`), media management (`media_files`), and tenant isolation (`tenants`).

##### File structure
Top-level:
- `cms_multitenant/` – the Django project root.
- `cms_multitenant/cms_project/` – settings, URL routing, WSGI/ASGI entrypoints.
- `cms_multitenant/manage.py` – Django CLI entry.
- `cms_multitenant/templates/` – HTML templates for views.
- `cms_multitenant/staticfiles/` & `static/` – collected static assets (CSS, JS, images).
- `cms_multitenant/media/` & `cms_multitenant/media_files/` – user-uploaded content storage and Django app for managing media.
- `cms_multitenant/populate_data.py` – data seeding script.
- `.gitignore`, `.gitattributes`, VSCode workspace settings, etc.

Key apps inside `cms_project`:
– `main`: core pages, models for properties, views/templates for home, about, contact, property listings.
– `media_files`: models/views for uploaded media assets.
– `tenants`: middleware, custom auth backend, admin overrides to enforce tenant data isolation.

Configuration & deployment hints:
– `settings.py`: database config, static & media settings, middleware stack.
– `asgi.py`/`wsgi.py`: server entrypoints.
– `urls.py`: URL dispatcher.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    Browser["Browser / Mobile"]:::frontend

    %% Reverse Proxy / Static Server
    Nginx["Nginx (Reverse Proxy & Static Server)"]:::backend

    %% App Server
    AppServer["Gunicorn / Uvicorn (App Server)"]:::backend

    %% Django Project Root
    ProjectRoot["cms_multitenant/"]:::backend

    %% Configuration & Entrypoints
    subgraph "Config & Entrypoints"
        direction TB
        SETTINGS["settings.py"]:::backend
        URLS["urls.py"]:::backend
        ASGI["asgi.py"]:::backend
        WSGI["wsgi.py"]:::backend
        MANAGE["manage.py"]:::backend
    end

    %% Django Apps & Components
    subgraph "Django Project Components"
        direction TB
        MW["TenantMiddleware"]:::backend
        MAIN["main App (Core CMS)"]:::backend
        MEDIA_APP["media_files App"]:::backend
        TENANTS_APP["tenants App"]:::backend
        ADMIN["Django Admin Interface"]:::backend
        ORM["Django ORM"]:::backend
        FileStorage["File Storage (Local FS / S3)"]:::datastore
        DB["Database (PostgreSQL / MySQL)"]:::datastore
        SEED["populate_data.py (Data Seeding Script)"]:::backend
    end

    %% Flows
    Browser -->|HTTP/HTTPS| Nginx
    Browser -->|Static Assets| Nginx
    Nginx -->|WSGI/ASGI| AppServer
    AppServer -->|Launch ASGI| ASGI
    AppServer -->|Launch WSGI| WSGI
    AppServer --> MW
    MW --> MAIN
    MW --> MEDIA_APP
    MW --> TENANTS_APP
    SETTINGS --> MW
    MAIN --> ORM
    MEDIA_APP --> FileStorage
    TENANTS_APP --> ADMIN
    ADMIN --> ORM
    ORM --> DB
    SEED --> ORM

    %% Project Root to Config
    ProjectRoot --> SETTINGS
    ProjectRoot --> URLS
    ProjectRoot --> ASGI
    ProjectRoot --> WSGI
    ProjectRoot --> MANAGE

    %% Click Events
    click ProjectRoot "https://github.com/mrmonkey09/requerimientos_de_sistema/tree/main/cms_multitenant/"
    click MANAGE "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/manage.py"
    click SETTINGS "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/settings.py"
    click ASGI "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/asgi.py"
    click WSGI "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/wsgi.py"
    click URLS "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/urls.py"
    click MAIN "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/main/apps.py"
    click MAIN "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/main/models.py"
    click MAIN "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/main/views.py"
    click MAIN "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/main/urls.py"
    click MAIN "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/main/admin.py"
    click MAIN "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/main/tests.py"
    click MEDIA_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/media_files/apps.py"
    click MEDIA_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/media_files/models.py"
    click MEDIA_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/media_files/views.py"
    click MEDIA_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/media_files/admin.py"
    click MEDIA_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/media_files/tests.py"
    click TENANTS_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/tenants/apps.py"
    click TENANTS_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/tenants/models.py"
    click TENANTS_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/tenants/middleware.py"
    click TENANTS_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/tenants/auth_backend.py"
    click TENANTS_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/tenants/admin.py"
    click TENANTS_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/tenants/admin_forms.py"
    click TENANTS_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/tenants/custom_admin.py"
    click TENANTS_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/tenants/views.py"
    click TENANTS_APP "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/cms_project/tenants/urls.py"
    click SEED "https://github.com/mrmonkey09/requerimientos_de_sistema/blob/main/cms_multitenant/populate_data.py"

    %% Styles
    classDef frontend fill:#D0E6FF,stroke:#0366D6,color:#0366D6;
    classDef backend fill:#E6FFEA,stroke:#28A745,color:#28A745;
    classDef datastore fill:#FFF4E6,stroke:#D46A00,color:#D46A00;
```
