A production-grade, scientifically accurate Telugu Hindu Calendar and Panchangam application built strictly on classical Drik Ganita principles, modern celestial mechanics (Swiss Ephemeris 2.10.03 + NASA JPL DE431 data), Lahiri/Chitrapaksha Ayanamsa, and traditional Amanta lunisolar calendar rules.
Designed as an independent platform with a decoupled Python astronomical engine that can run standalone or integrate seamlessly into Sannivesham or any other ecosystem.
#6B0F1A), Antique Gold (#D4AF37), Ivory (#FAF6EE), and Saffron.telugu-panchangam/
├── backend/
│ ├── ephemeris_lib/
│ │ ├── swedll64.dll # 64-bit Swiss Ephemeris C library (v2.10.03)
│ │ └── ephe/ # NASA JPL DE431 compressed ephemeris files
│ │ ├── semo_18.se1 # Moon ephemeris (1800 - 2399 CE)
│ │ └── sepl_18.se1 # Planetary ephemeris (1800 - 2399 CE)
│ ├── app/
│ │ ├── core/ # Constants (Tithis, Nakshatras, Samvatsaras, etc.)
│ │ ├── astronomical_engine/ # Pure Python, decoupled celestial calculation engine
│ │ │ ├── swe_wrapper.py # Ctypes wrapper to Swiss Ephemeris
│ │ │ ├── ephemeris.py # Planetary coordinates & Lahiri Ayanamsa
│ │ │ ├── root_finder.py # Brent's method root-finder (< 1s precision)
│ │ │ ├── sun_moon_rise.py # Topocentric refraction-corrected rise/set
│ │ │ ├── five_angas.py # The 5 Angas calculation and transition detector
│ │ │ ├── muhurtham.py # Auspicious & inauspicious intervals
│ │ │ ├── telugu_calendar.py # Amanta month, Adhika Masam, 60-year Samvatsara
│ │ │ └── panchangam_day.py # Orchestrator for Panchangam Day (sunrise-to-sunrise)
│ │ ├── festivals/ # Observance rules and festival matching engine
│ │ ├── locations/ # Curated cities database and search service
│ │ ├── api/ # FastAPI routes (panchangam, festivals, locations)
│ │ └── main.py # FastAPI app + static SPA mounting
│ ├── tests/ # 19 automated tests (ephemeris, transitions, festivals, etc.)
│ └── requirements.txt
├── frontend/ # React 19 + TypeScript + Vite responsive web app
│ ├── src/
│ │ ├── api/ # Typed API client
│ │ ├── components/ # Header, LocationModal, HomeToday, Monthly, Daily, Festivals, Yearly
│ │ ├── styles/theme.css # Traditional Telugu royal aesthetic
│ │ └── types/ # TypeScript interfaces
│ ├── package.json
│ └── vite.config.ts
└── README.md
# Set PYTHONPATH to the backend folder
$env:PYTHONPATH = "C:\Users\Damayanti Crest\.gemini\antigravity\scratch\telugu-panchangam\backend"
# Run FastAPI server on port 8000
python -m uvicorn app.main:app --host 127.0.0.1 --port 8000 --reload
Interactive API documentation will be available at:
http://localhost:8000/docshttp://localhost:8000/redocBecause frontend/dist is pre-built, accessing http://localhost:8000 already serves the complete Telugu Panchangam application!
To run the live Vite development server with hot module replacement:
cd frontend
npm run dev
Open http://localhost:5173.
Run all 19 automated tests covering precision ephemeris, root-finding boundary crossings, 30 consecutive days continuity, and canonical festival dates:
$env:PYTHONPATH = "C:\Users\Damayanti Crest\.gemini\antigravity\scratch\telugu-panchangam\backend"
python -m pytest "C:\Users\Damayanti Crest\.gemini\antigravity\scratch\telugu-panchangam\backend\tests" -v
All 19 tests pass in under 1 second:
test_ephemeris_precision.py: Verifies Lahiri Ayanamsa against certified standards ($\pm 0.036’’$) and planetary motion bounds.test_transitions_root_finder.py: Verifies boundary transition root convergence to $< 10^{-6}$ degrees ($< 1$ second precision).test_sunrise_sunset.py: Verifies topocentric solar rise/set and Dinamana conservation.test_30_consecutive_days.py: Verifies 30 consecutive days of continuous tithi, nakshatra, and muhurtham calculations without skips or errors.test_festivals.py: Verifies canonical festival rules (Ugadi, Sri Rama Navami, Vinayaka Chavithi, Deepavali, Makara Sankranti, Maha Shivaratri).test_api_endpoints.py: Verifies all REST API routes and data schemas.The calculation engine in backend/app/astronomical_engine is completely decoupled from web frameworks:
from app.astronomical_engine.panchangam_day import calculate_daily_panchangam
from datetime import date
data = calculate_daily_panchangam(date.today(), latitude=17.3850, longitude=78.4867)
print(data["summary"]["telugu"])
http://localhost:8000/api/panchangam/daily?city_id=hyderabad from any backend service in Sannivesham.