# harish000111/opengallery architecture

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

- Interactive diagram: https://gitdiagram.com/harish000111/opengallery
- Repository: https://github.com/harish000111/opengallery

## Overview

OpenGallery is a small public image-sharing practice project, but the sampled runtime currently exposes only a welcome route, a health route, and a browser health-check button. The principal demonstrated workflow is a user clicking that button and seeing an API status or an error. Image sharing and PostgreSQL are README-level product claims, not verified runtime flows in the excerpts; their implementation and wiring remain unclear.

Main entry points: [`backend/app`](https://github.com/harish000111/opengallery/tree/main/backend/app) (Image sharing), [`frontend/app.js`](https://github.com/harish000111/opengallery/blob/main/frontend/app.js) (Health check UI), [`backend/app/main.py`](https://github.com/harish000111/opengallery/blob/main/backend/app/main.py) (FastAPI routes), [`uploads`](https://github.com/harish000111/opengallery/tree/main/uploads) (Upload directory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_health_ui["Health check UI<br/>[app.js]"]
end

subgraph group_api["API service"]
  node_fastapi["FastAPI routes<br/>[main.py]"]
end

subgraph group_media["Image sharing"]
  node_image_sharing["Image sharing"]
  node_uploads["Upload directory"]
  node_postgres[("PostgreSQL")]
end

node_visitor(("Visitor"))

node_visitor -->|"clicks"| node_health_ui
node_health_ui -.->|"requests health"| node_fastapi
node_visitor -.->|"shares images"| node_image_sharing
node_image_sharing -.->|"stores images"| node_uploads
node_image_sharing -.->|"uses database"| node_postgres

click node_health_ui "https://github.com/harish000111/opengallery/blob/main/frontend/app.js"
click node_fastapi "https://github.com/harish000111/opengallery/blob/main/backend/app/main.py"
click node_image_sharing "https://github.com/harish000111/opengallery/tree/main/backend/app"
click node_uploads "https://github.com/harish000111/opengallery/tree/main/uploads"

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_health_ui toneBlue
class node_fastapi toneAmber
class node_image_sharing,node_uploads,node_postgres toneMint
class node_visitor toneIndigo
```

## Components

### Browser client

- [Health check UI](https://github.com/harish000111/opengallery/blob/main/frontend/app.js): `frontend/app.js`

### API service

- [FastAPI routes](https://github.com/harish000111/opengallery/blob/main/backend/app/main.py): `backend/app/main.py`

### Image sharing

- [Image sharing](https://github.com/harish000111/opengallery/tree/main/backend/app): `backend/app`
- [Upload directory](https://github.com/harish000111/opengallery/tree/main/uploads): `uploads`
- **PostgreSQL**

### Other components

- **Visitor**

## Connections

- Visitor → Health check UI: clicks (evidence: `frontend/app.js`)
- Health check UI → FastAPI routes: requests health
- Visitor → Image sharing: shares images (evidence: `README.md`)
- Image sharing → Upload directory: stores images
- Image sharing → PostgreSQL: uses database (evidence: `README.md`)
