logo
Domain Knowledge vs Code - Engineering a KP Astrological System
by John Oba - Afrodev11 September, 2025 • 8 min read
Domain Knowledge vs Code - Engineering a KP Astrological System

A while ago I reconnected with an old friend I used to build and hack with. We hadn't spoken in years. When we finally got back in touch, I pulled up the KP Astro system I'd been working on and ran his details through it.

The results caught both of us off guard. The analysis didn't just throw out vague statements. It spoke directly to what he had been experiencing: why he felt distracted, why coding no longer felt natural, and how he could lean into certain traits to navigate his work better.

He looked at me and said, "John, tell me you didn't hack this to target me."

I hadn't. That was when I realized this system wasn't just another software project. It was capable of producing insights people could actually relate to. Out of curiosity, I checked my own details right after and I was just as surprised. At that point, KP Astro stopped being just an assignment.

Why KP Astro

When the project first came to me, I had no knowledge of KP Astrology. To most people it is simply another branch of astrology. To me, it looked like a stack of unfamiliar concepts: planetary sub lords, house cusps, ruling planets, and dashas.

What changed things was seeing the structure behind it all. KP Astrology is logical. It is built on rules, sequences, and mathematical precision. Once I realized that, the problem became clearer: how to engineer a system that could process those rules, calculate outcomes in real time, and present them in a way that feels approachable.

What the System Does

You can see KP Astro in action to explore all these features yourself.

Chart Generation

  • Birth and Horary charts with South Indian style visualization
  • Multiple Ayanamsa options, including KP_New
  • Rotation by house or degree for specialized analysis
  • Real time planetary positions with retrograde indicators

Astrological Analysis

  • Full ABCD analysis of planets and houses
  • Complete Vimshottari Dasa calculations
  • Ruling planet combinations and strength assessments
  • Prediction templates across all twelve houses

AI Assisted Narratives

  • Insights covering career, marriage, health, property, litigation, travel, and more
  • Ability to generate focused predictions for specific life areas
  • Natural language outputs that transform calculations into something readable

User Experience

  • Google Maps integration for location input
  • Auto or manual coordinates with validation
  • Chart saving, loading, and PDF export
  • Authentication for personalized chart storage

Almanac Features

  • Daily, zodiac, motion, and nakshatra transits
  • Ruling planet transit combinations
  • Calculations for auspicious days

Engineering the System

The real work was in the architecture.

Frontend

Built on Next.js with TypeScript, styled with TailwindCSS and Radix UI. The focus was on rendering speed and responsiveness, especially with complex charts.

Backend and Services

The system is split into services:

  • Main backend handles authentication, user accounts, and chart storage.
  • Calculation service processes heavy computational tasks like astrological analysis.
  • Database stores all persistent data.
  • Cache layer provides fast lookups for frequent requests.

Messaging

Apache Kafka connects the pieces. Heavy computation is queued so the API never blocks, keeping the app responsive even under load.

Infrastructure

All services are containerized. Docker Compose orchestrates them in both development and production. Deployment is automated with Pulumi, which provisions Google Cloud Compute Engine, firewall rules, and networking as code.

CI/CD

GitHub Actions handles the build pipeline. Tests run on every change, maintaining over 95 percent coverage. Images are built and pushed to GHCR and Docker Hub, then pulled onto the VM where Docker Compose restarts the services with the latest release.

The Biggest Challenge

The hardest part of KP Astro wasn't setting up Engineering systems.

The real challenge was domain knowledge.

I knew how to code. I knew how to design systems that scale. But when I first tried implementing what astrologers described as a "logically simple" feature, I struggled. Concepts like cuspal sub lords, star lords, or ruling planet combinations made sense on paper, but they didn't map cleanly to engineering abstractions until I really learned them.

It taught me that engineering prowess matters less when domain knowledge is missing. Without grounding in the system's logic, even the best architecture feels incomplete. Once I began to respect and internalize the rules of KP Astrology, everything else started to click. That was when engineering and domain expertise began to reinforce each other.


If you're interested in seeing KP Astro in action, head over to kpastro.ai and try it yourself. You can also reach out if you want to discuss building systems that bridge traditional knowledge with modern technology. The intersection of ancient wisdom and contemporary engineering is where some of the most fascinating work happens.

Cheers!


2023 AfroDev