# itsjustayush/meteorbaseapi architecture

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

- Interactive diagram: https://gitdiagram.com/itsjustayush/meteorbaseapi
- Repository: https://github.com/itsjustayush/meteorbaseapi

## Overview

MeteorBase is a FastAPI gateway backed by Firebase, with a Python SDK for authenticated access. The main workflow is a caller presenting an API key to access gateway endpoints, including AI summarization and stored data; the SDK provides an alternate client interface. The README documents more endpoint capabilities than the sampled application excerpt exposes, so those branches are included with README evidence. Internal implementation details are limited to the sampled source.

Main entry points: [`meteorbase/app.py`](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py) (FastAPI Gateway), [`meteorbase/client.py`](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/client.py) (Python Client), [`index.html`](https://github.com/itsjustayush/meteorbaseapi/blob/main/index.html) (Dashboard UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gateway["Gateway and Auth"]
  node_gateway["FastAPI Gateway<br/>[app.py]"]
  node_key_auth["Key Verification<br/>[app.py]"]
  node_key_admin["Key Management<br/>[app.py]"]
  node_usage["Usage Metrics<br/>[app.py]"]
  node_summarize["Summarization Endpoint<br/>[app.py]"]
end

subgraph group_data["Data and Summaries"]
  node_summaries["Summary Endpoints<br/>[app.py]"]
  node_dynamic_data["Dynamic Data Endpoints<br/>[app.py]"]
  node_firestore_helpers["Firestore Access<br/>[app.py]"]
  node_retention["Retention Cleanup<br/>[app.py]"]
end

subgraph group_operations["Operations"]
  node_health["Health and Readiness<br/>[app.py]"]
  node_telemetry_api["Telemetry Endpoints<br/>[app.py]"]
  node_telemetry_store[("Telemetry Store<br/>[app.py]")]
  node_dashboard["Dashboard UI<br/>[index.html]"]
end

subgraph group_sdk["Python SDK"]
  node_sdk["Python Client<br/>[client.py]"]
  node_sdk_auth["Profile Access<br/>[client.py]"]
  node_sdk_resources["SDK Resources<br/>[client.py]"]
end

node_caller(("API Caller"))
node_gemini["Gemini API"]
node_firestore[("Firestore")]
node_sdk_user(("SDK User"))

node_caller -->|"calls endpoints"| node_gateway
node_gateway -->|"verifies keys"| node_key_auth
node_gateway -->|"manages keys"| node_key_admin
node_gateway -->|"reports usage"| node_usage
node_gateway -->|"routes requests"| node_summarize
node_summarize -->|"generates summaries"| node_gemini
node_gateway -->|"routes requests"| node_summaries
node_summaries -->|"queries records"| node_firestore_helpers
node_gateway -->|"routes requests"| node_dynamic_data
node_dynamic_data -->|"reads and writes"| node_firestore_helpers
node_firestore_helpers -->|"accesses documents"| node_firestore
node_gateway -->|"checks retention"| node_retention
node_retention -.->|"checks stored records"| node_firestore_helpers
node_gateway -->|"serves probes"| node_health
node_gateway -->|"serves metrics"| node_telemetry_api
node_telemetry_api -.->|"returns metrics"| node_telemetry_store
node_gateway -->|"serves interface"| node_dashboard
node_sdk_user -->|"uses client"| node_sdk
node_sdk -->|"fetches profile"| node_sdk_auth
node_sdk -->|"provides resources"| node_sdk_resources
node_sdk_auth -->|"requests profile"| node_gateway
node_sdk_resources -->|"requests API data"| node_gateway

click node_gateway "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_key_auth "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_key_admin "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_usage "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_summarize "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_summaries "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_dynamic_data "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_firestore_helpers "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_retention "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_health "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_telemetry_api "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_telemetry_store "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py"
click node_dashboard "https://github.com/itsjustayush/meteorbaseapi/blob/main/index.html"
click node_sdk "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/client.py"
click node_sdk_auth "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/client.py"
click node_sdk_resources "https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/client.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_gateway,node_key_auth,node_key_admin,node_usage,node_summarize,node_sdk_user toneBlue
class node_summaries,node_dynamic_data,node_firestore_helpers,node_retention,node_firestore toneAmber
class node_health,node_telemetry_api,node_telemetry_store,node_dashboard,node_caller,node_gemini toneMint
class node_sdk,node_sdk_auth,node_sdk_resources toneRose
```

## Components

### Gateway and Auth

- [FastAPI Gateway](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Key Verification](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Key Management](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Usage Metrics](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Summarization Endpoint](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`

### Data and Summaries

- [Summary Endpoints](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Dynamic Data Endpoints](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Firestore Access](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Retention Cleanup](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`

### Operations

- [Health and Readiness](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Telemetry Endpoints](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Telemetry Store](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/app.py): `meteorbase/app.py`
- [Dashboard UI](https://github.com/itsjustayush/meteorbaseapi/blob/main/index.html): `index.html`

### Python SDK

- [Python Client](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/client.py): `meteorbase/client.py`
- [Profile Access](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/client.py): `meteorbase/client.py`
- [SDK Resources](https://github.com/itsjustayush/meteorbaseapi/blob/main/meteorbase/client.py): `meteorbase/client.py`

### Other components

- **API Caller**
- **Gemini API**
- **Firestore**
- **SDK User**

## Connections

- API Caller → FastAPI Gateway: calls endpoints (evidence: `README.md`)
- FastAPI Gateway → Key Verification: verifies keys (evidence: `README.md`)
- FastAPI Gateway → Key Management: manages keys (evidence: `README.md`)
- FastAPI Gateway → Usage Metrics: reports usage (evidence: `README.md`)
- FastAPI Gateway → Summarization Endpoint: routes requests (evidence: `README.md`)
- Summarization Endpoint → Gemini API: generates summaries (evidence: `README.md`)
- FastAPI Gateway → Summary Endpoints: routes requests (evidence: `README.md`)
- Summary Endpoints → Firestore Access: queries records (evidence: `meteorbase/app.py`)
- FastAPI Gateway → Dynamic Data Endpoints: routes requests (evidence: `README.md`)
- Dynamic Data Endpoints → Firestore Access: reads and writes (evidence: `README.md`)
- Firestore Access → Firestore: accesses documents (evidence: `README.md`)
- FastAPI Gateway → Retention Cleanup: checks retention (evidence: `README.md`)
- Retention Cleanup → Firestore Access: checks stored records (evidence: `meteorbase/app.py`)
- FastAPI Gateway → Health and Readiness: serves probes (evidence: `README.md`)
- FastAPI Gateway → Telemetry Endpoints: serves metrics (evidence: `README.md`)
- Telemetry Endpoints → Telemetry Store: returns metrics (evidence: `meteorbase/app.py`)
- FastAPI Gateway → Dashboard UI: serves interface (evidence: `meteorbase/app.py`)
- SDK User → Python Client: uses client (evidence: `README.md`)
- Python Client → Profile Access: fetches profile (evidence: `meteorbase/client.py`)
- Python Client → SDK Resources: provides resources (evidence: `meteorbase/client.py`)
- Profile Access → FastAPI Gateway: requests profile (evidence: `meteorbase/client.py`)
- SDK Resources → FastAPI Gateway: requests API data (evidence: `meteorbase/client.py`)
