“When you are caught in a problem, think like Shivaji Maharaj — not just with strength, but with strategy.”
This is the philosophy I’ve have been trying to follow while building Fraud-Free Swarajya — my open source journey blending AI, microservices, and monitoring with the spirit of the great Maratha warrior king.
๐น A Warrior’s Lesson: The Escape from Agra
In 1666, Shivaji Maharaj was invited to Aurangzeb’s court in Agra — only to be insulted and imprisoned. But instead of surrendering to fate, he devised a plan. Disguised as a servant, hiding inside baskets of sweets meant for the poor, he escaped the Red Fort with calm precision.
This wasn’t brute force. It was intelligence. Patience. And execution.
Software is no different. During this journey, I ran into countless moments where the project felt stuck. But each issue, like that Agra captivity, had a way out.
๐ณ Lesson #1: Docker Will Misbehave — Until It Doesn’t
- Volume path errors, network misconfigurations, and silent container crashes
- Prometheus wouldn't talk to Grafana until I used
service_name:port
correctly - Postgres was running fine but
org.postgresql.Driver
wasn't found until we added the dependency
๐ง Learning: Know your container’s perspective. Don’t assume localhost. Think like the container. Plan like Shivaji.
๐ Lesson #2: Metrics Are Like Soldiers — Name and Organize Them Right
- I renamed
fraud_db
totransaction_db
to reflect its true role - Service names were standardized —
tanaji-api
,sindhudurg-app
, etc. - This helped with intuitive dashboards, Prometheus scrapes, and readability
๐ง Learning: In battle, clarity of ranks and roles saves lives. In code, it saves hours.
๐ค Lesson #3: AI and Rules Must Co-Exist
- Tanaji (AI) gives a fraud score
- Dadoji (Rules Engine) interprets and explains the score
- I avoided duplicate checks by planning the evaluation flow early
๐ง Learning: Like Shivaji’s council of advisors — combine instinct with reason, and let each do what it does best.
๐ฅ Lesson #4: Logs Are Your Sentries
- Tanaji logs were not showing in Docker — fixed by properly structuring logging format
- Clear message formats like
[SCORING COMPLETE]
helped during debugging
๐ง Learning: If the fort is under attack and no one rings the bell, it’s already too late. Let your logs speak clearly.
๐ Lesson #5: Testing Can Wait — But Shouldn’t Be Ignored
- I paused unit testing to focus on the MVP
- Learned that
@SpringBootTest
vs@WebMvcTest
can massively affect load time and scope - Will return to write focused, lightweight unit tests with mocking
๐ง Learning: Even the strongest wall crumbles without mortar. Tests are the invisible glue.
๐ Lesson #6: Notification System — Coming Soon
I realized mid-way that fraud detection is not enough. The right system must be alerted asynchronously. I’ve added an event-driven notification module to the roadmap for SMS, Email, and Push alerts.
๐ง Learning: Don’t just fight. Communicate.
๐ฆ Lesson #7: Think Modular. Think Reusable.
- Each module should be self-contained
- Even Tanaji (AI) can be reused by others if its API is clean
- Same for Dadoji (Rules Engine) and Kanhoji (Monitoring)
๐ง Learning: Shivaji Maharaj didn’t build one fort. He built a network of independent, resilient ones. So should we.
๐ค️ What’s Next?
- Finish Dadoji core logic
- Begin building Santaji (Feedback Loop)
- Finalize event-based architecture
- Write tests, documentation, and contributor guide
And yes — keep posting, keep learning, and keep the spirit alive. ๐ฎ๐ณ