# aswin-ar5055/gdrive-lite architecture

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

- Interactive diagram: https://gitdiagram.com/aswin-ar5055/gdrive-lite
- Repository: https://github.com/aswin-ar5055/gdrive-lite

## Overview

gdrive-lite is a Flask cloud-storage application. Users register or log in, then manage files from a dashboard: upload and download, move files to trash, restore or permanently delete them, and use sharing, favourites, profile customization, storage usage, and multilingual UI. Flask route handlers coordinate PostgreSQL metadata and S3 objects; templates and browser scripts provide the interface, including voice commands. The source excerpts show key dashboard, profile, favourites, trash, and storage interactions; other feature relationships are included where the README documents them.

Main entry points: [`routes/__init__.py`](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/__init__.py) (Flask app), [`file_utils.py`](https://github.com/aswin-ar5055/gdrive-lite/blob/master/file_utils.py) (S3 helpers), [`routes/profile.py`](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/profile.py) (User profile), [`routes/dashboard.py`](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/dashboard.py) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask app<br/>[__init__.py]"]
  node_translations["Translations<br/>[translations.py]"]
  node_templates["Page templates"]
  node_browser["Browser UI and voice"]
end

subgraph group_files["File management"]
  node_dashboard["Dashboard<br/>[dashboard.py]"]
  node_upload["File upload<br/>[upload.py]"]
  node_download["File download<br/>[download.py]"]
  node_trash["Trash listing<br/>[trash.py]"]
  node_trash_ops["Trash and restore"]
  node_bulk_ops["Bulk file actions"]
  node_sharing["File sharing<br/>[share.py]"]
  node_zip["ZIP downloads<br/>[zip.py]"]
end

subgraph group_account["Accounts and preferences"]
  node_auth["Registration and login"]
  node_favourites["Favourites<br/>[favourites.py]"]
  node_profile["User profile<br/>[profile.py]"]
end

subgraph group_persistence["Data and storage"]
  node_file_utils["S3 helpers<br/>[file_utils.py]"]
  node_s3[("Amazon S3")]
  node_db_schema["Database access and schema<br/>[db_schema.py]"]
  node_postgres[("PostgreSQL")]
end

node_user(("User"))

node_user -->|"uses"| node_flask
node_flask -->|"registers routes"| node_auth
node_flask -->|"registers routes"| node_dashboard
node_flask -->|"registers routes"| node_upload
node_flask -->|"registers routes"| node_download
node_flask -->|"registers routes"| node_trash
node_flask -->|"registers routes"| node_trash_ops
node_flask -->|"registers routes"| node_bulk_ops
node_flask -->|"registers routes"| node_sharing
node_flask -->|"registers routes"| node_zip
node_flask -->|"registers routes"| node_favourites
node_flask -->|"registers routes"| node_profile
node_dashboard -->|"gets storage info"| node_file_utils
node_dashboard -->|"lists user files"| node_s3
node_dashboard -->|"gets profile"| node_profile
node_dashboard -->|"gets favourites"| node_favourites
node_dashboard -->|"gets translations"| node_translations
node_dashboard -->|"renders dashboard"| node_templates
node_upload -->|"uses S3 helpers"| node_file_utils
node_download -->|"uses S3 helpers"| node_file_utils
node_trash -->|"lists trash objects"| node_s3
node_trash -->|"gets profile"| node_profile
node_trash -->|"gets storage info"| node_file_utils
node_trash_ops -->|"uses S3 helpers"| node_file_utils
node_bulk_ops -->|"uses S3 helpers"| node_file_utils
node_sharing -->|"uses S3 helpers"| node_file_utils
node_zip -->|"uses S3 helpers"| node_file_utils
node_favourites -->|"reads and updates"| node_db_schema
node_favourites -->|"checks file objects"| node_s3
node_favourites -->|"gets profile"| node_profile
node_favourites -->|"gets storage info"| node_file_utils
node_favourites -->|"gets translations"| node_translations
node_profile -->|"reads and updates"| node_db_schema
node_profile -->|"gets S3 client"| node_file_utils
node_profile -->|"stores profile pictures"| node_s3
node_profile -->|"gets translations"| node_translations
node_file_utils -->|"lists and measures"| node_s3
node_db_schema -->|"connects and initializes"| node_postgres
node_auth -->|"uses account records"| node_db_schema
node_auth -->|"uses account records"| node_db_schema
node_user -->|"uses voice commands"| node_browser
node_browser -.->|"requests app actions"| node_flask

click node_flask "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/__init__.py"
click node_auth "https://github.com/aswin-ar5055/gdrive-lite/tree/master/routes"
click node_dashboard "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/dashboard.py"
click node_upload "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/upload.py"
click node_download "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/download.py"
click node_trash "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/trash.py"
click node_trash_ops "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/trash_del_restore.py"
click node_bulk_ops "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/del_restore_permadelete.py"
click node_sharing "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/share.py"
click node_zip "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/zip.py"
click node_favourites "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/favourites.py"
click node_profile "https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/profile.py"
click node_translations "https://github.com/aswin-ar5055/gdrive-lite/blob/master/translations.py"
click node_templates "https://github.com/aswin-ar5055/gdrive-lite/tree/master/templates"
click node_browser "https://github.com/aswin-ar5055/gdrive-lite/tree/master/static"
click node_file_utils "https://github.com/aswin-ar5055/gdrive-lite/blob/master/file_utils.py"
click node_db_schema "https://github.com/aswin-ar5055/gdrive-lite/blob/master/db_schema.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_translations,node_templates,node_browser,node_user toneBlue
class node_dashboard,node_upload,node_download,node_trash,node_trash_ops,node_bulk_ops,node_sharing,node_zip toneAmber
class node_auth,node_favourites,node_profile toneMint
class node_file_utils,node_s3,node_db_schema,node_postgres toneRose
```

## Components

### Web application

- [Flask app](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/__init__.py): `routes/__init__.py`
- [Translations](https://github.com/aswin-ar5055/gdrive-lite/blob/master/translations.py): `translations.py`
- [Page templates](https://github.com/aswin-ar5055/gdrive-lite/tree/master/templates): `templates`
- [Browser UI and voice](https://github.com/aswin-ar5055/gdrive-lite/tree/master/static): `static`

### File management

- [Dashboard](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/dashboard.py): `routes/dashboard.py`
- [File upload](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/upload.py): `routes/upload.py`
- [File download](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/download.py): `routes/download.py`
- [Trash listing](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/trash.py): `routes/trash.py`
- [Trash and restore](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/trash_del_restore.py): `routes/trash_del_restore.py`
- [Bulk file actions](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/del_restore_permadelete.py): `routes/del_restore_permadelete.py`
- [File sharing](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/share.py): `routes/share.py`
- [ZIP downloads](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/zip.py): `routes/zip.py`

### Accounts and preferences

- [Registration and login](https://github.com/aswin-ar5055/gdrive-lite/tree/master/routes): `routes`
- [Favourites](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/favourites.py): `routes/favourites.py`
- [User profile](https://github.com/aswin-ar5055/gdrive-lite/blob/master/routes/profile.py): `routes/profile.py`

### Data and storage

- [S3 helpers](https://github.com/aswin-ar5055/gdrive-lite/blob/master/file_utils.py): `file_utils.py`
- **Amazon S3**
- [Database access and schema](https://github.com/aswin-ar5055/gdrive-lite/blob/master/db_schema.py): `db_schema.py`
- **PostgreSQL**

### Other components

- **User**

## Connections

- User → Flask app: uses (evidence: `README.md`)
- Flask app → Registration and login: registers routes (evidence: `routes/__init__.py`)
- Flask app → Dashboard: registers routes (evidence: `routes/__init__.py`)
- Flask app → File upload: registers routes (evidence: `routes/__init__.py`)
- Flask app → File download: registers routes (evidence: `routes/__init__.py`)
- Flask app → Trash listing: registers routes (evidence: `routes/__init__.py`)
- Flask app → Trash and restore: registers routes (evidence: `routes/__init__.py`)
- Flask app → Bulk file actions: registers routes (evidence: `routes/__init__.py`)
- Flask app → File sharing: registers routes (evidence: `routes/__init__.py`)
- Flask app → ZIP downloads: registers routes (evidence: `routes/__init__.py`)
- Flask app → Favourites: registers routes (evidence: `routes/__init__.py`)
- Flask app → User profile: registers routes (evidence: `routes/__init__.py`)
- Dashboard → S3 helpers: gets storage info (evidence: `routes/dashboard.py`)
- Dashboard → Amazon S3: lists user files (evidence: `routes/dashboard.py`)
- Dashboard → User profile: gets profile (evidence: `routes/dashboard.py`)
- Dashboard → Favourites: gets favourites (evidence: `routes/dashboard.py`)
- Dashboard → Translations: gets translations (evidence: `routes/dashboard.py`)
- Dashboard → Page templates: renders dashboard (evidence: `routes/dashboard.py`)
- File upload → S3 helpers: uses S3 helpers (evidence: `routes/upload.py`)
- File download → S3 helpers: uses S3 helpers (evidence: `routes/download.py`)
- Trash listing → Amazon S3: lists trash objects (evidence: `routes/trash.py`)
- Trash listing → User profile: gets profile (evidence: `routes/trash.py`)
- Trash listing → S3 helpers: gets storage info (evidence: `routes/trash.py`)
- Trash and restore → S3 helpers: uses S3 helpers (evidence: `routes/trash_del_restore.py`)
- Bulk file actions → S3 helpers: uses S3 helpers (evidence: `routes/del_restore_permadelete.py`)
- File sharing → S3 helpers: uses S3 helpers (evidence: `routes/share.py`)
- ZIP downloads → S3 helpers: uses S3 helpers (evidence: `routes/zip.py`)
- Favourites → Database access and schema: reads and updates (evidence: `routes/favourites.py`)
- Favourites → Amazon S3: checks file objects (evidence: `routes/favourites.py`)
- Favourites → User profile: gets profile (evidence: `routes/favourites.py`)
- Favourites → S3 helpers: gets storage info (evidence: `routes/favourites.py`)
- Favourites → Translations: gets translations (evidence: `routes/favourites.py`)
- User profile → Database access and schema: reads and updates (evidence: `routes/profile.py`)
- User profile → S3 helpers: gets S3 client (evidence: `routes/profile.py`)
- User profile → Amazon S3: stores profile pictures (evidence: `routes/profile.py`)
- User profile → Translations: gets translations (evidence: `routes/profile.py`)
- S3 helpers → Amazon S3: lists and measures (evidence: `file_utils.py`)
- Database access and schema → PostgreSQL: connects and initializes (evidence: `db_schema.py`)
- Registration and login → Database access and schema: uses account records (evidence: `routes/login.py`)
- Registration and login → Database access and schema: uses account records (evidence: `routes/register.py`)
- User → Browser UI and voice: uses voice commands (evidence: `README.md`)
- Browser UI and voice → Flask app: requests app actions
