# aashrithapuli/secure-digilocker architecture

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

- Interactive diagram: https://gitdiagram.com/aashrithapuli/secure-digilocker
- Repository: https://github.com/aashrithapuli/secure-digilocker

## Overview

Secure DigiLocker is a single-file Streamlit academic prototype. A user enters a mobile number, then completes PIN, OTP, and dynamic-pattern checks before reaching a simulated document dashboard. Authentication stages, session-state management, and dashboard capabilities all live in app.py; the excerpt does not expose every transition or the performance-analysis implementation, so those relationships are omitted. The README documents prototype capabilities, while sampled text confirms there are no real DigiLocker or SMS integrations.

Main entry points: [`app.py`](https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py) (Session state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication"]
  node_session["Session state<br/>[app.py]"]
  node_otp["OTP checks<br/>[app.py]"]
  node_pattern["Pattern checks<br/>[app.py]"]
  node_pin["PIN check<br/>[app.py]"]
end

subgraph group_app["Application"]
  node_dashboard["Document dashboard<br/>[app.py]"]
  node_documents["Demo documents<br/>[app.py]"]
  node_analysis["Performance analysis<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"starts login"| node_session
node_session -->|"sets PIN stage"| node_pin
node_otp -->|"updates verification"| node_session
node_pattern -->|"updates verification"| node_session
node_user -->|"submits OTP"| node_otp
node_user -->|"enters pattern"| node_pattern
node_user -->|"views documents"| node_dashboard
node_dashboard -->|"displays"| node_documents

click node_session "https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py"
click node_otp "https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py"
click node_pattern "https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py"
click node_pin "https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py"
click node_dashboard "https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py"
click node_documents "https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py"
click node_analysis "https://github.com/aashrithapuli/secure-digilocker/blob/main/app.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_session,node_otp,node_pattern,node_pin,node_user toneBlue
class node_dashboard,node_documents,node_analysis toneAmber
```

## Components

### Authentication

- [Session state](https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py): `app.py`
- [OTP checks](https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py): `app.py`
- [Pattern checks](https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py): `app.py`
- [PIN check](https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py): `app.py`

### Application

- [Document dashboard](https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py): `app.py`
- [Demo documents](https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py): `app.py`
- [Performance analysis](https://github.com/aashrithapuli/secure-digilocker/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → Session state: starts login (evidence: `app.py`)
- Session state → PIN check: sets PIN stage (evidence: `app.py`)
- OTP checks → Session state: updates verification (evidence: `app.py`)
- Pattern checks → Session state: updates verification (evidence: `app.py`)
- User → OTP checks: submits OTP (evidence: `app.py`)
- User → Pattern checks: enters pattern (evidence: `app.py`)
- User → Document dashboard: views documents (evidence: `app.py`)
- Document dashboard → Demo documents: displays (evidence: `app.py`)
