# matheuz-rodrigues/sigre architecture

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

- Interactive diagram: https://gitdiagram.com/matheuz-rodrigues/sigre
- Repository: https://github.com/matheuz-rodrigues/sigre

## Overview

SIGRA manages academic room reservations through a React interface and a FastAPI backend. The main user journey is authentication, then creating or viewing schedules and room requests; reservation rules, approval/status handling, and optional Google Calendar synchronization support that workflow. Administrators also manage academic and room data and access dashboards and reports. The tree and excerpts establish the application entry points and several backend service responsibilities, but do not show router-to-service wiring or most frontend API calls, so those links are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/App.jsx) (App and routing), [`backend/app/services/booking/reservation_service.py`](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/booking/reservation_service.py) (Reservation service), [`backend/app/try_database.py`](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/try_database.py) (SQL database), [`frontend/src/components/UserView/UserView.jsx`](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/UserView/UserView.jsx) (User workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["App and routing<br/>[App.jsx]"]
  node_login["Login UI<br/>[Login.jsx]"]
  node_user_view["User workspace<br/>[UserView.jsx]"]
  node_admin_view["Admin protection<br/>[Protection.jsx]"]
  node_schedule_ui["Schedule workflow<br/>[ScheduleViiew.jsx]"]
  node_schedule_form["Schedule form<br/>[ScheduleForm.jsx]"]
  node_room_request["Room requests"]
  node_calendar_ui["Calendar view<br/>[MonthCalendar.jsx]"]
  node_admin_data["Data management<br/>[DataManager.jsx]"]
  node_auth_front["Auth client<br/>[AuthService.js]"]
end

subgraph group_api["API and domain"]
  node_api_entry["FastAPI application<br/>[main.py]"]
  node_routers["HTTP routers"]
  node_auth_domain["Authentication rules<br/>[auth_service.py]"]
  node_booking["Reservation service"]
  node_solicitations["Solicitation service"]
  node_entities["Entity services"]
  node_reports["Reporting service<br/>[report_service.py]"]
  node_calendar_service["Calendar integration<br/>[google_calendar.py]"]
end

subgraph group_data["Persistence"]
  node_allocation_repo["Allocation repository"]
  node_models["Domain models"]
  node_database[("SQL database<br/>[try_database.py]")]
end

subgraph group_integrations["External integrations"]
  node_google["Google Calendar"]
end

node_user(("Campus user"))

node_user -->|"uses"| node_app
node_app -->|"shows"| node_login
node_app -->|"routes users"| node_user_view
node_app -->|"routes admins"| node_admin_view
node_app -->|"shows schedules"| node_schedule_ui
node_app -->|"fetches profile"| node_auth_front
node_schedule_ui -->|"opens form"| node_schedule_form
node_user_view -->|"offers requests"| node_room_request
node_api_entry -->|"registers routes"| node_routers
node_booking -->|"queries allocations"| node_allocation_repo
node_allocation_repo -->|"loads allocation"| node_models
node_booking -->|"queries and commits"| node_database
node_auth_domain -->|"queries and commits"| node_database
node_reports -->|"queries report data"| node_database
node_booking -.->|"syncs events"| node_google
node_calendar_service -.->|"integrates calendar"| node_google

click node_app "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/App.jsx"
click node_login "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Login/Login.jsx"
click node_user_view "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/UserView/UserView.jsx"
click node_admin_view "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Protection/Protection.jsx"
click node_schedule_ui "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Schedule/ScheduleViiew.jsx"
click node_schedule_form "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Schedule/ScheduleForm.jsx"
click node_room_request "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/UserView/RoomRequestForm.jsx"
click node_calendar_ui "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Calendar/MonthCalendar.jsx"
click node_admin_data "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/AdminPainel/DataManager.jsx"
click node_auth_front "https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/services/AuthService.js"
click node_api_entry "https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/main.py"
click node_routers "https://github.com/matheuz-rodrigues/sigre/tree/main/backend/app/routers"
click node_auth_domain "https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/auth/auth_service.py"
click node_booking "https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/booking/reservation_service.py"
click node_solicitations "https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/booking/solicitation_service.py"
click node_entities "https://github.com/matheuz-rodrigues/sigre/tree/main/backend/app/services/entities"
click node_reports "https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/reporting/report_service.py"
click node_calendar_service "https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/calendar/google_calendar.py"
click node_allocation_repo "https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/repositories/allocation_repository.py"
click node_models "https://github.com/matheuz-rodrigues/sigre/tree/main/backend/app/models"
click node_database "https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/try_database.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_app,node_login,node_user_view,node_admin_view,node_schedule_ui,node_schedule_form,node_room_request,node_calendar_ui,node_admin_data,node_auth_front,node_user toneBlue
class node_api_entry,node_routers,node_auth_domain,node_booking,node_solicitations,node_entities,node_reports,node_calendar_service toneAmber
class node_allocation_repo,node_models,node_database toneMint
class node_google toneRose
```

## Components

### Web application

- [App and routing](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login UI](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Login/Login.jsx): `frontend/src/components/Login/Login.jsx`
- [User workspace](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/UserView/UserView.jsx): `frontend/src/components/UserView/UserView.jsx`
- [Admin protection](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Protection/Protection.jsx): `frontend/src/components/Protection/Protection.jsx`
- [Schedule workflow](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Schedule/ScheduleViiew.jsx): `frontend/src/components/Schedule/ScheduleViiew.jsx`
- [Schedule form](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Schedule/ScheduleForm.jsx): `frontend/src/components/Schedule/ScheduleForm.jsx`
- [Room requests](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/UserView/RoomRequestForm.jsx): `frontend/src/components/UserView/RoomRequestForm.jsx`
- [Calendar view](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/Calendar/MonthCalendar.jsx): `frontend/src/components/Calendar/MonthCalendar.jsx`
- [Data management](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/components/AdminPainel/DataManager.jsx): `frontend/src/components/AdminPainel/DataManager.jsx`
- [Auth client](https://github.com/matheuz-rodrigues/sigre/blob/main/frontend/src/services/AuthService.js): `frontend/src/services/AuthService.js`

### API and domain

- [FastAPI application](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/main.py): `backend/app/main.py`
- [HTTP routers](https://github.com/matheuz-rodrigues/sigre/tree/main/backend/app/routers): `backend/app/routers`
- [Authentication rules](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/auth/auth_service.py): `backend/app/services/auth/auth_service.py`
- [Reservation service](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/booking/reservation_service.py): `backend/app/services/booking/reservation_service.py`
- [Solicitation service](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/booking/solicitation_service.py): `backend/app/services/booking/solicitation_service.py`
- [Entity services](https://github.com/matheuz-rodrigues/sigre/tree/main/backend/app/services/entities): `backend/app/services/entities`
- [Reporting service](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/reporting/report_service.py): `backend/app/services/reporting/report_service.py`
- [Calendar integration](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/services/calendar/google_calendar.py): `backend/app/services/calendar/google_calendar.py`

### Persistence

- [Allocation repository](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/repositories/allocation_repository.py): `backend/app/repositories/allocation_repository.py`
- [Domain models](https://github.com/matheuz-rodrigues/sigre/tree/main/backend/app/models): `backend/app/models`
- [SQL database](https://github.com/matheuz-rodrigues/sigre/blob/main/backend/app/try_database.py): `backend/app/try_database.py`

### External integrations

- **Google Calendar**

### Other components

- **Campus user**

## Connections

- Campus user → App and routing: uses
- App and routing → Login UI: shows
- App and routing → User workspace: routes users
- App and routing → Admin protection: routes admins
- App and routing → Schedule workflow: shows schedules
- App and routing → Auth client: fetches profile
- Schedule workflow → Schedule form: opens form
- User workspace → Room requests: offers requests
- FastAPI application → HTTP routers: registers routes
- Reservation service → Allocation repository: queries allocations
- Allocation repository → Domain models: loads allocation
- Reservation service → SQL database: queries and commits
- Authentication rules → SQL database: queries and commits
- Reporting service → SQL database: queries report data
- Reservation service → Google Calendar: syncs events
- Calendar integration → Google Calendar: integrates calendar
