# suryam700/intelligent_ai_attendence_system-face_and_voice architecture

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

- Interactive diagram: https://gitdiagram.com/suryam700/intelligent_ai_attendence_system-face_and_voice
- Repository: https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice

## Overview

SnapClass is a Streamlit face- and voice-enabled attendance system with student and teacher portals. Students register with a face profile and optional voice embedding, sign in by face, enroll in subjects, and review attendance. Teachers manage subjects, scan classroom photos or recorded audio for attendance, and review attendance records. The excerpts show these workflows and Supabase access; teacher-screen source is partial, so some screen-to-dialog wiring is not represented.

Main entry points: [`app.py`](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/app.py) (App router), [`src/screens/student_screen.py`](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/screens/student_screen.py) (Student portal), [`src/screens/teacher_screen.py`](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/screens/teacher_screen.py) (Teacher portal), [`src/database/db.py`](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/database/db.py) (Data access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and portals"]
  node_app["App router<br/>[app.py]"]
  node_home["Portal selection<br/>[home_screen.py]"]
end

subgraph group_student["Student workflows"]
  node_student_screen["Student portal<br/>[student_screen.py]"]
  node_enroll["Subject enrollment<br/>[dialog_enroll.py]"]
  node_quick_enroll["Join-code enrollment"]
end

subgraph group_teacher["Teacher workflows"]
  node_teacher_screen["Teacher portal<br/>[teacher_screen.py]"]
  node_photo_dialog["Class photo capture"]
  node_voice_dialog["Voice attendance"]
  node_attendance_result["Attendance results"]
end

subgraph group_recognition["Recognition pipelines"]
  node_face_pipeline["Face recognition<br/>[face_pipeline.py]"]
  node_voice_pipeline["Voice recognition<br/>[voice_pipeline.py]"]
end

subgraph group_data["Persistence"]
  node_db["Data access<br/>[db.py]"]
  node_config["Database client config<br/>[config.py]"]
end

node_user(("Student or teacher"))
node_supabase[("Supabase")]

node_user -->|"opens"| node_app
node_app -->|"shows portal"| node_home
node_app -->|"routes student"| node_student_screen
node_app -->|"routes teacher"| node_teacher_screen
node_app -->|"dispatches join code"| node_quick_enroll
node_student_screen -->|"checks face"| node_face_pipeline
node_student_screen -->|"embeds enrollment voice"| node_voice_pipeline
node_student_screen -->|"reads and creates profiles"| node_db
node_student_screen -->|"opens enrollment"| node_enroll
node_enroll -->|"enrolls student"| node_db
node_quick_enroll -->|"looks up subject"| node_supabase
node_quick_enroll -->|"uses enrollment action"| node_enroll
node_teacher_screen -->|"opens photo capture"| node_photo_dialog
node_teacher_screen -->|"analyzes photos"| node_face_pipeline
node_teacher_screen -->|"loads teacher data"| node_db
node_teacher_screen -->|"reads enrollment data"| node_supabase
node_voice_dialog -->|"processes audio"| node_voice_pipeline
node_voice_dialog -->|"loads enrolled voices"| node_supabase
node_voice_dialog -->|"shows results"| node_attendance_result
node_db -->|"gets client"| node_config
node_config -->|"configures connection"| node_supabase
node_db -->|"reads and writes"| node_supabase

click node_app "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/app.py"
click node_home "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/screens/home_screen.py"
click node_student_screen "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/screens/student_screen.py"
click node_enroll "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_enroll.py"
click node_quick_enroll "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_auto_enroll.py"
click node_teacher_screen "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/screens/teacher_screen.py"
click node_photo_dialog "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_add_photo.py"
click node_voice_dialog "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_voice_attendance.py"
click node_attendance_result "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_attendance_result.py"
click node_face_pipeline "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/pipelines/face_pipeline.py"
click node_voice_pipeline "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/pipelines/voice_pipeline.py"
click node_db "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/database/db.py"
click node_config "https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/database/config.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_home toneBlue
class node_student_screen,node_enroll,node_quick_enroll,node_supabase toneAmber
class node_teacher_screen,node_photo_dialog,node_voice_dialog,node_attendance_result toneMint
class node_face_pipeline,node_voice_pipeline toneRose
class node_db,node_config,node_user toneIndigo
```

## Components

### App and portals

- [App router](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/app.py): `app.py`
- [Portal selection](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/screens/home_screen.py): `src/screens/home_screen.py`

### Student workflows

- [Student portal](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/screens/student_screen.py): `src/screens/student_screen.py`
- [Subject enrollment](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_enroll.py): `src/components/dialog_enroll.py`
- [Join-code enrollment](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_auto_enroll.py): `src/components/dialog_auto_enroll.py`

### Teacher workflows

- [Teacher portal](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/screens/teacher_screen.py): `src/screens/teacher_screen.py`
- [Class photo capture](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_add_photo.py): `src/components/dialog_add_photo.py`
- [Voice attendance](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_voice_attendance.py): `src/components/dialog_voice_attendance.py`
- [Attendance results](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/components/dialog_attendance_result.py): `src/components/dialog_attendance_result.py`

### Recognition pipelines

- [Face recognition](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/pipelines/face_pipeline.py): `src/pipelines/face_pipeline.py`
- [Voice recognition](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/pipelines/voice_pipeline.py): `src/pipelines/voice_pipeline.py`

### Persistence

- [Data access](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/database/db.py): `src/database/db.py`
- [Database client config](https://github.com/suryam700/intelligent_ai_attendence_system-face_and_voice/blob/main/src/database/config.py): `src/database/config.py`

### Other components

- **Student or teacher**
- **Supabase**

## Connections

- Student or teacher → App router: opens
- App router → Portal selection: shows portal
- App router → Student portal: routes student
- App router → Teacher portal: routes teacher
- App router → Join-code enrollment: dispatches join code
- Student portal → Face recognition: checks face
- Student portal → Voice recognition: embeds enrollment voice
- Student portal → Data access: reads and creates profiles
- Student portal → Subject enrollment: opens enrollment
- Subject enrollment → Data access: enrolls student
- Join-code enrollment → Supabase: looks up subject
- Join-code enrollment → Subject enrollment: uses enrollment action
- Teacher portal → Class photo capture: opens photo capture
- Teacher portal → Face recognition: analyzes photos
- Teacher portal → Data access: loads teacher data
- Teacher portal → Supabase: reads enrollment data
- Voice attendance → Voice recognition: processes audio
- Voice attendance → Supabase: loads enrolled voices
- Voice attendance → Attendance results: shows results
- Data access → Database client config: gets client
- Database client config → Supabase: configures connection
- Data access → Supabase: reads and writes
