# manikanta-paramkusham/online-certificate-generator architecture

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

- Interactive diagram: https://gitdiagram.com/manikanta-paramkusham/online-certificate-generator
- Repository: https://github.com/manikanta-paramkusham/online-certificate-generator

## Overview

This is a web-based certificate generator. An issuer enters student details manually or uploads a CSV, submits a batch, and receives individual certificate links that can be copied or exported. Recipients can open a verification page or download a designed PDF with a QR code. The app also provides batch retrieval and supports SQLite or PostgreSQL storage. The README is empty; relationships below are limited to those shown in the sampled app, database, PDF, and frontend code.

Main entry points: [`database.py`](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/database.py) (Database access), [`app.py`](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/app.py) (Batch API), [`static/app.js`](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/static/app.js) (Creation UI), [`templates/index.html`](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/templates/index.html) (Generator page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_creation["Batch creation"]
  node_frontend["Creation UI<br/>[app.js]"]
  node_batch_api["Batch API<br/>[app.py]"]
  node_home_page["Generator page<br/>[index.html]"]
  node_batch_lookup["Batch lookup<br/>[app.py]"]
end

subgraph group_delivery["Certificate delivery"]
  node_certificate_page["Verification page<br/>[certificate.html]"]
  node_pdf_download["PDF download<br/>[app.py]"]
  node_pdf_generator["PDF renderer<br/>[pdf_gen.py]"]
end

subgraph group_storage["Persistence"]
  node_database["Database access<br/>[database.py]"]
  node_certificate_store[("Certificate records<br/>[database.py]")]
end

node_issuer(("Issuer"))
node_recipient(("Certificate recipient"))
node_postgres[("PostgreSQL")]
node_sqlite[("SQLite")]

node_issuer -->|"enters students"| node_frontend
node_frontend -->|"posts batch"| node_batch_api
node_batch_api -->|"writes batch"| node_database
node_database -->|"reads and writes"| node_certificate_store
node_database -.->|"connects optionally"| node_postgres
node_database -->|"connects locally"| node_sqlite
node_batch_api -->|"returns links"| node_frontend
node_issuer -->|"opens generator"| node_home_page
node_batch_api -->|"renders"| node_home_page
node_recipient -->|"opens link"| node_certificate_page
node_batch_api -->|"loads certificate"| node_database
node_batch_api -->|"renders certificate"| node_certificate_page
node_recipient -->|"requests PDF"| node_pdf_download
node_pdf_download -->|"loads certificate"| node_database
node_pdf_download -->|"generates PDF"| node_pdf_generator
node_recipient -->|"requests batch"| node_batch_lookup
node_batch_lookup -->|"reads batch"| node_database

click node_frontend "https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/static/app.js"
click node_batch_api "https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/app.py"
click node_database "https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/database.py"
click node_certificate_store "https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/database.py"
click node_certificate_page "https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/templates/certificate.html"
click node_pdf_download "https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/app.py"
click node_pdf_generator "https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/pdf_gen.py"
click node_home_page "https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/templates/index.html"
click node_batch_lookup "https://github.com/manikanta-paramkusham/online-certificate-generator/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_frontend,node_batch_api,node_home_page,node_batch_lookup toneBlue
class node_certificate_page,node_pdf_download,node_pdf_generator,node_postgres,node_sqlite toneAmber
class node_database,node_certificate_store toneMint
class node_issuer,node_recipient toneIndigo
```

## Components

### Batch creation

- [Creation UI](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/static/app.js): `static/app.js`
- [Batch API](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/app.py): `app.py`
- [Generator page](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/templates/index.html): `templates/index.html`
- [Batch lookup](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/app.py): `app.py`

### Certificate delivery

- [Verification page](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/templates/certificate.html): `templates/certificate.html`
- [PDF download](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/app.py): `app.py`
- [PDF renderer](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/pdf_gen.py): `pdf_gen.py`

### Persistence

- [Database access](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/database.py): `database.py`
- [Certificate records](https://github.com/manikanta-paramkusham/online-certificate-generator/blob/main/database.py): `database.py`

### Other components

- **Issuer**
- **Certificate recipient**
- **PostgreSQL**
- **SQLite**

## Connections

- Issuer → Creation UI: enters students (evidence: `static/app.js`)
- Creation UI → Batch API: posts batch (evidence: `static/app.js`)
- Batch API → Database access: writes batch (evidence: `app.py`)
- Database access → Certificate records: reads and writes (evidence: `database.py`)
- Database access → PostgreSQL: connects optionally (evidence: `database.py`)
- Database access → SQLite: connects locally (evidence: `database.py`)
- Batch API → Creation UI: returns links (evidence: `static/app.js`)
- Issuer → Generator page: opens generator
- Batch API → Generator page: renders (evidence: `app.py`)
- Certificate recipient → Verification page: opens link
- Batch API → Database access: loads certificate (evidence: `app.py`)
- Batch API → Verification page: renders certificate (evidence: `app.py`)
- Certificate recipient → PDF download: requests PDF (evidence: `app.py`)
- PDF download → Database access: loads certificate (evidence: `app.py`)
- PDF download → PDF renderer: generates PDF (evidence: `app.py`)
- Certificate recipient → Batch lookup: requests batch (evidence: `app.py`)
- Batch lookup → Database access: reads batch (evidence: `app.py`)
