-
-
Today Page: Your day at a glance: approvals, deadlines, health score
-
Architecture: AI proposes, you approve, PayPal executes
-
AG-Studio dashboard: Ask a question, get a chart, powered by Claude in AG Studio
-
Chartered Accountant: Every client, one view-only portal for the CA
-
Bryntum Calendar: Every tax and RBI deadline in one calendar
-
Invoice page: Client email in, PayPal invoice out
-
Monthly close page 1: Claude checks your month, with every PayPal read logged
-
Monthly close page 2: Send or hold? Claude advises, you decide
-
Render services: One Blueprint deploys it all on Render
Inspiration
A college friend of ours freelances as a web developer, paid by US and UK clients through PayPal. Getting paid was easy; the year end wasn't. His Chartered Accountant told him his export invoices should have carried GST because he had no Letter of Undertaking, he needed payment proof (FIRA) for every receipt, and he owed interest for skipping advance tax. Then came a weekend matching PayPal transactions to invoices in a spreadsheet.
He didn't know these rules existed until they cost him. We built Niryat so other freelancers don't learn them that way.
What it does
Niryat turns an Indian freelancer's PayPal activity into export-compliance records and keeps them up to date as they work.
- Before invoicing: flags a missing or expiring LUT, suggests the RBI purpose code, and checks every legal condition before an invoice goes out without GST.
- Invoicing: drafts an invoice from a pasted client email, showing where each value came from. It sends one-time, recurring and milestone invoices through PayPal, each with a PDF.
- After payment: records each PayPal payment's fee, net amount and currency, keeps invoice, GST and deadline records correct through refunds and disputes, and matches uploaded FIRA lines to payments.
- Deadlines and reports: an RBI deadline tracker for each invoice, one calendar for every GST, income-tax, RBI and PayPal date, advance-tax estimates and GSTR-1 export data.
- Monthly close: an AI agent reviews the month, checks PayPal and drafts tasks, reminders and advice.
- For CAs: an invited CA gets one view-only portal for every freelancer they serve: a portfolio dashboard, a calendar covering all clients and a page for each client. They can ask questions like "Which clients are missing payment proof?" or "Who has invoices closest to the RBI deadline?" Niryat doesn't replace the CA. It does the collecting and matching they would otherwise chase clients for, so they can spend their time on review, advice and filing.
Nothing is sent, reminded or refunded in PayPal until the user approves it. Every invoice send, reminder and refund appears as an approval card showing the exact PayPal request.
How we built it
Stack. A pnpm + Turbo monorepo in strict TypeScript: Next.js (App Router), Hono on Node, Postgres with Drizzle, and zod validating every request, webhook, PayPal response and environment variable. Sponsor tools: PayPal, Claude, AG Studio, Bryntum Calendar, Render and APIMatic, each covered below.
PayPal: seven features, all in sandbox.
- Log in with PayPal: sign-in and linking the seller account
- Invoicing v2: one-time and recurring export invoices, and payment reminders
- Payments (APIMatic-generated Server SDK): gross, fee and net for each payment, and refunds
- Transaction Search (same SDK): reconciliation every 30 minutes and every night
- Disputes v1: disputes and their response deadlines
- Webhooks: nine invoice, payment and dispute events, each signature-verified
- Agent Toolkit: five read-only tools for our agent
AI agents (Claude). They investigate, explain and draft. They never approve anything, move money or calculate a legal figure.
- Monthly close (Claude Agent SDK) reviews the month with the Toolkit's read tools (
get_invoice,list_invoices,get_dispute,list_disputes,list_transactions). It ranks the work, drafts tasks and advises whether to send or hold each reminder. It also runs every night to propose reminders for unpaid invoices. - Invoice extraction (Claude Agent SDK) turns a client email into an invoice draft, quoting the source text for each value.
- Every PayPal action an agent proposes waits in an approval queue, and the model can never approve its own action. Every tool call is logged, and results are filtered to the user's own records.
Tax figures and deadlines come from a rules package: 12 YAML rules, each with a primary-source citation, an effective date and a pure, unit-tested function.
AG Studio 3.0.0. Dashboards for the freelancer and the CA, with a custom RBI deadline-runway widget (days left on each unpaid invoice) and a custom Compliance reviewer agent working alongside Studio's built-in agents. All of them run on Claude through our own adapter, so no AI key reaches the browser. Ask "Which unpaid invoices are closest to their RBI deadline?" and you get a widget back.
Bryntum Calendar. Category filters, several views, and tooltips that cite each date's legal source. Freelancers can drag their own tasks, legal deadlines stay locked, and CAs see every client's dates in one place.
Render. One Blueprint (render.yaml) deploys the web and API services, managed Postgres, cron jobs for PayPal reconciliation and the monthly trigger, and a Render Workflows task that runs the monthly close.
Building with coding agents. We worked spec-first: a product plan, 13 feature specs with acceptance checkboxes, and build phases with exit gates. Coding agents followed one AGENTS.md file of repo rules and updated the specs, design decisions, sandbox findings and verification log with each change. MCP servers gave them current context: Context7 for library docs, APIMatic's PayPal Context Plugin for the Server SDK, Serena for code navigation, and the PayPal MCP, locked to sandbox. Any PayPal call through MCP needed our approval, and hooks blocked agents from reading or editing .env files.
Challenges we ran into
- The India sandbox didn't match the docs. Partial payments, invoices to Indian customers and attachment uploads all failed for an India seller. We dropped them and link the invoice PDF in the invoice note.
- Transaction Search lagged by over an hour, and invoice payment times were 7 hours off. We read fees, net amounts and times from the capture and use search only for reconciliation.
- Dispute webhooks didn’t arrive in our early sandbox tests, so we also poll the Disputes API on a schedule. A missed dispute is still caught.
- Invoice numbers collided with old ones in the sandbox account, so PayPal rejected new invoices on the hosted demo. New invoices use a YYYYMMDD/seq format.
- A newer Claude model broke the AG Studio assistant, because its default extended thinking failed our adapter's validation. We switched to a model with thinking off.
- No real FIRA to test against, so matching runs on synthetic samples for now.
Accomplishments that we're proud of
- A live demo with one-click freelancer and CA accounts, no sign-up needed.
- These passed end to end on the hosted demo: payment, refund and dispute webhooks, recovery of a missed event by the 30-minute sync, and a monthly close that survived an API restart.
- Every legal number cites its source, and the AI never produces a tax figure.
- Every feature still works by hand without AI, and a monthly budget caps AI spending.
- Automated tests in every package, run on Ubuntu and Windows on every push, plus a secret scan.
What we learned
- Test the platform before planning around it. A day of sandbox testing changed our scope more than any design discussion.
- AI agents are good at going through records and drafting next steps. We don't let them produce numbers the law cares about.
- Keeping a log of what actually passed, and what didn't, kept us honest about what was finished.
- Plain language matters. LUT, FIRA and purpose codes mean little to most freelancers, so every such term in the app comes with a plain explanation.
What's next for Niryat
- Check FIRA matching against real PayPal India FIRAs. We've asked PayPal support for a sample.
- Have a chartered accountant review the rules. They cite primary sources today but haven't been reviewed by a CA.
- Move from sandbox to live PayPal and support more than one seller per deployment through Partner Referrals.
- Test the GSTR-1 export in the GST offline tool with a real GSTIN.
- Keep it free for freelancers, with CA firms paying per client.
Built With
- ag-studio
- apimatic
- bryntum-calendar
- claude
- claude-agent-sdk
- drizzle-orm
- github-actions
- hono
- mcp
- next.js
- node.js
- paypal
- pnpm
- postgresql
- react
- render
- turborepo
- typescript
- vitest
- zod