# willianjonhy05/findlogv2 architecture

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

- Interactive diagram: https://gitdiagram.com/willianjonhy05/findlogv2
- Repository: https://github.com/willianjonhy05/findlogv2

## Overview

FindLog is a Django lost-and-found system for institutions. Its main workflow is user login and institution selection, followed by role-specific access to institution and item management; found items can then be claimed and marked returned. The graph also preserves administrative management and the mobile authentication API. Relationships are limited to README statements and references in the supplied SOURCE INDEX; unsampled modules are represented only where the tree supports their role.

Main entry points: [`findlog/views/servidor_views.py`](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/views/servidor_views.py) (Staff operations), [`findlog/models/item.py`](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/models/item.py) (Found item records), [`setup/urls.py`](https://github.com/willianjonhy05/findlogv2/blob/main/setup/urls.py) (Project routes), [`setup/views.py`](https://github.com/willianjonhy05/findlogv2/blob/main/setup/views.py) (Login and institution selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and routing"]
  node_django_routes["Project routes<br/>[urls.py]"]
  node_public_auth["Login and institution selection<br/>[views.py]"]
  node_role_utils["Role and session helpers<br/>[utils.py]"]
  node_role_guards["Role access guards<br/>[decorators.py]"]
  node_user_views["User views<br/>[usuario_views.py]"]
end

subgraph group_operations["Institution operations"]
  node_server_views["Staff operations<br/>[servidor_views.py]"]
  node_server_forms["Staff forms<br/>[item.py]"]
  node_profile_forms["Profile forms<br/>[perfil.py]"]
end

subgraph group_domain["Lost-and-found domain"]
  node_item_model[("Found item records<br/>[item.py]")]
  node_claim_model[("Claim and return records<br/>[reivindicacao.py]")]
  node_institution_model[("Institution records<br/>[instituicao.py]")]
  node_room_model[("Room records<br/>[sala.py]")]
end

subgraph group_admin["Administration and API"]
  node_admin_views["Administration views<br/>[adm_views.py]"]
  node_institution_forms["Institution forms<br/>[instituicao.py]"]
  node_auth_api_routes["Mobile auth routes<br/>[auth_urls.py]"]
  node_auth_api["Mobile authentication API<br/>[auth_views.py]"]
  node_auth_serializer["Token serializer<br/>[auth.py]"]
end

node_visitor(("Browser user"))

node_visitor -->|"requests pages"| node_django_routes
node_django_routes -->|"routes auth"| node_public_auth
node_public_auth -->|"redirects by role"| node_role_utils
node_public_auth -->|"loads institutions"| node_institution_model
node_django_routes -->|"routes admin"| node_admin_views
node_user_views -->|"uses access guards"| node_role_guards
node_server_views -->|"uses access guards"| node_role_guards
node_server_views -->|"uses forms"| node_server_forms
node_server_views -->|"uses forms"| node_profile_forms
node_server_views -->|"queries items"| node_item_model
node_server_views -->|"manages claims"| node_claim_model
node_server_views -->|"manages rooms"| node_room_model
node_server_views -->|"filters institution"| node_institution_model
node_admin_views -->|"uses forms"| node_institution_forms
node_admin_views -->|"manages items"| node_item_model
node_auth_api_routes -->|"routes API"| node_auth_api
node_auth_api -->|"uses serializer"| node_auth_serializer
node_auth_serializer -->|"provides token data"| node_auth_api
node_claim_model -->|"updates item status"| node_item_model
node_item_model -->|"references institution"| node_institution_model
node_claim_model -->|"references return room"| node_room_model

click node_django_routes "https://github.com/willianjonhy05/findlogv2/blob/main/setup/urls.py"
click node_public_auth "https://github.com/willianjonhy05/findlogv2/blob/main/setup/views.py"
click node_role_utils "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/utils.py"
click node_role_guards "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/decorators.py"
click node_user_views "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/views/usuario_views.py"
click node_server_views "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/views/servidor_views.py"
click node_server_forms "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/forms/item.py"
click node_admin_views "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/views/adm_views.py"
click node_institution_forms "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/forms/instituicao.py"
click node_profile_forms "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/forms/perfil.py"
click node_item_model "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/models/item.py"
click node_claim_model "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/models/reivindicacao.py"
click node_institution_model "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/models/instituicao.py"
click node_room_model "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/models/sala.py"
click node_auth_api_routes "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/api/routes/auth_urls.py"
click node_auth_api "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/api/views/auth_views.py"
click node_auth_serializer "https://github.com/willianjonhy05/findlogv2/blob/main/findlog/api/serializers/auth.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_django_routes,node_public_auth,node_role_utils,node_role_guards,node_user_views,node_visitor toneBlue
class node_server_views,node_server_forms,node_profile_forms toneAmber
class node_item_model,node_claim_model,node_institution_model,node_room_model toneMint
class node_admin_views,node_institution_forms,node_auth_api_routes,node_auth_api,node_auth_serializer toneRose
```

## Components

### Access and routing

- [Project routes](https://github.com/willianjonhy05/findlogv2/blob/main/setup/urls.py): `setup/urls.py`
- [Login and institution selection](https://github.com/willianjonhy05/findlogv2/blob/main/setup/views.py): `setup/views.py`
- [Role and session helpers](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/utils.py): `findlog/utils.py`
- [Role access guards](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/decorators.py): `findlog/decorators.py`
- [User views](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/views/usuario_views.py): `findlog/views/usuario_views.py`

### Institution operations

- [Staff operations](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/views/servidor_views.py): `findlog/views/servidor_views.py`
- [Staff forms](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/forms/item.py): `findlog/forms/item.py`
- [Profile forms](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/forms/perfil.py): `findlog/forms/perfil.py`

### Lost-and-found domain

- [Found item records](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/models/item.py): `findlog/models/item.py`
- [Claim and return records](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/models/reivindicacao.py): `findlog/models/reivindicacao.py`
- [Institution records](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/models/instituicao.py): `findlog/models/instituicao.py`
- [Room records](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/models/sala.py): `findlog/models/sala.py`

### Administration and API

- [Administration views](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/views/adm_views.py): `findlog/views/adm_views.py`
- [Institution forms](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/forms/instituicao.py): `findlog/forms/instituicao.py`
- [Mobile auth routes](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/api/routes/auth_urls.py): `findlog/api/routes/auth_urls.py`
- [Mobile authentication API](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/api/views/auth_views.py): `findlog/api/views/auth_views.py`
- [Token serializer](https://github.com/willianjonhy05/findlogv2/blob/main/findlog/api/serializers/auth.py): `findlog/api/serializers/auth.py`

### Other components

- **Browser user**

## Connections

- Browser user → Project routes: requests pages
- Project routes → Login and institution selection: routes auth (evidence: `setup/urls.py`)
- Login and institution selection → Role and session helpers: redirects by role (evidence: `setup/views.py`)
- Login and institution selection → Institution records: loads institutions (evidence: `setup/views.py`)
- Project routes → Administration views: routes admin (evidence: `setup/urls.py`)
- User views → Role access guards: uses access guards (evidence: `findlog/views/usuario_views.py`)
- Staff operations → Role access guards: uses access guards (evidence: `findlog/views/servidor_views.py`)
- Staff operations → Staff forms: uses forms (evidence: `findlog/views/servidor_views.py`)
- Staff operations → Profile forms: uses forms (evidence: `findlog/views/servidor_views.py`)
- Staff operations → Found item records: queries items (evidence: `findlog/views/servidor_views.py`)
- Staff operations → Claim and return records: manages claims (evidence: `findlog/views/servidor_views.py`)
- Staff operations → Room records: manages rooms (evidence: `findlog/views/servidor_views.py`)
- Staff operations → Institution records: filters institution (evidence: `findlog/views/servidor_views.py`)
- Administration views → Institution forms: uses forms (evidence: `findlog/views/adm_views.py`)
- Administration views → Found item records: manages items (evidence: `findlog/views/adm_views.py`)
- Mobile auth routes → Mobile authentication API: routes API (evidence: `findlog/api/routes/auth_urls.py`)
- Mobile authentication API → Token serializer: uses serializer (evidence: `findlog/api/views/auth_views.py`)
- Token serializer → Mobile authentication API: provides token data (evidence: `findlog/api/views/auth_views.py`)
- Claim and return records → Found item records: updates item status (evidence: `findlog/models/reivindicacao.py`)
- Found item records → Institution records: references institution (evidence: `findlog/models/item.py`)
- Claim and return records → Room records: references return room (evidence: `findlog/models/reivindicacao.py`)
