Live expert marketplaces fail on three things: billing that can be gamed, sessions that handle drops unfairly, and matching that sends the wrong expert to the wrong user. We engineered all three. Aadikarta has a tamper-proof server-authoritative billing engine, a 7-state session FSM that handles every edge case from network loss to mid-session recharge, and an ML-powered matching layer that improves with every consultation.
Building a live expert consultation marketplace is harder than it looks. The client needed per-minute billing that couldn't be gamed from the client side, session state that survived network drops fairly for both parties, astrologer matching better than “who's online”, and a personalisation layer that kept seekers coming back. Off-the-shelf chat solutions couldn't handle billing edge cases. Booking plugins couldn't do real-time per-minute deduction. The AI layer was a greenfield build. Everything had to be custom, engineered from first principles, and auditable for disputes.
The engineering decisions that separated a basic chat app from a defensible marketplace product.
The foundation of Aadikarta is an enterprise-grade real-time chat and billing engine — designed to be tamper-proof, auditable, and resilient to every failure mode a live session can encounter.
WebSocket-based chat with FSM session lifecycle. Timer starts on astrologer's first message — not on request. Every state transition is server-authoritative and logged.
Wallet-based per-minute deduction, fixed-time packages, and hybrid model support. All billing is tamper-proof. Mid-session recharge and resume flow supported.
Timer pauses on network failure, app crash, and astrologer disconnection (configurable grace periods). Auto-ends on wallet zero. Pro-rated refunds on early disconnect.
Full audit logs for every billing event and session state. GST/invoice readiness for India. Astrologer payout calculation with deduction and dispute tracking.
Every session transitions through a strict finite state machine. State changes are server-authoritative — the client can never force a transition. This prevents billing fraud, handles edge cases fairly for both parties, and produces a complete audit trail for every session.
The AI layer creates a flywheel of better matches, higher satisfaction, and lower churn — a defensible moat that a basic marketplace cannot replicate without significant ML investment.
ML model ranks astrologers per seeker based on specialty match, past ratings with similar seekers, language preference, and consultation success rate — like Uber's driver matching, applied to expertise.
NLP classifier auto-tags topics from the seeker's first message ('my marriage is struggling' → Marriage, 'job loss' → Career) to feed the matching algorithm in real time before a word is exchanged.
Birth date/time/place → structured Jyotish interpretation (lagna, moon sign, dashas, planetary period) delivered as a pre-consultation brief. Saves astrologers 5–10 minutes per session.
LLM-powered bot handles basic queries when no astrologer is online and upsells to booked appointments — keeping users on-platform instead of leaving for a competitor.
Post-session GPT-4 summary of key advice, action items, and follow-up date — delivered to the seeker as a downloadable PDF. High perceived value at approximately $0.02 per session.
Model trained on days-since-last-visit, wallet balance, consultation frequency, and rating given. Flags at-risk users and triggers personalised push notifications or discount offers.
Predicts when a specific user is likely to consult again based on their individual behaviour patterns, then sends a nudge just before that window.
Uses birth data from SeekerProfile to generate daily/weekly forecasts via planetary transit rules + LLM natural language — replacing generic sun-sign content with something specific to each user.
NLP on text reviews extracts structured themes ('rushed', 'accurate', 'calming') surfaced as tags on astrologer profiles — more trustworthy signal than a raw star rating alone.
Flags suspicious patterns: sessions ending in 30 seconds, wallet self-transfers, fake review rings. Rule-based + Isolation Forest on transaction and consultation data.
Prophet/ARIMA time-series model on daily transaction data forecasts next month's GMV — surfaced as one chart on the admin dashboard for payout planning.
Every module below was scoped, built, and tested as part of a single engagement.
Per-minute billing uses a server-side timer that starts only when the service provider sends their first message — not when the session is requested or accepted. The billing engine deducts from the user's wallet each minute, sends low-balance warnings, and auto-ends the session when the wallet reaches zero. All billing is server-authoritative to prevent client-side manipulation.
AI astrologer matching uses an ML model to rank astrologers per seeker based on specialty alignment with their stated concern, historical rating patterns with similar seekers, language preference, consultation success rate, and current availability. The first message typed by the seeker is classified by an NLP model to auto-tag the concern and feed the ranking algorithm in real time.
The billing timer pauses automatically on network failure, app crash, or astrologer disconnection, with a configurable grace period. If the user reconnects within the grace window, the session resumes and billing continues from where it paused. If the astrologer drops the session without user action, a pro-rated refund is issued to the wallet. All state transitions are logged server-side for audit and dispute handling.
Tutoring, legal advice, financial coaching, astrology — any domain where experts meet seekers in real time faces the same billing and matching challenges. Aavya LabTech can architect the core platform, billing engine, and AI personalisation layer you need to build a defensible product.
Book a Free Consultation