# padhu2040/vedic-astro-v2 architecture

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

- Interactive diagram: https://gitdiagram.com/padhu2040/vedic-astro-v2
- Repository: https://github.com/padhu2040/vedic-astro-v2

## Overview

Vedic-Astro-v2 is a Streamlit Vedic astrology application. Users enter or select birth profiles, then view horoscope, daily forecast, compatibility, executive blueprint, or circular-chart analysis; the horoscope page can also produce a report. The app routes users by login state, and saved profiles are managed in Supabase. The graph preserves the README-listed product only at a high level; details come from the supplied excerpts and source index, so unshown page internals and some data flows are omitted.

Main entry points: [`app.py`](https://github.com/padhu2040/vedic-astro-v2/blob/main/app.py) (Streamlit Router), [`astro_engine.py`](https://github.com/padhu2040/vedic-astro-v2/blob/main/astro_engine.py) (Astrology Engine), [`pages/1_horoscope.py`](https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/1_horoscope.py) (Deep Horoscope), [`pages/2_daily_dashboard.py`](https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/2_daily_dashboard.py) (Daily Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App and Access"]
  node_app["Streamlit Router<br/>[app.py]"]
  node_login["Account Login<br/>[0_login.py]"]
end

subgraph group_profiles["Profile Management"]
  node_store[("Supabase Store")]
  node_profile_vault["Saved Profiles"]
end

subgraph group_astrology["Astrology Analysis"]
  node_engine["Astrology Engine<br/>[astro_engine.py]"]
  node_astro_data["Astrology Reference Data<br/>[database.py]"]
  node_horoscope["Deep Horoscope<br/>[1_horoscope.py]"]
  node_daily["Daily Dashboard"]
  node_porutham["Compatibility Analysis<br/>[3_porutham.py]"]
  node_blueprint["Executive Blueprint"]
  node_circular["Circular Chart"]
end

subgraph group_presentation["Results and Language"]
  node_tamil["Tamil Content<br/>[tamil_lang.py]"]
  node_report["Report Generator"]
end

node_user(("User"))
node_swisseph["Swiss Ephemeris"]
node_gemini["Gemini AI"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_daily
node_app -->|"routes to"| node_horoscope
node_app -->|"routes to"| node_blueprint
node_app -->|"routes to"| node_porutham
node_app -->|"routes to"| node_profile_vault
node_app -->|"routes to"| node_circular
node_app -->|"checks subscription"| node_store
node_profile_vault -->|"reads and writes"| node_store
node_horoscope -->|"calls"| node_engine
node_daily -->|"calls"| node_engine
node_porutham -->|"uses calculations"| node_engine
node_blueprint -->|"calls"| node_engine
node_circular -->|"gets location data"| node_engine
node_engine -->|"reads constants"| node_astro_data
node_engine -->|"reads content"| node_tamil
node_horoscope -->|"uses renderer"| node_report
node_engine -->|"calculates positions"| node_swisseph
node_porutham -.->|"requests interpretation"| node_gemini
node_daily -->|"loads profiles"| node_store
node_blueprint -->|"loads profiles"| node_store

click node_app "https://github.com/padhu2040/vedic-astro-v2/blob/main/app.py"
click node_login "https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/0_login.py"
click node_profile_vault "https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/4_saved_profiles.py"
click node_engine "https://github.com/padhu2040/vedic-astro-v2/blob/main/astro_engine.py"
click node_astro_data "https://github.com/padhu2040/vedic-astro-v2/blob/main/database.py"
click node_tamil "https://github.com/padhu2040/vedic-astro-v2/blob/main/tamil_lang.py"
click node_horoscope "https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/1_horoscope.py"
click node_daily "https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/2_daily_dashboard.py"
click node_porutham "https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/3_porutham.py"
click node_blueprint "https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/5_executive_blueprint.py"
click node_circular "https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/6_circular_chart.py"
click node_report "https://github.com/padhu2040/vedic-astro-v2/blob/main/report_generator.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_login,node_user toneBlue
class node_store,node_profile_vault toneAmber
class node_engine,node_astro_data,node_horoscope,node_daily,node_porutham,node_blueprint,node_circular toneMint
class node_tamil,node_report toneRose
class node_swisseph,node_gemini toneIndigo
```

## Components

### App and Access

- [Streamlit Router](https://github.com/padhu2040/vedic-astro-v2/blob/main/app.py): `app.py`
- [Account Login](https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/0_login.py): `pages/0_login.py`

### Profile Management

- **Supabase Store**
- [Saved Profiles](https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/4_saved_profiles.py): `pages/4_saved_profiles.py`

### Astrology Analysis

- [Astrology Engine](https://github.com/padhu2040/vedic-astro-v2/blob/main/astro_engine.py): `astro_engine.py`
- [Astrology Reference Data](https://github.com/padhu2040/vedic-astro-v2/blob/main/database.py): `database.py`
- [Deep Horoscope](https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/1_horoscope.py): `pages/1_horoscope.py`
- [Daily Dashboard](https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/2_daily_dashboard.py): `pages/2_daily_dashboard.py`
- [Compatibility Analysis](https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/3_porutham.py): `pages/3_porutham.py`
- [Executive Blueprint](https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/5_executive_blueprint.py): `pages/5_executive_blueprint.py`
- [Circular Chart](https://github.com/padhu2040/vedic-astro-v2/blob/main/pages/6_circular_chart.py): `pages/6_circular_chart.py`

### Results and Language

- [Tamil Content](https://github.com/padhu2040/vedic-astro-v2/blob/main/tamil_lang.py): `tamil_lang.py`
- [Report Generator](https://github.com/padhu2040/vedic-astro-v2/blob/main/report_generator.py): `report_generator.py`

### Other components

- **User**
- **Swiss Ephemeris**
- **Gemini AI**

## Connections

- User → Streamlit Router: uses (evidence: `app.py`)
- Streamlit Router → Account Login: routes to (evidence: `app.py`)
- Streamlit Router → Daily Dashboard: routes to (evidence: `app.py`)
- Streamlit Router → Deep Horoscope: routes to (evidence: `app.py`)
- Streamlit Router → Executive Blueprint: routes to (evidence: `app.py`)
- Streamlit Router → Compatibility Analysis: routes to (evidence: `app.py`)
- Streamlit Router → Saved Profiles: routes to (evidence: `app.py`)
- Streamlit Router → Circular Chart: routes to (evidence: `app.py`)
- Streamlit Router → Supabase Store: checks subscription (evidence: `app.py`)
- Saved Profiles → Supabase Store: reads and writes (evidence: `pages/4_saved_profiles.py`)
- Deep Horoscope → Astrology Engine: calls (evidence: `pages/1_horoscope.py`)
- Daily Dashboard → Astrology Engine: calls (evidence: `pages/2_daily_dashboard.py`)
- Compatibility Analysis → Astrology Engine: uses calculations (evidence: `pages/3_porutham.py`)
- Executive Blueprint → Astrology Engine: calls (evidence: `pages/5_executive_blueprint.py`)
- Circular Chart → Astrology Engine: gets location data (evidence: `pages/6_circular_chart.py`)
- Astrology Engine → Astrology Reference Data: reads constants (evidence: `astro_engine.py`)
- Astrology Engine → Tamil Content: reads content (evidence: `astro_engine.py`)
- Deep Horoscope → Report Generator: uses renderer (evidence: `pages/1_horoscope.py`)
- Astrology Engine → Swiss Ephemeris: calculates positions (evidence: `astro_engine.py`)
- Compatibility Analysis → Gemini AI: requests interpretation (evidence: `pages/3_porutham.py`)
- Daily Dashboard → Supabase Store: loads profiles (evidence: `pages/2_daily_dashboard.py`)
- Executive Blueprint → Supabase Store: loads profiles (evidence: `pages/5_executive_blueprint.py`)
