# rebots-online/natally-gemini architecture

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

- Interactive diagram: https://gitdiagram.com/rebots-online/natally-gemini
- Repository: https://github.com/rebots-online/natally-gemini
- Video tour (about a minute): https://gitdiagram.com/rebots-online/natally-gemini/video

## Overview

Astrosphere is an astrology web app whose main workflow collects birth details, calculates a natal chart, and presents interactive chart visualizations and interpretive results. Users can also request readings, explore themes, chat with Natally, use voice playback, export results, and authenticate. The graph follows documented imports and excerpted calls; some component behavior and server-side routing were not shown, so those relationships are omitted rather than inferred.

Main entry points: [`src/App.tsx`](https://github.com/rebots-online/natally-gemini/blob/main/src/App.tsx) (App Orchestrator), [`src/services/ephemeris.ts`](https://github.com/rebots-online/natally-gemini/blob/main/src/services/ephemeris.ts) (Natal Chart Engine), [`src/components/ReadingsModal.tsx`](https://github.com/rebots-online/natally-gemini/blob/main/src/components/ReadingsModal.tsx) (Readings Modal), [`src/components/NatallyChatbot.tsx`](https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatallyChatbot.tsx) (Natally Chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_chart["Chart and Insights"]
  node_chartform["Birth Details<br/>[NatalInputForm.tsx]"]
  node_locations["Place Search<br/>[locations.ts]"]
  node_engine["Natal Chart Engine<br/>[ephemeris.ts]"]
  node_astrolabe["3D Astrolabe<br/>[Astrolabe3D.tsx]"]
  node_themes["Themes and Numerology<br/>[astrowisdom.ts]"]
  node_wisdomview["Themes View"]
end

subgraph group_interpretation["Readings and Chat"]
  node_readings["Reading Generator<br/>[readings.ts]"]
  node_readingview["Readings Modal<br/>[ReadingsModal.tsx]"]
  node_chat["Natally Chat<br/>[NatallyChatbot.tsx]"]
  node_chatservice["Chat Service<br/>[natallyChat.ts]"]
  node_richtext["Rich Text Renderer<br/>[RichText.tsx]"]
end

subgraph group_experience["Interface and Voice"]
  node_app["App Orchestrator<br/>[App.tsx]"]
  node_export["Export and Share<br/>[ExportModal.tsx]"]
  node_cards["Draggable Cards<br/>[DraggableCard.tsx]"]
  node_selection["Selected Components"]
  node_sprite["Natally Sprite<br/>[NatallySprite.tsx]"]
  node_avatar["Natally Avatar<br/>[NatallyAvatar.tsx]"]
  node_config["Natally Settings"]
  node_voice["Voice Playback<br/>[voiceService.ts]"]
end

subgraph group_account["Accounts and Services"]
  node_authview["Authentication Modal<br/>[AuthModal.tsx]"]
  node_firebase["Firebase Client<br/>[firebase.ts]"]
end

node_user(("User"))
node_firebase_service[("Firebase Services")]
node_geocoding["Geocoding Services"]
node_tts["Speech Endpoint"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_chartform
node_chartform -->|"searches places"| node_locations
node_locations -->|"queries fallback"| node_geocoding
node_app -->|"calculates chart"| node_engine
node_app -->|"computes themes"| node_themes
node_app -->|"requests reading"| node_readings
node_app -->|"renders chart"| node_astrolabe
node_app -->|"renders themes"| node_wisdomview
node_app -->|"renders readings"| node_readingview
node_app -->|"renders assistant"| node_chat
node_app -->|"opens export"| node_export
node_app -->|"wraps panels"| node_cards
node_app -->|"renders selection"| node_selection
node_app -->|"renders sprite"| node_sprite
node_app -->|"opens account"| node_authview
node_app -->|"saves settings"| node_voice
node_astrolabe -->|"uses chart data"| node_engine
node_themes -->|"uses chart result"| node_engine
node_readingview -->|"requests readings"| node_readings
node_readingview -->|"uses chart data"| node_engine
node_readingview -->|"uses place data"| node_locations
node_readingview -->|"renders text"| node_richtext
node_readings -->|"uses chart types"| node_engine
node_chat -->|"asks assistant"| node_chatservice
node_chat -->|"speaks replies"| node_voice
node_chat -->|"renders messages"| node_richtext
node_chat -->|"opens settings"| node_config
node_chatservice -->|"uses chart data"| node_engine
node_sprite -->|"renders avatar"| node_avatar
node_sprite -->|"uses voice settings"| node_voice
node_config -->|"renders avatar"| node_avatar
node_config -->|"updates settings"| node_voice
node_voice -->|"requests speech"| node_tts
node_authview -->|"authenticates"| node_firebase
node_firebase -->|"initializes client"| node_firebase_service

click node_app "https://github.com/rebots-online/natally-gemini/blob/main/src/App.tsx"
click node_chartform "https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatalInputForm.tsx"
click node_locations "https://github.com/rebots-online/natally-gemini/blob/main/src/services/locations.ts"
click node_engine "https://github.com/rebots-online/natally-gemini/blob/main/src/services/ephemeris.ts"
click node_astrolabe "https://github.com/rebots-online/natally-gemini/blob/main/src/components/Astrolabe3D.tsx"
click node_themes "https://github.com/rebots-online/natally-gemini/blob/main/src/services/astrowisdom.ts"
click node_wisdomview "https://github.com/rebots-online/natally-gemini/blob/main/src/components/ThemesAndWisdomBox.tsx"
click node_readings "https://github.com/rebots-online/natally-gemini/blob/main/src/services/readings.ts"
click node_readingview "https://github.com/rebots-online/natally-gemini/blob/main/src/components/ReadingsModal.tsx"
click node_chat "https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatallyChatbot.tsx"
click node_chatservice "https://github.com/rebots-online/natally-gemini/blob/main/src/services/natallyChat.ts"
click node_richtext "https://github.com/rebots-online/natally-gemini/blob/main/src/components/RichText.tsx"
click node_export "https://github.com/rebots-online/natally-gemini/blob/main/src/components/ExportModal.tsx"
click node_cards "https://github.com/rebots-online/natally-gemini/blob/main/src/components/DraggableCard.tsx"
click node_selection "https://github.com/rebots-online/natally-gemini/blob/main/src/components/SelectedComponentsBar.tsx"
click node_sprite "https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatallySprite.tsx"
click node_avatar "https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatallyAvatar.tsx"
click node_config "https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatallyConfigModal.tsx"
click node_voice "https://github.com/rebots-online/natally-gemini/blob/main/src/services/voiceService.ts"
click node_authview "https://github.com/rebots-online/natally-gemini/blob/main/src/components/AuthModal.tsx"
click node_firebase "https://github.com/rebots-online/natally-gemini/blob/main/src/services/firebase.ts"

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_chartform,node_locations,node_engine,node_astrolabe,node_themes,node_wisdomview,node_user toneBlue
class node_readings,node_readingview,node_chat,node_chatservice,node_richtext,node_firebase_service toneAmber
class node_app,node_export,node_cards,node_selection,node_sprite,node_avatar,node_config,node_voice toneMint
class node_authview,node_firebase toneRose
class node_geocoding,node_tts toneIndigo
```

## Components

### Chart and Insights

- [Birth Details](https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatalInputForm.tsx): `src/components/NatalInputForm.tsx`
- [Place Search](https://github.com/rebots-online/natally-gemini/blob/main/src/services/locations.ts): `src/services/locations.ts`
- [Natal Chart Engine](https://github.com/rebots-online/natally-gemini/blob/main/src/services/ephemeris.ts): `src/services/ephemeris.ts`
- [3D Astrolabe](https://github.com/rebots-online/natally-gemini/blob/main/src/components/Astrolabe3D.tsx): `src/components/Astrolabe3D.tsx`
- [Themes and Numerology](https://github.com/rebots-online/natally-gemini/blob/main/src/services/astrowisdom.ts): `src/services/astrowisdom.ts`
- [Themes View](https://github.com/rebots-online/natally-gemini/blob/main/src/components/ThemesAndWisdomBox.tsx): `src/components/ThemesAndWisdomBox.tsx`

### Readings and Chat

- [Reading Generator](https://github.com/rebots-online/natally-gemini/blob/main/src/services/readings.ts): `src/services/readings.ts`
- [Readings Modal](https://github.com/rebots-online/natally-gemini/blob/main/src/components/ReadingsModal.tsx): `src/components/ReadingsModal.tsx`
- [Natally Chat](https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatallyChatbot.tsx): `src/components/NatallyChatbot.tsx`
- [Chat Service](https://github.com/rebots-online/natally-gemini/blob/main/src/services/natallyChat.ts): `src/services/natallyChat.ts`
- [Rich Text Renderer](https://github.com/rebots-online/natally-gemini/blob/main/src/components/RichText.tsx): `src/components/RichText.tsx`

### Interface and Voice

- [App Orchestrator](https://github.com/rebots-online/natally-gemini/blob/main/src/App.tsx): `src/App.tsx`
- [Export and Share](https://github.com/rebots-online/natally-gemini/blob/main/src/components/ExportModal.tsx): `src/components/ExportModal.tsx`
- [Draggable Cards](https://github.com/rebots-online/natally-gemini/blob/main/src/components/DraggableCard.tsx): `src/components/DraggableCard.tsx`
- [Selected Components](https://github.com/rebots-online/natally-gemini/blob/main/src/components/SelectedComponentsBar.tsx): `src/components/SelectedComponentsBar.tsx`
- [Natally Sprite](https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatallySprite.tsx): `src/components/NatallySprite.tsx`
- [Natally Avatar](https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatallyAvatar.tsx): `src/components/NatallyAvatar.tsx`
- [Natally Settings](https://github.com/rebots-online/natally-gemini/blob/main/src/components/NatallyConfigModal.tsx): `src/components/NatallyConfigModal.tsx`
- [Voice Playback](https://github.com/rebots-online/natally-gemini/blob/main/src/services/voiceService.ts): `src/services/voiceService.ts`

### Accounts and Services

- [Authentication Modal](https://github.com/rebots-online/natally-gemini/blob/main/src/components/AuthModal.tsx): `src/components/AuthModal.tsx`
- [Firebase Client](https://github.com/rebots-online/natally-gemini/blob/main/src/services/firebase.ts): `src/services/firebase.ts`

### Other components

- **User**
- **Firebase Services**
- **Geocoding Services**
- **Speech Endpoint**

## Connections

- User → App Orchestrator: uses (evidence: `src/App.tsx`)
- App Orchestrator → Birth Details: renders (evidence: `src/App.tsx`)
- Birth Details → Place Search: searches places (evidence: `src/components/NatalInputForm.tsx`)
- Place Search → Geocoding Services: queries fallback (evidence: `src/services/locations.ts`)
- App Orchestrator → Natal Chart Engine: calculates chart (evidence: `src/App.tsx`)
- App Orchestrator → Themes and Numerology: computes themes (evidence: `src/App.tsx`)
- App Orchestrator → Reading Generator: requests reading (evidence: `src/App.tsx`)
- App Orchestrator → 3D Astrolabe: renders chart (evidence: `src/App.tsx`)
- App Orchestrator → Themes View: renders themes (evidence: `src/App.tsx`)
- App Orchestrator → Readings Modal: renders readings (evidence: `src/App.tsx`)
- App Orchestrator → Natally Chat: renders assistant (evidence: `src/App.tsx`)
- App Orchestrator → Export and Share: opens export (evidence: `src/App.tsx`)
- App Orchestrator → Draggable Cards: wraps panels (evidence: `src/App.tsx`)
- App Orchestrator → Selected Components: renders selection (evidence: `src/App.tsx`)
- App Orchestrator → Natally Sprite: renders sprite (evidence: `src/App.tsx`)
- App Orchestrator → Authentication Modal: opens account (evidence: `src/App.tsx`)
- App Orchestrator → Voice Playback: saves settings (evidence: `src/App.tsx`)
- 3D Astrolabe → Natal Chart Engine: uses chart data (evidence: `src/components/Astrolabe3D.tsx`)
- Themes and Numerology → Natal Chart Engine: uses chart result (evidence: `src/services/astrowisdom.ts`)
- Readings Modal → Reading Generator: requests readings (evidence: `src/components/ReadingsModal.tsx`)
- Readings Modal → Natal Chart Engine: uses chart data (evidence: `src/components/ReadingsModal.tsx`)
- Readings Modal → Place Search: uses place data (evidence: `src/components/ReadingsModal.tsx`)
- Readings Modal → Rich Text Renderer: renders text (evidence: `src/components/ReadingsModal.tsx`)
- Reading Generator → Natal Chart Engine: uses chart types (evidence: `src/services/readings.ts`)
- Natally Chat → Chat Service: asks assistant (evidence: `src/components/NatallyChatbot.tsx`)
- Natally Chat → Voice Playback: speaks replies (evidence: `src/components/NatallyChatbot.tsx`)
- Natally Chat → Rich Text Renderer: renders messages (evidence: `src/components/NatallyChatbot.tsx`)
- Natally Chat → Natally Settings: opens settings (evidence: `src/components/NatallyChatbot.tsx`)
- Chat Service → Natal Chart Engine: uses chart data (evidence: `src/services/natallyChat.ts`)
- Natally Sprite → Natally Avatar: renders avatar (evidence: `src/components/NatallySprite.tsx`)
- Natally Sprite → Voice Playback: uses voice settings (evidence: `src/components/NatallySprite.tsx`)
- Natally Settings → Natally Avatar: renders avatar (evidence: `src/components/NatallyConfigModal.tsx`)
- Natally Settings → Voice Playback: updates settings (evidence: `src/components/NatallyConfigModal.tsx`)
- Voice Playback → Speech Endpoint: requests speech (evidence: `src/services/voiceService.ts`)
- Authentication Modal → Firebase Client: authenticates (evidence: `src/components/AuthModal.tsx`)
- Firebase Client → Firebase Services: initializes client (evidence: `src/services/firebase.ts`)
