-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Edoardo BAROLO edited this page Jul 17, 2026
·
1 revision
src/jhora/
├── types/ Enums: Graha, Rasi, Nakshatra, Varga, Bhava, Dasa
├── ephemeris/ Swiss Ephemeris wrapper (18 API functions)
├── charts/ ChartBuilder → ChartData (frozen, immutable)
├── calc/ 18 modules: strengths, yogas, dasas, transits...
├── dasas/ 12 dasa systems
├── ai/ AI engine, RAG, JSON export, embeddings, teacher
├── interpreter/ Chart reading, knowledge base
├── export/ HTML report generator
├── io/ Atlas (SQLite/FTS5), JHD parser
├── core/ Unified database (get_db singleton)
├── cli/ Typer CLI (27 commands)
├── tui/ prompt_toolkit menu system
└── ui/ PyQt6 GUI (8-category tabs, chart widget, dasa timeline)
ChartData is immutable. Once computed, never modified. Thread-safe, cacheable.
All calculations are pure. Same input → same output. No state, no side effects.
Database via get_db(). Never open SQLite directly. Thread-safe connection pool.
CLI, GUI, TUI parity. Every calc/ module must be wired into:
- CLI command (
src/jhora/cli/main.py) - GUI tab or table (
src/jhora/ui/main_window.py) - TUI action (
src/jhora/tui/main.py)
AI sees everything. New computed data must be added to
src/jhora/ai/analysis.py → build_analysis_text().
Birth Data → ChartBuilder → ChartData (frozen)
↓
┌───────────┼───────────┐
↓ ↓ ↓
Shadbala Yogas Dasas
↓ ↓ ↓
└───────────┼───────────┘
↓
build_analysis_text()
↓
RAG Prompt → LLM → Response
Single data/jhora.db (SQLite, ~6.5MB):
-
cities— 34,006 cities with FTS5 -
knowledge_texts— 16 textbooks (1.96M chars) with FTS5 -
textbook_chunks— vector embeddings (optional) -
charts+chart_planets— user-saved charts -
preferences— key-value store