# revanthdigajari/attendify architecture

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

- Interactive diagram: https://gitdiagram.com/revanthdigajari/attendify
- Repository: https://github.com/revanthdigajari/attendify

## Overview

Attendify combines an administrative attendance dashboard with a FastAPI backend for authentication, administration, and teacher/student attendance workflows. The visible admin frontend initializes dashboard data and local state, then presents student, teacher, mapping, and attendance views; its sampled attendance actions update local state rather than showing API calls. The backend exposes separate routers, with face verification, geofencing, and session checks supporting attendance workflows. The README is empty, and the listed Android projects contain no application source in this tree, so their runtime roles and frontend-to-backend wiring cannot be established here.

Main entry points: [`admin/frontend/src/App.tsx`](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/App.tsx) (Dashboard app), [`backend/app/main.py`](https://github.com/revanthdigajari/attendify/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/routers/student.py`](https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/student.py) (Student attendance), [`backend/app/database.py`](https://github.com/revanthdigajari/attendify/blob/main/backend/app/database.py) (Database access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin_ui["Admin dashboard"]
  node_admin_app["Dashboard app<br/>[App.tsx]"]
  node_student_view["Students view<br/>[Students.tsx]"]
  node_attendance_view["Attendance view<br/>[Attendance.tsx]"]
  node_dashboard_view["Dashboard view<br/>[Dashboard.tsx]"]
  node_teacher_view["Teachers view<br/>[Teachers.tsx]"]
  node_mapping_view["Mappings view<br/>[Mappings.tsx]"]
  node_student_state["Student state<br/>[useStudents.ts]"]
  node_attendance_state["Attendance state<br/>[useAttendance.ts]"]
  node_mock_data["Sample data<br/>[mockData.ts]"]
  node_shared_components["UI components"]
end

subgraph group_api["Backend API"]
  node_api_service["FastAPI app<br/>[main.py]"]
  node_auth_routes["Authentication<br/>[auth.py]"]
  node_admin_routes["Admin operations<br/>[admin.py]"]
  node_teacher_routes["Teacher operations<br/>[teacher.py]"]
  node_student_routes["Student attendance<br/>[student.py]"]
  node_health_routes["Health checks<br/>[health.py]"]
end

subgraph group_attendance_services["Attendance services"]
  node_face_service["Face verification<br/>[face_service.py]"]
  node_geofence["Location checks<br/>[geofence.py]"]
  node_session_security["Session checks"]
end

subgraph group_persistence["Identity and storage"]
  node_security["Token security<br/>[security.py]"]
  node_user_model["User records<br/>[user.py]"]
  node_manual_attendance["Manual records"]
  node_database[("Database access<br/>[database.py]")]
end

node_admin_operator(("Admin operator"))

node_admin_operator -->|"uses"| node_admin_app
node_admin_app -->|"renders"| node_student_view
node_admin_app -->|"renders"| node_attendance_view
node_admin_app -->|"renders"| node_dashboard_view
node_admin_app -->|"renders"| node_teacher_view
node_admin_app -->|"renders"| node_mapping_view
node_admin_app -->|"uses"| node_student_state
node_admin_app -->|"uses"| node_attendance_state
node_admin_app -->|"initializes"| node_mock_data
node_student_view -->|"uses"| node_shared_components
node_attendance_view -->|"uses"| node_shared_components
node_teacher_view -->|"uses"| node_shared_components
node_mapping_view -->|"uses"| node_shared_components
node_api_service -->|"registers"| node_health_routes
node_api_service -->|"registers"| node_auth_routes
node_api_service -->|"registers"| node_admin_routes
node_api_service -->|"registers"| node_teacher_routes
node_api_service -->|"registers"| node_student_routes
node_api_service -->|"warms model"| node_face_service
node_auth_routes -->|"queries via"| node_database
node_auth_routes -->|"reads"| node_user_model
node_auth_routes -->|"creates token"| node_security
node_admin_routes -->|"uses"| node_database
node_admin_routes -->|"checks access"| node_security
node_admin_routes -->|"uses"| node_user_model
node_admin_routes -->|"uses"| node_manual_attendance
node_teacher_routes -->|"uses"| node_database
node_teacher_routes -->|"checks access"| node_security
node_teacher_routes -->|"checks location"| node_geofence
node_teacher_routes -->|"checks session"| node_session_security
node_student_routes -->|"uses"| node_database
node_student_routes -->|"checks access"| node_security
node_student_routes -->|"verifies face"| node_face_service
node_student_routes -->|"checks location"| node_geofence
node_student_routes -->|"checks session"| node_session_security
node_health_routes -->|"uses"| node_database
node_health_routes -->|"uses"| node_security
node_user_model -->|"uses base"| node_database
node_manual_attendance -->|"uses base"| node_database

click node_admin_app "https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/App.tsx"
click node_student_view "https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Students.tsx"
click node_attendance_view "https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Attendance.tsx"
click node_dashboard_view "https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Dashboard.tsx"
click node_teacher_view "https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Teachers.tsx"
click node_mapping_view "https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Mappings.tsx"
click node_student_state "https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/hooks/useStudents.ts"
click node_attendance_state "https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/hooks/useAttendance.ts"
click node_mock_data "https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/data/mockData.ts"
click node_shared_components "https://github.com/revanthdigajari/attendify/tree/main/admin/frontend/src/components"
click node_api_service "https://github.com/revanthdigajari/attendify/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/auth.py"
click node_admin_routes "https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/admin.py"
click node_teacher_routes "https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/teacher.py"
click node_student_routes "https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/student.py"
click node_health_routes "https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/health.py"
click node_face_service "https://github.com/revanthdigajari/attendify/blob/main/backend/app/services/face_service.py"
click node_geofence "https://github.com/revanthdigajari/attendify/blob/main/backend/app/services/geofence.py"
click node_session_security "https://github.com/revanthdigajari/attendify/blob/main/backend/app/services/session_security.py"
click node_security "https://github.com/revanthdigajari/attendify/blob/main/backend/app/core/security.py"
click node_user_model "https://github.com/revanthdigajari/attendify/blob/main/backend/app/models/user.py"
click node_manual_attendance "https://github.com/revanthdigajari/attendify/blob/main/backend/app/models/manual_attendance.py"
click node_database "https://github.com/revanthdigajari/attendify/blob/main/backend/app/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_admin_app,node_student_view,node_attendance_view,node_dashboard_view,node_teacher_view,node_mapping_view,node_student_state,node_attendance_state,node_mock_data,node_shared_components toneBlue
class node_api_service,node_auth_routes,node_admin_routes,node_teacher_routes,node_student_routes,node_health_routes toneAmber
class node_face_service,node_geofence,node_session_security toneMint
class node_security,node_user_model,node_manual_attendance,node_database toneRose
class node_admin_operator toneIndigo
```

## Components

### Admin dashboard

- [Dashboard app](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/App.tsx): `admin/frontend/src/App.tsx`
- [Students view](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Students.tsx): `admin/frontend/src/pages/Students.tsx`
- [Attendance view](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Attendance.tsx): `admin/frontend/src/pages/Attendance.tsx`
- [Dashboard view](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Dashboard.tsx): `admin/frontend/src/pages/Dashboard.tsx`
- [Teachers view](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Teachers.tsx): `admin/frontend/src/pages/Teachers.tsx`
- [Mappings view](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/pages/Mappings.tsx): `admin/frontend/src/pages/Mappings.tsx`
- [Student state](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/hooks/useStudents.ts): `admin/frontend/src/hooks/useStudents.ts`
- [Attendance state](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/hooks/useAttendance.ts): `admin/frontend/src/hooks/useAttendance.ts`
- [Sample data](https://github.com/revanthdigajari/attendify/blob/main/admin/frontend/src/data/mockData.ts): `admin/frontend/src/data/mockData.ts`
- [UI components](https://github.com/revanthdigajari/attendify/tree/main/admin/frontend/src/components): `admin/frontend/src/components`

### Backend API

- [FastAPI app](https://github.com/revanthdigajari/attendify/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Admin operations](https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/admin.py): `backend/app/routers/admin.py`
- [Teacher operations](https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/teacher.py): `backend/app/routers/teacher.py`
- [Student attendance](https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/student.py): `backend/app/routers/student.py`
- [Health checks](https://github.com/revanthdigajari/attendify/blob/main/backend/app/routers/health.py): `backend/app/routers/health.py`

### Attendance services

- [Face verification](https://github.com/revanthdigajari/attendify/blob/main/backend/app/services/face_service.py): `backend/app/services/face_service.py`
- [Location checks](https://github.com/revanthdigajari/attendify/blob/main/backend/app/services/geofence.py): `backend/app/services/geofence.py`
- [Session checks](https://github.com/revanthdigajari/attendify/blob/main/backend/app/services/session_security.py): `backend/app/services/session_security.py`

### Identity and storage

- [Token security](https://github.com/revanthdigajari/attendify/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [User records](https://github.com/revanthdigajari/attendify/blob/main/backend/app/models/user.py): `backend/app/models/user.py`
- [Manual records](https://github.com/revanthdigajari/attendify/blob/main/backend/app/models/manual_attendance.py): `backend/app/models/manual_attendance.py`
- [Database access](https://github.com/revanthdigajari/attendify/blob/main/backend/app/database.py): `backend/app/database.py`

### Other components

- **Admin operator**

## Connections

- Admin operator → Dashboard app: uses
- Dashboard app → Students view: renders (evidence: `admin/frontend/src/App.tsx`)
- Dashboard app → Attendance view: renders (evidence: `admin/frontend/src/App.tsx`)
- Dashboard app → Dashboard view: renders (evidence: `admin/frontend/src/App.tsx`)
- Dashboard app → Teachers view: renders (evidence: `admin/frontend/src/App.tsx`)
- Dashboard app → Mappings view: renders (evidence: `admin/frontend/src/App.tsx`)
- Dashboard app → Student state: uses (evidence: `admin/frontend/src/App.tsx`)
- Dashboard app → Attendance state: uses (evidence: `admin/frontend/src/App.tsx`)
- Dashboard app → Sample data: initializes (evidence: `admin/frontend/src/App.tsx`)
- Students view → UI components: uses (evidence: `admin/frontend/src/pages/Students.tsx`)
- Attendance view → UI components: uses (evidence: `admin/frontend/src/pages/Attendance.tsx`)
- Teachers view → UI components: uses (evidence: `admin/frontend/src/pages/Teachers.tsx`)
- Mappings view → UI components: uses (evidence: `admin/frontend/src/pages/Mappings.tsx`)
- FastAPI app → Health checks: registers (evidence: `backend/app/main.py`)
- FastAPI app → Authentication: registers (evidence: `backend/app/main.py`)
- FastAPI app → Admin operations: registers (evidence: `backend/app/main.py`)
- FastAPI app → Teacher operations: registers (evidence: `backend/app/main.py`)
- FastAPI app → Student attendance: registers (evidence: `backend/app/main.py`)
- FastAPI app → Face verification: warms model (evidence: `backend/app/main.py`)
- Authentication → Database access: queries via (evidence: `backend/app/routers/auth.py`)
- Authentication → User records: reads (evidence: `backend/app/routers/auth.py`)
- Authentication → Token security: creates token (evidence: `backend/app/routers/auth.py`)
- Admin operations → Database access: uses (evidence: `backend/app/routers/admin.py`)
- Admin operations → Token security: checks access (evidence: `backend/app/routers/admin.py`)
- Admin operations → User records: uses (evidence: `backend/app/routers/admin.py`)
- Admin operations → Manual records: uses (evidence: `backend/app/routers/admin.py`)
- Teacher operations → Database access: uses (evidence: `backend/app/routers/teacher.py`)
- Teacher operations → Token security: checks access (evidence: `backend/app/routers/teacher.py`)
- Teacher operations → Location checks: checks location (evidence: `backend/app/routers/teacher.py`)
- Teacher operations → Session checks: checks session (evidence: `backend/app/routers/teacher.py`)
- Student attendance → Database access: uses (evidence: `backend/app/routers/student.py`)
- Student attendance → Token security: checks access (evidence: `backend/app/routers/student.py`)
- Student attendance → Face verification: verifies face (evidence: `backend/app/routers/student.py`)
- Student attendance → Location checks: checks location (evidence: `backend/app/routers/student.py`)
- Student attendance → Session checks: checks session (evidence: `backend/app/routers/student.py`)
- Health checks → Database access: uses (evidence: `backend/app/routers/health.py`)
- Health checks → Token security: uses (evidence: `backend/app/routers/health.py`)
- User records → Database access: uses base (evidence: `backend/app/models/user.py`)
- Manual records → Database access: uses base (evidence: `backend/app/models/manual_attendance.py`)
