Ledger No. 07 PLXN World · Jun 2023 – Mar 2024

CLUE

A tutoring marketplace for IB, IGCSE and A-Level students — bookings, credits and teacher payouts in one place.

DateParticularsDr.Cr.
MonStudent buys credits · Razorpay50 cr
TueBooking · IB Maths session30 cr
TuePlatform fee6 cr
TueTeacher payout ledger24 cr

Illustrative entries. 1 credit = ₹10.

The problem

Three balances. One booking. No room for drift.

A student pays. A teacher teaches. The platform keeps a fee. Every booking touches three balances, and they have to move together — or not at all.

I built CLUE as a ledger first and a marketplace second: a credit engine where 1 credit = ₹10, and every movement is written once, atomically, to all three books.

How it works

Follow one rupee through the books.

  1. 01 Pay
  2. 02 Verify
  3. 03 Book
  4. 04 Settle
Webhook Razorpay signature …
Student wallet0credits
    Credit engine 1 cr = ₹10 idle
    Platform fee0credits
      Teacher payout0credits

        Illustrative amounts. Scroll to post the entries.

        The fine print

        The boring parts, done properly.

        Three payment webhooks

        Razorpay, Stripe and PhonePe all call back. Each payload is checked against its signature before a single credit moves.

        • Razorpay✓
        • Stripe✓
        • PhonePe✓

        A referral loop that previews well

        Peer-to-peer referrals, shared as links with Open Graph previews, so an invite looks like an invite.

        Join me on CLUE for IB Maths
        Placeholder: students laughing around laptops
        CLUE · Tutoring for IB, IGCSE, A-LevelInvited by a friend

        250 lines of security rules

        Firestore rules decide who can read which booking and which ledger. Clients never write a balance.

        // illustrative shape
        match /ledgers/{uid}/entries/{id} {
          allow read: if isOwner(uid) || isAdmin();
          allow write: if false; // server only
        }

        Accounts

        What’s in the books.

        Portal
        Next.js, for students and teachers
        Admin
        A console for the team running the marketplace
        Back end
        Node 22 Cloud Functions, Mumbai region
        Data
        Firestore, guarded by 250 lines of rules
        Money
        Razorpay, Stripe, PhonePe
        Exchange rate1 cr = ₹10
        Ledgers per booking3
        Verified webhooks3
        Lines of rules250
        Functions regionMumbai

        Receipts

        Filed under CLUE.

        Exhibit A · the reel
        Placeholder: hands typing on a laptop
        No. 0412Teacher portal
        Placeholder: books, an apple and ABC blocks
        No. 0413Bookings
        Placeholder: a notebook with a checklist
        No. 0414Admin console

        Stack, itemised.

        ItemUsed for
        Next.jsStudent and teacher portal, admin console
        Node 22 Cloud FunctionsCredit engine, webhooks · Mumbai region
        FirestoreBookings and ledgers, 250-line rules
        Razorpay · Stripe · PhonePePayments, signature-verified webhooks
        Open GraphReferral link previews

        Next application · 01 / 07

        SkyControl
        skycontrol.app

        Voice ATC on models I trained.