# basavarajathani-spec/secure-steganography architecture

> Architecture diagram of the GitHub repository basavarajathani-spec/secure-steganography, 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/basavarajathani-spec/secure-steganography
- Repository: https://github.com/basavarajathani-spec/secure-steganography

## Overview

Secure Image Transmission is a React/FastAPI application for encrypting an image, hiding its ciphertext in a lossless video, and recovering the image with the user-held key. The main workflow runs from the Encrypt or Decrypt page through the API service to FastAPI routes, which coordinate AES, payload framing, and video steganography. The graph also shows the landing page and shared upload/progress UI. Some frontend and backend relationships are documented or indexed rather than excerpted; those links are cited only where the supplied evidence supports them.

Main entry points: [`backend/app/routes.py`](https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/app/routes.py) (Encrypt/decrypt routes), [`frontend/src/App.jsx`](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/App.jsx) (App routes), [`frontend/src/pages/Encrypt.jsx`](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/pages/Encrypt.jsx) (Encrypt page), [`frontend/src/pages/Decrypt.jsx`](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/pages/Decrypt.jsx) (Decrypt page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_app["App routes<br/>[App.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_home["Landing page<br/>[Home.jsx]"]
  node_encrypt_page["Encrypt page<br/>[Encrypt.jsx]"]
  node_decrypt_page["Decrypt page<br/>[Decrypt.jsx]"]
  node_upload["Upload card<br/>[UploadCard.jsx]"]
  node_progress["Progress bar<br/>[ProgressBar.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["API and files"]
  node_fastapi["FastAPI app<br/>[main.py]"]
  node_routes["Encrypt/decrypt routes<br/>[routes.py]"]
  node_config["Upload/output config<br/>[config.py]"]
  node_uploads[("Temporary uploads")]
  node_outputs[("Generated files")]
end

subgraph group_crypto["Image encryption"]
  node_aes_encrypt["AES encryption and keys<br/>[aes_encrypt.py]"]
  node_aes_decrypt["AES decryption and verification<br/>[aes_decrypt.py]"]
end

subgraph group_steg["Video steganography"]
  node_embed["LSB video embedding<br/>[embed.py]"]
  node_extract["LSB video extraction<br/>[extract.py]"]
  node_payload["Payload framing<br/>[payload.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_encrypt_page
node_app -->|"routes to"| node_decrypt_page
node_user -->|"selects inputs"| node_encrypt_page
node_user -->|"supplies video/key"| node_decrypt_page
node_encrypt_page -->|"renders"| node_upload
node_encrypt_page -->|"renders"| node_progress
node_decrypt_page -->|"renders"| node_upload
node_decrypt_page -->|"renders"| node_progress
node_encrypt_page -->|"requests encryption"| node_api_client
node_decrypt_page -->|"requests recovery"| node_api_client
node_api_client -->|"HTTP requests"| node_routes
node_fastapi -->|"registers routes"| node_routes
node_fastapi -->|"reads output path"| node_config
node_routes -->|"reads limits and paths"| node_config
node_routes -->|"writes temporary files"| node_uploads
node_routes -->|"writes results"| node_outputs
node_fastapi -->|"serves downloads"| node_outputs
node_routes -->|"encrypts image"| node_aes_encrypt
node_routes -->|"embeds ciphertext"| node_embed
node_routes -->|"extracts payload"| node_extract
node_routes -->|"decrypts image"| node_aes_decrypt
node_embed -->|"builds framing"| node_payload
node_extract -->|"parses header"| node_payload

click node_app "https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/App.jsx"
click node_navbar "https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/components/Navbar.jsx"
click node_home "https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/pages/Home.jsx"
click node_encrypt_page "https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/pages/Encrypt.jsx"
click node_decrypt_page "https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/pages/Decrypt.jsx"
click node_upload "https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/components/UploadCard.jsx"
click node_progress "https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/components/ProgressBar.jsx"
click node_api_client "https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/services/api.js"
click node_fastapi "https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/app/main.py"
click node_routes "https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/app/routes.py"
click node_config "https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/app/config.py"
click node_uploads "https://github.com/basavarajathani-spec/secure-steganography/tree/main/backend/uploads"
click node_outputs "https://github.com/basavarajathani-spec/secure-steganography/tree/main/backend/outputs"
click node_aes_encrypt "https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/encryption/aes_encrypt.py"
click node_aes_decrypt "https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/encryption/aes_decrypt.py"
click node_embed "https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/steganography/embed.py"
click node_extract "https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/steganography/extract.py"
click node_payload "https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/steganography/payload.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_app,node_navbar,node_home,node_encrypt_page,node_decrypt_page,node_upload,node_progress,node_api_client,node_user toneBlue
class node_fastapi,node_routes,node_config,node_uploads,node_outputs toneAmber
class node_aes_encrypt,node_aes_decrypt toneMint
class node_embed,node_extract,node_payload toneRose
```

## Components

### Frontend experience

- [App routes](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Navigation](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Landing page](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [Encrypt page](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/pages/Encrypt.jsx): `frontend/src/pages/Encrypt.jsx`
- [Decrypt page](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/pages/Decrypt.jsx): `frontend/src/pages/Decrypt.jsx`
- [Upload card](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/components/UploadCard.jsx): `frontend/src/components/UploadCard.jsx`
- [Progress bar](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/components/ProgressBar.jsx): `frontend/src/components/ProgressBar.jsx`
- [API client](https://github.com/basavarajathani-spec/secure-steganography/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API and files

- [FastAPI app](https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/app/main.py): `backend/app/main.py`
- [Encrypt/decrypt routes](https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/app/routes.py): `backend/app/routes.py`
- [Upload/output config](https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/app/config.py): `backend/app/config.py`
- [Temporary uploads](https://github.com/basavarajathani-spec/secure-steganography/tree/main/backend/uploads): `backend/uploads`
- [Generated files](https://github.com/basavarajathani-spec/secure-steganography/tree/main/backend/outputs): `backend/outputs`

### Image encryption

- [AES encryption and keys](https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/encryption/aes_encrypt.py): `backend/encryption/aes_encrypt.py`
- [AES decryption and verification](https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/encryption/aes_decrypt.py): `backend/encryption/aes_decrypt.py`

### Video steganography

- [LSB video embedding](https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/steganography/embed.py): `backend/steganography/embed.py`
- [LSB video extraction](https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/steganography/extract.py): `backend/steganography/extract.py`
- [Payload framing](https://github.com/basavarajathani-spec/secure-steganography/blob/main/backend/steganography/payload.py): `backend/steganography/payload.py`

### Other components

- **User**

## Connections

- User → App routes: uses (evidence: `frontend/src/App.jsx`)
- App routes → Navigation: renders (evidence: `frontend/src/App.jsx`)
- App routes → Landing page: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Encrypt page: routes to (evidence: `frontend/src/App.jsx`)
- App routes → Decrypt page: routes to (evidence: `frontend/src/App.jsx`)
- User → Encrypt page: selects inputs (evidence: `frontend/src/pages/Encrypt.jsx`)
- User → Decrypt page: supplies video/key (evidence: `README.md`)
- Encrypt page → Upload card: renders (evidence: `frontend/src/pages/Encrypt.jsx`)
- Encrypt page → Progress bar: renders (evidence: `frontend/src/pages/Encrypt.jsx`)
- Decrypt page → Upload card: renders (evidence: `frontend/src/pages/Decrypt.jsx`)
- Decrypt page → Progress bar: renders (evidence: `frontend/src/pages/Decrypt.jsx`)
- Encrypt page → API client: requests encryption (evidence: `frontend/src/pages/Encrypt.jsx`)
- Decrypt page → API client: requests recovery (evidence: `frontend/src/pages/Decrypt.jsx`)
- API client → Encrypt/decrypt routes: HTTP requests (evidence: `frontend/src/services/api.js`)
- FastAPI app → Encrypt/decrypt routes: registers routes (evidence: `backend/app/main.py`)
- FastAPI app → Upload/output config: reads output path (evidence: `backend/app/main.py`)
- Encrypt/decrypt routes → Upload/output config: reads limits and paths (evidence: `backend/app/routes.py`)
- Encrypt/decrypt routes → Temporary uploads: writes temporary files (evidence: `backend/app/routes.py`)
- Encrypt/decrypt routes → Generated files: writes results (evidence: `backend/app/routes.py`)
- FastAPI app → Generated files: serves downloads (evidence: `backend/app/main.py`)
- Encrypt/decrypt routes → AES encryption and keys: encrypts image (evidence: `backend/app/routes.py`)
- Encrypt/decrypt routes → LSB video embedding: embeds ciphertext (evidence: `backend/app/routes.py`)
- Encrypt/decrypt routes → LSB video extraction: extracts payload (evidence: `backend/app/routes.py`)
- Encrypt/decrypt routes → AES decryption and verification: decrypts image (evidence: `backend/app/routes.py`)
- LSB video embedding → Payload framing: builds framing (evidence: `backend/steganography/embed.py`)
- LSB video extraction → Payload framing: parses header (evidence: `backend/steganography/extract.py`)
