# drodriguez5503/conecta-daw-tfg architecture

> Architecture diagram of the GitHub repository drodriguez5503/conecta-daw-tfg, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/drodriguez5503/conecta-daw-tfg
- Repository: https://github.com/drodriguez5503/conecta-daw-tfg

## Overview

##### Project Type and Purpose
- This is a full-stack web application for managing personal Markdown notes, inspired by Obsidian. The aim is to build a “second digital mind” where ideas are interlinked.
- The backend is a Django-powered API service, while the frontend is an Angular application.

##### Main Components
a. Frontend (Angular Application):
- Located under the “frontend” directory in the file tree.
- Contains a full Angular project with its own configuration files (angular.json, package.json) and numerous components (e.g., header, footer, home, sign-in, sign-up, backoffice with sub-components for connections, folder, note, settings, sidebar, user, etc.).
- This part is responsible for the user interface and interactions, sending requests to the backend and rendering data accordingly.

b. Backend (Django API):
- Found in the “backend” directory. The Django project is named “api_Conecta” and contains multiple Django apps such as api_notes, api_projects, api_themes, and api_users.
- Each app handles a specific domain of functionality (e.g., handling notes, projects, thematic connections, and user management).
- The backend includes standard Django components – settings, URL configuration, WSGI/ASGI entry points, and a manage.py script.

c. Database and Persistence Layer:
- Although not explicitly depicted in the file tree, a relational database (like PostgreSQL or MySQL) is implied as the data store for the Django models.
- This database holds persistent data for notes, projects, themes, and user information.

##### Relationships and Interactions
- The Django backend, in turn, interacts with the database to perform CRUD operations for the various apps (notes, projects, themes, users).
- Other integrations, such as authentication or external services (if any), can be added as separate nodes if they exist or are planned.

##### Architectural Patterns and Technologies
- The backend follows a modular Django structure, grouping functionality into separate apps (API endpoints for notes, projects, etc.), which can be visualized using containers or microservices patterns (if extended).
- The frontend uses Angular’s component-based architecture – different modules manage different parts of the UI and routing.
- The clear separation between the frontend and backend aligns with the modern web application pattern: a decoupled client-server architecture.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Subgraph
    subgraph "Angular Frontend (Conecta)"
        A["Angular Frontend (Conecta)"]:::frontend
        A1["Home Component"]:::frontend
        A2["Sign-In Component"]:::frontend
        A3["Sign-Up Component"]:::frontend
        subgraph "Backoffice Components"
            B1["Conections"]:::frontend
            B2["Folder"]:::frontend
            B3["Note"]:::frontend
            B4["Settings"]:::frontend
            B5["Sidebar"]:::frontend
            B6["User"]:::frontend
        end
        A4["Header Component"]:::frontend
        A5["Footer Component"]:::frontend
    end

    %% Backend Subgraph
    subgraph "Django API (Conecta)"
        D["Django API (Conecta)"]:::backend
        subgraph "Django Configuration"
            D1["Settings"]:::backend
            D2["URLs"]:::backend
            D3["ASGI"]:::backend
            D4["WSGI"]:::backend
            D5["Manage Script"]:::backend
        end
        subgraph "Django Apps"
            D6["api_notes"]:::backend
            D7["api_projects"]:::backend
            D8["api_themes"]:::backend
            D9["api_users"]:::backend
        end
    end

    %% Database Node
    DB(["SQL Database (PostgreSQL/MySQL)"]):::database

    %% Interactions
    A -->|"HTTP/REST"| D
    D -->|"CRUD"| DB

    %% Click Events for Frontend
    click A "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta"
    click A1 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/home"
    click A2 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/sign-in"
    click A3 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/sign-up"
    click B1 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/backoffice/conections"
    click B2 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/backoffice/folder"
    click B3 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/backoffice/note"
    click B4 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/backoffice/settings"
    click B5 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/backoffice/sidebar"
    click B6 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/backoffice/user"
    click A4 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/header"
    click A5 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/frontend/conecta/src/app/footer"

    %% Click Events for Backend
    click D "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/backend/api_Conecta"
    click D1 "https://github.com/drodriguez5503/conecta-daw-tfg/blob/main/backend/api_Conecta/api_Conecta/settings.py"
    click D2 "https://github.com/drodriguez5503/conecta-daw-tfg/blob/main/backend/api_Conecta/api_Conecta/urls.py"
    click D3 "https://github.com/drodriguez5503/conecta-daw-tfg/blob/main/backend/api_Conecta/api_Conecta/asgi.py"
    click D4 "https://github.com/drodriguez5503/conecta-daw-tfg/blob/main/backend/api_Conecta/api_Conecta/wsgi.py"
    click D5 "https://github.com/drodriguez5503/conecta-daw-tfg/blob/main/backend/api_Conecta/manage.py"
    click D6 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/backend/api_Conecta/api_notes"
    click D7 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/backend/api_Conecta/api_projects"
    click D8 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/backend/api_Conecta/api_themes"
    click D9 "https://github.com/drodriguez5503/conecta-daw-tfg/tree/main/backend/api_Conecta/api_users"

    %% Styling Classes
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef database fill:#FFD700,stroke:#000,stroke-width:2px;
```
