Revenew
A dashboard for businesses with recurring sales: it predicts when each customer will buy again and who to follow up with, no spreadsheets needed.
Stack: React · TypeScript · TanStack Query · Tailwind CSS · Zod · Firebase
The problem
A business with recurring sales needs to know at a glance when each customer last bought, when they're likely to come back, and who to call this week. That information usually lives in spreadsheets that never warn you about anything.
The solution
A React and TypeScript SPA backed by a custom API (FastAPI and PostgreSQL, with the agent built on LangGraph and Claude) that computes next-purchase estimates. Key decisions:
- Feature-based modules (customers, products, purchases, sales, cash, follow-ups, calendar, dashboard and agent), each with its own domain, actions, hooks and pages.
- TanStack Query for server state: recording a sale changes stock and estimates, so products, customers, dashboard, follow-ups and calendar all refresh together.
- Filters, pagination and dates live in the URL, so any view can be shared.
- AI sales agent: every change it proposes (sales, purchases, cash movements, payments) arrives as a card the user approves, edits or cancels before it runs. Responses stream over SSE (via
fetch, since the request is a POST with a body), and the parser and chat state are pure functions with tests. - Dates in the local time zone: converting to UTC pushed sales made after 6 p.m. in Guatemala into the next day.
- CI on every PR (lint, typecheck, tests) and automatic deploys to Firebase Hosting on merge to
main.
The outcome
In active development, with versioned releases and a CHANGELOG (v0.14.0). The full flow works: customers, inventory, multi-item sales, cash register, follow-ups with filters (7/14/30 days and overdue), calendar, dashboard and an agent with confirmations.