How sarthak-basotia/bhagyanetram works
Bhagyanetram is a Vedic astrology and Vastu web product. A visitor explores guidance or submits birth details; the frontend’s astrology client and the Express API expose astrology operations, with selected calculations delegated to a FastAPI engine. The engine offers kundli, panchang, numerology, matching, and calendar domains, backed by shared ephemeris calculations. The backend also serves generated horoscopes and festival calendars. The source index documents several modules not excerpted; their capabilities are represented, but uncertain internal calls are omitted. The frontend-to-backend API wiring is not evidenced in the excerpts.
Main entry points: services Chart and astrology services · app.js HTTP routes · main.py FastAPI routes · kundli.py Kundli calculations
Components 25
Web experience
- Astrology and Vastu pages
Frontend/src/app/components/pages - App routing
Frontend/src/app/App.tsx - Home and booking
Frontend/src/app/components/HomePage.tsx - Booking dialog
Frontend/src/app/components/BookingModal.tsx - Astrology API client
Frontend/src/api/astrologyApi.ts
Backend API
- HTTP routes
Backend/app.js - Astrology handlers
Backend/controllers/astrologyController.js - Horoscope generation
Backend/services/horoscopeService.js - Festival scheduling
Backend/services/festivalCron.js - Festival generation
Backend/services/festivalGenerator.js
Astrology engine
- FastAPI routes
SwissModel/astro-engine/app/main.py - Kundli calculations
SwissModel/astro-engine/app/routers/kundli.py - Panchang calculations
SwissModel/astro-engine/app/routers/panchang.py - Numerology calculations
SwissModel/astro-engine/app/routers/numerology.py - Kundli matching
SwissModel/astro-engine/app/routers/match.py - Calendar calculations
SwissModel/astro-engine/app/routers/calendar.py - Chart and astrology services
SwissModel/astro-engine/app/services - Ephemeris core
SwissModel/astro-engine/app/core/ephemeris.py - Astrology reference tables
SwissModel/astro-engine/app/core/constants.py
Stored content
- MongoDB
Backend/database.js - Horoscope records
Backend/models/Horoscope.js - Festival records
Backend/models/Festival.js - Booking records
Backend/models/booking.js
Other components
- Visitor
- OpenAI
Connections 31
- Visitor → App routing: opens
Frontend/src/app/App.tsx - App routing → Astrology and Vastu pages: routes to
Frontend/src/app/App.tsx - App routing → Home and booking: routes to
Frontend/src/app/App.tsx - Home and booking → Booking dialog: opens
Frontend/src/app/components/HomePage.tsx - Astrology and Vastu pages → Astrology API client: requests data
Frontend/src/app/components/pages/BirthChartPage.tsx - Astrology API client → HTTP routes: sends requests
- HTTP routes → Astrology handlers: routes to
Backend/app.js - HTTP routes → Horoscope generation: generates
Backend/app.js - HTTP routes → Horoscope records: reads
Backend/app.js - HTTP routes → Festival scheduling: initializes
Backend/app.js - HTTP routes → Festival records: reads
- Astrology handlers → OpenAI: generates text
Backend/controllers/astrologyController.js - Horoscope generation → OpenAI: generates text
Backend/services/horoscopeService.js - Horoscope generation → Horoscope records: upserts
Backend/services/horoscopeService.js - Festival scheduling → Festival generation: runs generator
Backend/services/festivalCron.js - Festival scheduling → Festival records: updates
Backend/services/festivalCron.js - Astrology handlers → FastAPI routes: posts calculations
Backend/controllers/astrologyController.js - FastAPI routes → Kundli calculations: registers
SwissModel/astro-engine/app/main.py - FastAPI routes → Panchang calculations: registers
SwissModel/astro-engine/app/main.py - FastAPI routes → Numerology calculations: registers
SwissModel/astro-engine/app/main.py - FastAPI routes → Kundli matching: registers
SwissModel/astro-engine/app/main.py - FastAPI routes → Calendar calculations: registers
SwissModel/astro-engine/app/main.py - Kundli calculations → Chart and astrology services: dispatches
SwissModel/astro-engine/app/routers/kundli.py - Kundli calculations → Ephemeris core: uses
SwissModel/astro-engine/app/routers/kundli.py - Kundli calculations → Astrology reference tables: uses
- Panchang calculations → Chart and astrology services: dispatches
SwissModel/astro-engine/app/routers/panchang.py - Numerology calculations → Chart and astrology services: dispatches
SwissModel/astro-engine/app/routers/numerology.py - Kundli matching → Chart and astrology services: dispatches
- Calendar calculations → Chart and astrology services: dispatches
SwissModel/astro-engine/app/routers/calendar.py - Chart and astrology services → Ephemeris core: uses
SwissModel/astro-engine/app/services/panchang.py - Chart and astrology services → Astrology reference tables: uses
SwissModel/astro-engine/app/services/panchang.py