# skaswanth07-hue/leaveease architecture

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

- Interactive diagram: https://gitdiagram.com/skaswanth07-hue/leaveease
- Repository: https://github.com/skaswanth07-hue/leaveease

## Overview

LeaveEase is a Flutter hostel leave and outpass management app. Students sign in, submit short outpass or multi-day home-leave requests, check status, and log departure and return; wardens review requests, inspect student histories, flag late returners, and filter records. The README documents Supabase as the backend and PostgreSQL as the database. The Dart screen and client files are identified by the tree, but their implementations were not excerpted, so feature connections below use README evidence; role-based screen routing is left unverified.

Main entry points: [`lib/supabase_client.dart`](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/supabase_client.dart) (Supabase client), [`lib/screens/login_screen.dart`](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/login_screen.dart) (Sign in), [`lib/screens/student_home.dart`](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/student_home.dart) (Student home), [`lib/screens/warden_dashboard.dart`](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/warden_dashboard.dart) (Pending requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access"]
  node_login["Sign in<br/>[login_screen.dart]"]
end

subgraph group_student["Student requests"]
  node_student_home["Student home<br/>[student_home.dart]"]
  node_outpass_form["Outpass form"]
  node_home_leave_form["Home leave form"]
  node_requests["Request status"]
  node_active_pass["Active pass"]
end

subgraph group_warden["Warden operations"]
  node_warden_dashboard["Pending requests"]
  node_history["Student history"]
  node_records["Records filters<br/>[records_view.dart]"]
end

subgraph group_backend["Backend and state"]
  node_supabase_client["Supabase client"]
  node_supabase["Supabase services"]
  node_postgres[("PostgreSQL data")]
end

node_student_actor(("Student"))
node_warden_actor(("Warden"))

node_student_actor -->|"signs in"| node_login
node_warden_actor -->|"signs in"| node_login
node_login -.->|"routes by role"| node_student_home
node_login -.->|"routes by role"| node_warden_dashboard
node_student_actor -->|"uses"| node_student_home
node_student_home -->|"starts request"| node_outpass_form
node_student_home -->|"starts request"| node_home_leave_form
node_student_actor -->|"checks status"| node_requests
node_student_actor -->|"logs movement"| node_active_pass
node_warden_actor -->|"reviews requests"| node_warden_dashboard
node_warden_actor -->|"reviews history"| node_history
node_warden_actor -->|"filters records"| node_records
node_outpass_form -.->|"submits request"| node_supabase_client
node_home_leave_form -.->|"submits request"| node_supabase_client
node_requests -.->|"loads status"| node_supabase_client
node_active_pass -.->|"logs timestamps"| node_supabase_client
node_warden_dashboard -.->|"updates decisions"| node_supabase_client
node_history -.->|"loads history"| node_supabase_client
node_records -.->|"loads records"| node_supabase_client
node_supabase_client -->|"accesses backend"| node_supabase
node_supabase -->|"stores records"| node_postgres

click node_login "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/login_screen.dart"
click node_student_home "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/student_home.dart"
click node_outpass_form "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/new_outpass_form.dart"
click node_home_leave_form "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/new_home_leave_form.dart"
click node_requests "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/student_requests.dart"
click node_active_pass "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/active_pass_screen.dart"
click node_warden_dashboard "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/warden_dashboard.dart"
click node_history "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/student_history_screen.dart"
click node_records "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/records_view.dart"
click node_supabase_client "https://github.com/skaswanth07-hue/leaveease/blob/main/lib/supabase_client.dart"

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_login toneBlue
class node_student_home,node_outpass_form,node_home_leave_form,node_requests,node_active_pass toneAmber
class node_warden_dashboard,node_history,node_records toneMint
class node_supabase_client,node_supabase,node_postgres toneRose
class node_student_actor,node_warden_actor toneIndigo
```

## Components

### Access

- [Sign in](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/login_screen.dart): `lib/screens/login_screen.dart`

### Student requests

- [Student home](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/student_home.dart): `lib/screens/student_home.dart`
- [Outpass form](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/new_outpass_form.dart): `lib/screens/new_outpass_form.dart`
- [Home leave form](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/new_home_leave_form.dart): `lib/screens/new_home_leave_form.dart`
- [Request status](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/student_requests.dart): `lib/screens/student_requests.dart`
- [Active pass](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/active_pass_screen.dart): `lib/screens/active_pass_screen.dart`

### Warden operations

- [Pending requests](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/warden_dashboard.dart): `lib/screens/warden_dashboard.dart`
- [Student history](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/student_history_screen.dart): `lib/screens/student_history_screen.dart`
- [Records filters](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/screens/records_view.dart): `lib/screens/records_view.dart`

### Backend and state

- [Supabase client](https://github.com/skaswanth07-hue/leaveease/blob/main/lib/supabase_client.dart): `lib/supabase_client.dart`
- **Supabase services**
- **PostgreSQL data**

### Other components

- **Student**
- **Warden**

## Connections

- Student → Sign in: signs in (evidence: `README.md`)
- Warden → Sign in: signs in (evidence: `README.md`)
- Sign in → Student home: routes by role
- Sign in → Pending requests: routes by role
- Student → Student home: uses (evidence: `README.md`)
- Student home → Outpass form: starts request (evidence: `README.md`)
- Student home → Home leave form: starts request (evidence: `README.md`)
- Student → Request status: checks status (evidence: `README.md`)
- Student → Active pass: logs movement (evidence: `README.md`)
- Warden → Pending requests: reviews requests (evidence: `README.md`)
- Warden → Student history: reviews history (evidence: `README.md`)
- Warden → Records filters: filters records (evidence: `README.md`)
- Outpass form → Supabase client: submits request
- Home leave form → Supabase client: submits request
- Request status → Supabase client: loads status
- Active pass → Supabase client: logs timestamps
- Pending requests → Supabase client: updates decisions
- Student history → Supabase client: loads history
- Records filters → Supabase client: loads records
- Supabase client → Supabase services: accesses backend (evidence: `README.md`)
- Supabase services → PostgreSQL data: stores records (evidence: `README.md`)
