# varunraj26/attendance_login architecture

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

- Interactive diagram: https://gitdiagram.com/varunraj26/attendance_login
- Repository: https://github.com/varunraj26/attendance_login

## Overview

This is a small Flask admin login service backed by SQL Server. A user submits registration or login data to Flask; the handlers validate credentials and read or write admin records, returning JSON. Flask also serves the project’s static files. A separate initializer creates the database schema, including employee, attendance, and sighting tables; no application workflow for those records is shown. The source excerpts establish these connections, but the repository tree does not show the static files themselves.

Main entry points: [`app.py`](https://github.com/varunraj26/attendance_login/blob/master/app.py) (Flask app), [`init_db.py`](https://github.com/varunraj26/attendance_login/blob/master/init_db.py) (Schema initializer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_service["Web service"]
  node_flask["Flask app<br/>[app.py]"]
  node_auth["Admin auth routes<br/>[app.py]"]
end

subgraph group_data["Database"]
  node_initializer["Schema initializer<br/>[init_db.py]"]
  node_sqlserver[("SQL Server")]
end

node_user(("Admin user"))

node_user -->|"HTTP requests"| node_flask
node_flask -->|"routes requests"| node_auth
node_auth -->|"reads and writes"| node_sqlserver
node_initializer -->|"creates tables"| node_sqlserver

click node_flask "https://github.com/varunraj26/attendance_login/blob/master/app.py"
click node_auth "https://github.com/varunraj26/attendance_login/blob/master/app.py"
click node_initializer "https://github.com/varunraj26/attendance_login/blob/master/init_db.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_flask,node_auth,node_user toneBlue
class node_initializer,node_sqlserver toneAmber
```

## Components

### Web service

- [Flask app](https://github.com/varunraj26/attendance_login/blob/master/app.py): `app.py`
- [Admin auth routes](https://github.com/varunraj26/attendance_login/blob/master/app.py): `app.py`

### Database

- [Schema initializer](https://github.com/varunraj26/attendance_login/blob/master/init_db.py): `init_db.py`
- **SQL Server**

### Other components

- **Admin user**

## Connections

- Admin user → Flask app: HTTP requests (evidence: `app.py`)
- Flask app → Admin auth routes: routes requests (evidence: `app.py`)
- Admin auth routes → SQL Server: reads and writes (evidence: `app.py`)
- Schema initializer → SQL Server: creates tables (evidence: `init_db.py`)
