// chapter 1
The problem
Organisations in India were watching staff and students use AI tools on their own. Three things worried them:
- No control. No way to decide who gets access, or to switch it off when someone leaves.
- Unpredictable cost. Per-seat plans charge the same for someone who asks two questions a month and someone who asks two hundred.
- Language. Many users think and work in Hindi or Hinglish.
The brief I set myself: an assistant anyone can use in seconds, and an admin panel that gives the organisation full control over access and spending, without ever exposing private chats.
// chapter 2
What I built
The assistant
Streaming chat in English, Hindi and Hinglish; ready-made assistants; PDF and photo questions; voice input and read-aloud; properly rendered maths; custom instructions; shareable chat links; goals with email reminders.
Credits and limits
1 question = 1 credit (2 with a file). Every credit movement is a ledger entry inside a database transaction. Failed answers are refunded automatically. Daily limits, monthly budgets and answer-length caps.
Organisations
Organisation, department and member credit pools; bulk member import with welcome emails; access end dates; department admins; their own AI instructions, assistants, logo and welcome message; low-credit alerts and weekly reports.
Privacy and safety
Admins see usage numbers only, never chats. Possibly unsafe questions are flagged for the owner alone. Invite-only accounts, hashed passwords, rotating refresh tokens and an audit log of every admin action.
AI sales assistant
Finds organisations, reads their websites, scores fit and writes a personal pitch from the seller’s own facts. Pipeline, daily to-do list, reply tracking and sales teams. Can be switched on for any customer. Nothing is sent without a person pressing Send.
Growth and operations
Referral links with rewards for friends, organisations and commissioned partners; an access-request flow; revenue against AI cost; and a daily owner report by email.
// chapter 3
How it works
A question, step by step:
- 1The API checks the person’s status, access period, daily limit and monthly budget.
- 2In one database transaction it reserves the credit and logs the question, with an idempotency key so a double-click never charges twice.
- 3It builds the instructions: Lets9go’s, the organisation’s, the chosen assistant’s and the person’s own.
- 4The AI gateway picks a model from the pool, respecting each model’s rate limit, and fails over to the next if one is busy.
- 5The answer streams word by word. If the person presses Stop, the partial answer is kept.
- 6On success the usage is recorded; on failure the credit is refunded with a clear message.
// chapter 4
The hard parts
Money you can trust. Credits move between organisation, department and member pools. Every movement is conditional (“take 10 only if 10 are there”) inside a transaction, retried automatically when two admins act at once. Balances never go negative, and every change has a ledger row.
Limits that work on serverless. The API runs as many short-lived instances, so in-memory rate limits would reset constantly. Per-person and per-email limits live in the database with atomic counters and self-expiring windows, shared by every instance.
Separate data for every customer. The sales assistant serves Lets9go and any organisation it’s switched on for. Every lead loads within its owner’s scope, and automated tests try to read and change other organisations’ leads to prove they can’t.
AI output that looks right. Models write maths in several formats and sometimes forget the markers. A small formatter normalises them before rendering, so formulas show properly instead of as raw code.
Security review
I audited the whole system and fixed what I found: security headers on the site and API, a patched maths library, login responses that don’t reveal which emails exist (same message, same timing), constant-time secret checks, and an admin action that returned a server error.
// chapter 5
Results
Live
in production at lets9go.online, invite-only
3 roles
owner, organisation admin and member, plus department admins and sales teams
80+
automated end-to-end checks across referrals, organisation sales and teams
Lets9go shows the full range of what I do: product thinking, AI integration, multi-tenant backends, billing logic, security, email automation and a polished interface, built and shipped by one person.
- Next.js 16
- React
- Tailwind CSS
- Fastify 5
- Prisma
- MongoDB Atlas
- Gemini API
- Vercel
- SMTP / IMAP
