# ankemravi/facegazebiometricfusionforenhancedpersonalauthentication architecture

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

- Interactive diagram: https://gitdiagram.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication
- Repository: https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication

## Overview

This is a Flask-based gaze authentication application. A user submits credentials, the application checks the MySQL user record and compares a webcam face encoding, then starts gaze tracking; the user follows a generated maze and submits the result for coordinate matching before reaching the success page. The graph also shows the separate face-data enrollment utility and the documented login, gaze, and outcome interfaces. The source excerpts expose the main route and gaze logic; template behavior is represented only at the documented interface level.

Main entry points: [`app.py`](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/app.py) (Flask routes), [`templates/login.html`](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/templates/login.html) (Login page), [`gaze_tracking_module.py`](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/gaze_tracking_module.py) (Gaze capture), [`templates/gaze_auth.html`](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/templates/gaze_auth.html) (Gaze page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web authentication"]
  node_login_ui["Login page<br/>[login.html]"]
  node_web_app["Flask routes<br/>[app.py]"]
  node_credential_check["Credential lookup<br/>[app.py]"]
  node_face_check["Face verification<br/>[app.py]"]
  node_user_db[("Users database")]
  node_gaze_ui["Gaze page<br/>[gaze_auth.html]"]
  node_success_ui["Success page<br/>[success.html]"]
end

subgraph group_gaze["Gaze verification"]
  node_gaze_capture["Gaze capture"]
  node_maze_generation["Maze generation"]
  node_coordinate_match["Coordinate matching"]
end

subgraph group_enrollment["Face enrollment"]
  node_face_enrollment["Face enrollment"]
end

node_user(("User"))
node_browser(("Browser"))

node_user -->|"uses"| node_browser
node_browser -->|"opens"| node_login_ui
node_login_ui -->|"submits credentials"| node_web_app
node_web_app -->|"calls"| node_credential_check
node_credential_check -->|"queries"| node_user_db
node_web_app -->|"verifies face"| node_face_check
node_face_check -->|"reads face data"| node_user_db
node_web_app -->|"renders"| node_gaze_ui
node_web_app -->|"starts tracking"| node_gaze_capture
node_gaze_capture -->|"generates maze"| node_maze_generation
node_browser -->|"follows maze"| node_gaze_ui
node_web_app -->|"checks coordinates"| node_coordinate_match
node_web_app -->|"renders on success"| node_success_ui
node_browser -->|"views outcome"| node_success_ui
node_face_enrollment -->|"inserts face data"| node_user_db

click node_login_ui "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/templates/login.html"
click node_web_app "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/app.py"
click node_credential_check "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/app.py"
click node_face_check "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/app.py"
click node_gaze_ui "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/templates/gaze_auth.html"
click node_success_ui "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/templates/success.html"
click node_gaze_capture "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/gaze_tracking_module.py"
click node_maze_generation "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/gaze_tracking_module.py"
click node_coordinate_match "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/gaze_tracking_module.py"
click node_face_enrollment "https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/insert_face_data.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_login_ui,node_web_app,node_credential_check,node_face_check,node_user_db,node_gaze_ui,node_success_ui,node_user,node_browser toneBlue
class node_gaze_capture,node_maze_generation,node_coordinate_match toneAmber
class node_face_enrollment toneMint
```

## Components

### Web authentication

- [Login page](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/templates/login.html): `templates/login.html`
- [Flask routes](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/app.py): `app.py`
- [Credential lookup](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/app.py): `app.py`
- [Face verification](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/app.py): `app.py`
- **Users database**
- [Gaze page](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/templates/gaze_auth.html): `templates/gaze_auth.html`
- [Success page](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/templates/success.html): `templates/success.html`

### Gaze verification

- [Gaze capture](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/gaze_tracking_module.py): `gaze_tracking_module.py`
- [Maze generation](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/gaze_tracking_module.py): `gaze_tracking_module.py`
- [Coordinate matching](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/gaze_tracking_module.py): `gaze_tracking_module.py`

### Face enrollment

- [Face enrollment](https://github.com/ankemravi/facegazebiometricfusionforenhancedpersonalauthentication/blob/main/insert_face_data.py): `insert_face_data.py`

### Other components

- **User**
- **Browser**

## Connections

- User → Browser: uses (evidence: `README.txt`)
- Browser → Login page: opens (evidence: `README.txt`)
- Login page → Flask routes: submits credentials (evidence: `README.txt`)
- Flask routes → Credential lookup: calls (evidence: `app.py`)
- Credential lookup → Users database: queries (evidence: `app.py`)
- Flask routes → Face verification: verifies face (evidence: `app.py`)
- Face verification → Users database: reads face data (evidence: `app.py`)
- Flask routes → Gaze page: renders (evidence: `app.py`)
- Flask routes → Gaze capture: starts tracking (evidence: `app.py`)
- Gaze capture → Maze generation: generates maze (evidence: `gaze_tracking_module.py`)
- Browser → Gaze page: follows maze (evidence: `README.txt`)
- Flask routes → Coordinate matching: checks coordinates (evidence: `app.py`)
- Flask routes → Success page: renders on success (evidence: `app.py`)
- Browser → Success page: views outcome (evidence: `README.txt`)
- Face enrollment → Users database: inserts face data (evidence: `insert_face_data.py`)
