Swayam
Owns the schema, the billing engine and the live link.
Next.js, Postgres, Drizzle, the full schema, all status values, and the shared functions listed below.
Done when: all four people run the app and small seed locally by 10:30.
Put the first version on Vercel and Neon, then keep the live link working all day.
Done when: main reaches the live link automatically by 11:00.
computeInvoice() covers tax rules, fixed and percentage discounts, minimum purchase or quantity, date windows, usage limits, and product or subscription scope.
Done when: tests cover each rule, and expired or used-up discounts stop applying.
It finds everything due, creates draft invoices with lines filled in, and records why anything was skipped. Daily, weekly, monthly and yearly plans all work.
Done when: a second run creates 0 new invoices, and 5,000 subscriptions finish with visible progress.
An admin control moves the app date forward. That triggers renewals and auto-close, and respects each plan's pause, close-early and renew settings.
Done when: jumping a month changes subscriptions, discounts and overdue invoices correctly, with a clear "simulated date" banner.
Upload a CSV, suggest invoice matches by amount, reference and date, and let staff confirm each one.
Done when: confirming a match records a payment and updates the invoice.