I Used Claude Code to Build a KYC Spec for Indian Stock Broking 🇮🇳

I Used Claude Code to Build a KYC Spec for Indian Stock Broking 🇮🇳

# fintech# ai# kyc# onboarding
I Used Claude Code to Build a KYC Spec for Indian Stock Broking 🇮🇳Rakesh Waghela

The Problem 🤯 If you've ever tried to open a demat account in India, you know the pain —...

The Problem 🤯

If you've ever tried to open a demat account in India, you know the pain — PAN verification, Aadhaar e-KYC, DigiLocker consent, bank penny drop, KRA registration, CKYC upload, eSign... the list goes on.

Now imagine you're the engineer who has to build that system. You're staring at 25+ vendor APIs, 8 regulatory bodies, 454 data fields, and SEBI circulars that change every quarter.

I needed a single source of truth. Something that connects the dots between what the user sees on screen and what happens behind the scenes — the API calls, the batch pipelines, the maker-checker workflows, the exchange registrations.

So I built one. With Claude Code as my co-pilot. 🤖

What I Built 📚

KYC Onboarding Specification — a 57-page technical docs site covering:

  • 🖥️ 9-screen mobile-first user journey — from mobile OTP to eSign in ~6 minutes
  • 🔌 25+ vendor integrations — Decentro, Digio, HyperVerge, Leegality, TrackWizz, and more
  • 🏭 8 parallel batch pipelines — KRA, CKYC, NSE, BSE, MCX, CDSL, NSDL, Income
  • Maker-checker admin workflow — because compliance teams don't trust automation (rightly so)
  • 📋 454-field master dataset — every field mapped to its source, validation rule, and destination
  • 📜 Full SEBI/KRA/CKYC regulatory mapping — current as of Feb 2026

How Claude Code Helped 🛠️

I didn't write this in Google Docs. I used Claude Code (Anthropic's CLI agent) to research, draft, and iterate on the entire spec.

Here's what that looked like in practice:

Research phase — I'd ask Claude to deep-dive into vendor APIs. "Read the Decentro docs and map their PAN verification response to our field schema." It would search, read, cross-reference, and produce structured tables.

Drafting — Each of the 57 pages went through Claude. I'd describe the screen flow or pipeline step, and Claude would draft the technical spec — field mappings, API sequences, error handling, edge cases. I'd review, correct, iterate.

Regulatory cross-referencing — SEBI circulars are dense. I'd feed Claude the circular text and ask "What does this mean for our KRA upload format?" Getting structured answers saved hours of lawyer-brain parsing.

The docs site itself — Built with Astro Starlight. Claude scaffolded the config, created custom components (screen cards, vendor badges, async bars, status flows), wrote the CSS, and even generated the OG image programmatically.

SEO & distribution — Claude set up JSON-LD structured data, robots.txt, llms.txt, IndexNow submissions to 4 search engines, Wayback Machine archival, and Cloudflare analytics. All from the terminal.

The Tech Stack 🏗️

Layer Tool
Docs framework Astro Starlight
Hosting GitHub Pages
AI co-pilot Claude Code (Opus)
Analytics Cloudflare Web Analytics
Search indexing IndexNow + GSC + Bing + Yandex
Diagrams Hand-crafted SVG

Key Takeaway 💡

Building compliance systems is 20% code and 80% understanding the rules. The hardest part isn't the API integration — it's knowing that CKYC search now returns masked numbers (since Jan 2025), or that DDPI replaced POA (since Nov 2022), or that nominee opt-out requires video verification (since Jan 2025).

An AI co-pilot doesn't replace domain expertise. But it compresses the research-to-documentation cycle from weeks to days. I went from "we need a KYC spec" to a fully published 57-page docs site in a fraction of the time it would have taken solo.

Check It Out 👀

🔗 Live site: javajack.github.io/broking-kyc
🐙 GitHub: github.com/javajack/broking-kyc

If you're building fintech in India — especially onboarding, KYC, or compliance systems — I hope this saves you some pain. PRs and feedback welcome.


I'm Rakesh Waghela, a Tech & KYC Solutions Architect. If you're building KYC or compliance systems and want to chat, find me on LinkedIn, X (@webiyo), or book a call on Topmate.