# gohilnitya08/aethera architecture

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

- Interactive diagram: https://gitdiagram.com/gohilnitya08/aethera
- Repository: https://github.com/gohilnitya08/aethera

## Overview

AETHERA is a FastAPI backend for privacy-focused document storage and collaboration. The principal workflow is authenticated workspace access, folder organization, file metadata and version management, then sharing; services enforce permissions and repositories persist domain state. Authentication supports password/JWT and Google OAuth. The README also names React and MySQL, but the frontend and cloud storage are outside this tree, and cloud hosting is pending. Several routes and services are unsampled, so their internal connections are not inferred.

Main entry points: [`Backend/app/api/router.py`](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/router.py) (API router), [`Backend/app/services/workspace_service.py`](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/workspace_service.py) (Workspace service), [`Backend/app/services/file_service.py`](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/file_service.py) (File service), [`Backend/app/services/auth_service.py`](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/auth_service.py) (Auth service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["HTTP API"]
  node_app["FastAPI app<br/>[main.py]"]
  node_api_router["API router<br/>[router.py]"]
  node_auth_route["Auth routes<br/>[auth.py]"]
  node_files_route["File routes<br/>[files.py]"]
  node_folders_route["Folder routes<br/>[folders.py]"]
  node_shares_route["Share routes<br/>[shares.py]"]
  node_workspaces_route["Workspace routes<br/>[workspaces.py]"]
end

subgraph group_identity["Identity"]
  node_auth_service["Auth service<br/>[auth_service.py]"]
  node_auth_repo["Auth repository<br/>[auth_repository.py]"]
  node_user_service["User service<br/>[user_service.py]"]
  node_user_repo["User repository<br/>[user_repository.py]"]
end

subgraph group_collaboration["Workspace Collaboration"]
  node_workspace_service["Workspace service"]
  node_workspace_repo["Workspace repository"]
  node_share_service["Share service<br/>[share_service.py]"]
  node_share_repo["Share repository"]
end

subgraph group_documents["Document Management"]
  node_folder_service["Folder service<br/>[folder_service.py]"]
  node_folder_repo["Folder repository"]
  node_file_service["File service<br/>[file_service.py]"]
  node_file_repo["File repository<br/>[file_repository.py]"]
end

subgraph group_persistence["Persistence"]
  node_db_session["DB sessions<br/>[session.py]"]
  node_mysql[("MySQL database")]
end

node_client(("API client"))
node_google(("Google OAuth"))

node_client -->|"HTTP requests"| node_app
node_app -->|"mounts routes"| node_api_router
node_api_router -->|"dispatches"| node_auth_route
node_api_router -->|"dispatches"| node_files_route
node_api_router -->|"dispatches"| node_folders_route
node_api_router -->|"dispatches"| node_shares_route
node_api_router -->|"dispatches"| node_workspaces_route
node_auth_route -->|"calls"| node_auth_service
node_auth_service -->|"queries and writes"| node_auth_repo
node_auth_service -.->|"verifies identity"| node_google
node_workspace_service -->|"queries and writes"| node_workspace_repo
node_workspace_service -->|"checks active user"| node_user_repo
node_folder_service -->|"queries and writes"| node_folder_repo
node_folder_service -->|"checks access"| node_workspace_service
node_file_service -->|"queries and writes"| node_file_repo
node_file_service -->|"checks folder access"| node_folder_service
node_file_service -->|"checks permissions"| node_workspace_service
node_db_session -->|"opens sessions"| node_mysql

click node_app "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/main.py"
click node_api_router "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/router.py"
click node_auth_route "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/auth.py"
click node_files_route "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/files.py"
click node_folders_route "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/folders.py"
click node_shares_route "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/shares.py"
click node_workspaces_route "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/workspaces.py"
click node_auth_service "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/auth_service.py"
click node_auth_repo "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/auth_repository.py"
click node_workspace_service "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/workspace_service.py"
click node_workspace_repo "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/workspace_repository.py"
click node_share_service "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/share_service.py"
click node_share_repo "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/share_repository.py"
click node_user_service "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/user_service.py"
click node_user_repo "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/user_repository.py"
click node_folder_service "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/folder_service.py"
click node_folder_repo "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/folder_repository.py"
click node_file_service "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/file_service.py"
click node_file_repo "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/file_repository.py"
click node_db_session "https://github.com/gohilnitya08/aethera/blob/main/Backend/app/database/session.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_api_router,node_auth_route,node_files_route,node_folders_route,node_shares_route,node_workspaces_route,node_client toneBlue
class node_auth_service,node_auth_repo,node_user_service,node_user_repo toneAmber
class node_workspace_service,node_workspace_repo,node_share_service,node_share_repo toneMint
class node_folder_service,node_folder_repo,node_file_service,node_file_repo toneRose
class node_db_session,node_mysql,node_google toneIndigo
```

## Components

### HTTP API

- [FastAPI app](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/main.py): `Backend/app/main.py`
- [API router](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/router.py): `Backend/app/api/router.py`
- [Auth routes](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/auth.py): `Backend/app/api/routes/auth.py`
- [File routes](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/files.py): `Backend/app/api/routes/files.py`
- [Folder routes](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/folders.py): `Backend/app/api/routes/folders.py`
- [Share routes](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/shares.py): `Backend/app/api/routes/shares.py`
- [Workspace routes](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/api/routes/workspaces.py): `Backend/app/api/routes/workspaces.py`

### Identity

- [Auth service](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/auth_service.py): `Backend/app/services/auth_service.py`
- [Auth repository](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/auth_repository.py): `Backend/app/repositories/auth_repository.py`
- [User service](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/user_service.py): `Backend/app/services/user_service.py`
- [User repository](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/user_repository.py): `Backend/app/repositories/user_repository.py`

### Workspace Collaboration

- [Workspace service](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/workspace_service.py): `Backend/app/services/workspace_service.py`
- [Workspace repository](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/workspace_repository.py): `Backend/app/repositories/workspace_repository.py`
- [Share service](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/share_service.py): `Backend/app/services/share_service.py`
- [Share repository](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/share_repository.py): `Backend/app/repositories/share_repository.py`

### Document Management

- [Folder service](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/folder_service.py): `Backend/app/services/folder_service.py`
- [Folder repository](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/folder_repository.py): `Backend/app/repositories/folder_repository.py`
- [File service](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/services/file_service.py): `Backend/app/services/file_service.py`
- [File repository](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/repositories/file_repository.py): `Backend/app/repositories/file_repository.py`

### Persistence

- [DB sessions](https://github.com/gohilnitya08/aethera/blob/main/Backend/app/database/session.py): `Backend/app/database/session.py`
- **MySQL database**

### Other components

- **API client**
- **Google OAuth**

## Connections

- API client → FastAPI app: HTTP requests
- FastAPI app → API router: mounts routes
- API router → Auth routes: dispatches
- API router → File routes: dispatches
- API router → Folder routes: dispatches
- API router → Share routes: dispatches
- API router → Workspace routes: dispatches
- Auth routes → Auth service: calls
- Auth service → Auth repository: queries and writes
- Auth service → Google OAuth: verifies identity
- Workspace service → Workspace repository: queries and writes
- Workspace service → User repository: checks active user
- Folder service → Folder repository: queries and writes
- Folder service → Workspace service: checks access
- File service → File repository: queries and writes
- File service → Folder service: checks folder access
- File service → Workspace service: checks permissions
- DB sessions → MySQL database: opens sessions
