# leonardo-1721/proyecto-programacion architecture

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

- Interactive diagram: https://gitdiagram.com/leonardo-1721/proyecto-programacion
- Repository: https://github.com/leonardo-1721/proyecto-programacion

## Overview

This Django application supports an animal-adoption service: visitors browse available pets and submit adoption requests; administrators authenticate, maintain the pet inventory, and decide requests. Views handle those workflows and call flat-file storage, which keeps pet and request records in text files and synchronizes related statuses. The URL configuration establishes routing, while templates provide the presentation layer. The README is empty, and several view and storage excerpts are incomplete, so the graph omits unverified links and capabilities beyond those visible in the routes and sampled code.

Main entry points: [`myapp/views.py`](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py) (Request views), [`myapp/storage.py`](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/storage.py) (File storage), [`myapp/urls.py`](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/urls.py) (URL routes), [`templates`](https://github.com/leonardo-1721/proyecto-programacion/tree/main/templates) (Page templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and presentation"]
  node_routes["URL routes<br/>[urls.py]"]
  node_views["Request views<br/>[views.py]"]
  node_templates["Page templates"]
end

subgraph group_adoption["Public adoption"]
  node_catalog["Pet discovery<br/>[views.py]"]
  node_application["Adoption request<br/>[views.py]"]
end

subgraph group_admin["Administration"]
  node_admin_login["Admin login<br/>[views.py]"]
  node_pet_admin["Pet management<br/>[views.py]"]
  node_request_admin["Request decisions<br/>[views.py]"]
end

subgraph group_data["Flat-file records"]
  node_storage["File storage<br/>[storage.py]"]
  node_pet_file[("Pet records<br/>[mascotas.txt]")]
  node_request_file[("Adoption records<br/>[solicitudes.txt]")]
end

node_visitor(("Visitor"))
node_admin_user(("Administrator"))

node_visitor -->|"opens pages"| node_routes
node_admin_user -->|"opens admin"| node_routes
node_routes -->|"routes requests"| node_views
node_views -->|"handles browsing"| node_catalog
node_views -->|"handles submissions"| node_application
node_views -->|"handles login"| node_admin_login
node_views -->|"handles inventory"| node_pet_admin
node_views -->|"handles decisions"| node_request_admin
node_views -->|"calls storage"| node_storage
node_storage -->|"reads and writes"| node_pet_file
node_storage -->|"reads and writes"| node_request_file
node_views -->|"renders detail"| node_templates

click node_routes "https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/urls.py"
click node_views "https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py"
click node_templates "https://github.com/leonardo-1721/proyecto-programacion/tree/main/templates"
click node_catalog "https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py"
click node_application "https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py"
click node_admin_login "https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py"
click node_pet_admin "https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py"
click node_request_admin "https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py"
click node_storage "https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/storage.py"
click node_pet_file "https://github.com/leonardo-1721/proyecto-programacion/blob/main/data/mascotas.txt"
click node_request_file "https://github.com/leonardo-1721/proyecto-programacion/blob/main/data/solicitudes.txt"

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_routes,node_views,node_templates toneBlue
class node_catalog,node_application toneAmber
class node_admin_login,node_pet_admin,node_request_admin toneMint
class node_storage,node_pet_file,node_request_file toneRose
class node_visitor,node_admin_user toneIndigo
```

## Components

### Web entry and presentation

- [URL routes](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/urls.py): `myapp/urls.py`
- [Request views](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py): `myapp/views.py`
- [Page templates](https://github.com/leonardo-1721/proyecto-programacion/tree/main/templates): `templates`

### Public adoption

- [Pet discovery](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py): `myapp/views.py`
- [Adoption request](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py): `myapp/views.py`

### Administration

- [Admin login](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py): `myapp/views.py`
- [Pet management](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py): `myapp/views.py`
- [Request decisions](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/views.py): `myapp/views.py`

### Flat-file records

- [File storage](https://github.com/leonardo-1721/proyecto-programacion/blob/main/myapp/storage.py): `myapp/storage.py`
- [Pet records](https://github.com/leonardo-1721/proyecto-programacion/blob/main/data/mascotas.txt): `data/mascotas.txt`
- [Adoption records](https://github.com/leonardo-1721/proyecto-programacion/blob/main/data/solicitudes.txt): `data/solicitudes.txt`

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → URL routes: opens pages (evidence: `myapp/urls.py`)
- Administrator → URL routes: opens admin (evidence: `myapp/urls.py`)
- URL routes → Request views: routes requests (evidence: `myapp/urls.py`)
- Request views → Pet discovery: handles browsing (evidence: `myapp/views.py`)
- Request views → Adoption request: handles submissions (evidence: `myapp/views.py`)
- Request views → Admin login: handles login (evidence: `myapp/views.py`)
- Request views → Pet management: handles inventory (evidence: `myapp/urls.py`)
- Request views → Request decisions: handles decisions (evidence: `myapp/urls.py`)
- Request views → File storage: calls storage (evidence: `myapp/views.py`)
- File storage → Pet records: reads and writes (evidence: `myapp/storage.py`)
- File storage → Adoption records: reads and writes (evidence: `myapp/storage.py`)
- Request views → Page templates: renders detail (evidence: `myapp/views.py`)
