# admitronix-prog/smart-form-validation- architecture

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

- Interactive diagram: https://gitdiagram.com/admitronix-prog/smart-form-validation-
- Repository: https://github.com/admitronix-prog/smart-form-validation-

## Overview

Maatram is a Flask scholarship application portal. Students enter personal and academic details, upload supporting documents, review automated validation, accept a declaration, and submit an application; submission assigns an application number and may notify the student by SMS. The source excerpts support the core route, persistence, document, OCR, validation, and notification components. The README contains only a title, so other product capabilities are not documented; several route-to-screen and detailed workflow links remain unverified.

Main entry points: [`maatram (1)/maatram/maatram/routes_student.py`](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/routes_student.py) (Student routes), [`maatram (1)/maatram/maatram/services.py`](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/services.py) (Application services), [`maatram (1)/maatram/maatram/validation.py`](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/validation.py) (Application validation), [`maatram (1)/maatram/maatram/sms.py`](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/sms.py) (SMS notification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Student portal"]
  node_routes["Student routes<br/>[routes_student.py]"]
  node_forms["Application screens"]
  node_browser["Form interactions"]
end

subgraph group_domain["Application domain"]
  node_models[("Application records<br/>[models.py]")]
  node_services["Application services<br/>[services.py]"]
  node_validators["Field validators<br/>[validators.py]"]
end

subgraph group_documents["Documents and checks"]
  node_documents["Upload handling<br/>[documents.py]"]
  node_validation["Application validation<br/>[validation.py]"]
  node_ocr["Document OCR<br/>[ocr.py]"]
end

subgraph group_platform["Platform services"]
  node_security["Privacy and CSRF<br/>[security.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
  node_sms["SMS notification<br/>[sms.py]"]
end

node_student(("Student"))
node_sms_gateway{{"SMS provider"}}
node_tesseract{{"Tesseract OCR"}}

node_student -.->|"submits forms"| node_routes
node_routes -.->|"renders screens"| node_forms
node_forms -.->|"uses scripts"| node_browser
node_routes -->|"queries records"| node_models
node_routes -->|"calls services"| node_services
node_routes -->|"uses checks"| node_validators
node_routes -->|"handles uploads"| node_documents
node_routes -->|"runs validation"| node_validation
node_routes -->|"uses security"| node_security
node_services -->|"reads and writes"| node_models
node_services -->|"calculates totals"| node_validators
node_services -->|"requests notice"| node_sms
node_validation -->|"persists results"| node_models
node_validation -->|"checks stored files"| node_documents
node_validation -->|"extracts evidence"| node_ocr
node_ocr -->|"resolves file path"| node_documents
node_ocr -->|"runs OCR"| node_tesseract
node_sms -->|"records outcome"| node_models
node_sms -->|"sends message"| node_sms_gateway
node_config -.->|"configures provider"| node_sms

click node_routes "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/routes_student.py"
click node_forms "https://github.com/admitronix-prog/smart-form-validation-/tree/main/maatram%20(1)/maatram/maatram/templates/student"
click node_browser "https://github.com/admitronix-prog/smart-form-validation-/tree/main/maatram%20(1)/maatram/maatram/static/js"
click node_models "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/models.py"
click node_services "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/services.py"
click node_validators "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/validators.py"
click node_documents "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/documents.py"
click node_validation "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/validation.py"
click node_ocr "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/ocr.py"
click node_security "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/security.py"
click node_config "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/config.py"
click node_sms "https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/sms.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_routes,node_forms,node_browser toneBlue
class node_models,node_services,node_validators toneAmber
class node_documents,node_validation,node_ocr toneMint
class node_security,node_config,node_sms toneRose
class node_student,node_sms_gateway,node_tesseract toneIndigo
```

## Components

### Student portal

- [Student routes](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/routes_student.py): `maatram (1)/maatram/maatram/routes_student.py`
- [Application screens](https://github.com/admitronix-prog/smart-form-validation-/tree/main/maatram%20(1)/maatram/maatram/templates/student): `maatram (1)/maatram/maatram/templates/student`
- [Form interactions](https://github.com/admitronix-prog/smart-form-validation-/tree/main/maatram%20(1)/maatram/maatram/static/js): `maatram (1)/maatram/maatram/static/js`

### Application domain

- [Application records](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/models.py): `maatram (1)/maatram/maatram/models.py`
- [Application services](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/services.py): `maatram (1)/maatram/maatram/services.py`
- [Field validators](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/validators.py): `maatram (1)/maatram/maatram/validators.py`

### Documents and checks

- [Upload handling](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/documents.py): `maatram (1)/maatram/maatram/documents.py`
- [Application validation](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/validation.py): `maatram (1)/maatram/maatram/validation.py`
- [Document OCR](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/ocr.py): `maatram (1)/maatram/maatram/ocr.py`

### Platform services

- [Privacy and CSRF](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/security.py): `maatram (1)/maatram/maatram/security.py`
- [Runtime configuration](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/config.py): `maatram (1)/maatram/maatram/config.py`
- [SMS notification](https://github.com/admitronix-prog/smart-form-validation-/blob/main/maatram%20(1)/maatram/maatram/sms.py): `maatram (1)/maatram/maatram/sms.py`

### Other components

- **Student**
- **SMS provider**
- **Tesseract OCR**

## Connections

- Student → Student routes: submits forms
- Student routes → Application screens: renders screens
- Application screens → Form interactions: uses scripts
- Student routes → Application records: queries records (evidence: `maatram (1)/maatram/maatram/routes_student.py`)
- Student routes → Application services: calls services (evidence: `maatram (1)/maatram/maatram/routes_student.py`)
- Student routes → Field validators: uses checks (evidence: `maatram (1)/maatram/maatram/routes_student.py`)
- Student routes → Upload handling: handles uploads (evidence: `maatram (1)/maatram/maatram/routes_student.py`)
- Student routes → Application validation: runs validation (evidence: `maatram (1)/maatram/maatram/routes_student.py`)
- Student routes → Privacy and CSRF: uses security (evidence: `maatram (1)/maatram/maatram/routes_student.py`)
- Application services → Application records: reads and writes (evidence: `maatram (1)/maatram/maatram/services.py`)
- Application services → Field validators: calculates totals (evidence: `maatram (1)/maatram/maatram/services.py`)
- Application services → SMS notification: requests notice (evidence: `maatram (1)/maatram/maatram/services.py`)
- Application validation → Application records: persists results (evidence: `maatram (1)/maatram/maatram/validation.py`)
- Application validation → Upload handling: checks stored files (evidence: `maatram (1)/maatram/maatram/validation.py`)
- Application validation → Document OCR: extracts evidence (evidence: `maatram (1)/maatram/maatram/validation.py`)
- Document OCR → Upload handling: resolves file path (evidence: `maatram (1)/maatram/maatram/ocr.py`)
- Document OCR → Tesseract OCR: runs OCR (evidence: `maatram (1)/maatram/maatram/ocr.py`)
- SMS notification → Application records: records outcome (evidence: `maatram (1)/maatram/maatram/sms.py`)
- SMS notification → SMS provider: sends message (evidence: `maatram (1)/maatram/maatram/sms.py`)
- Runtime configuration → SMS notification: configures provider
