High-Performance Invoicing Engine & Automated Payment Recovery Platform
InvoiceFlow is a production-grade invoicing and payment infrastructure platform engineered for freelancers and boutique agencies. It streamlines client billing into a frictionless workflow with instant Stripe/Razorpay checkout links, automated PDF generation, background reminder queues via BullMQ, and real-time webhook telemetry.
graph TD
Client[Client / Browser UI] -->|HTTPS / WSS| CDN[Vercel Edge / Static Assets]
Client -->|REST API Requests| API[Express API Server on Bun]
subgraph Core Engine
API --> Auth[JWT & Google OAuth2.0]
API --> Validation[Zod Strict Schemas]
API --> RateLimiter[Sliding Window Rate Limiter]
API --> DB[(PostgreSQL Database via Prisma)]
end
subgraph Async Processing
API -->|Enqueue Jobs| Redis[(Redis / Upstash)]
Redis --> Worker[BullMQ Background Worker]
Worker --> EmailService[Resend Delivery Engine]
Worker --> PDFEngine[Headless PDF Generator]
end
subgraph Webhook Ingestion
Stripe[Stripe / Razorpay Webhooks] -->|HMAC-Signed Events| Ingestion[Idempotent Webhook Handler]
Ingestion -->|State Machine Update| DB
Ingestion -->|Trigger Notification| Redis
end
Stripe-Signature / Razorpay HMAC-SHA256) and enforce database transaction isolation to prevent double-crediting.csrf-csrf)| Subsystem | Stack / Tooling | Purpose |
|---|---|---|
| API Core | Bun / Node.js, Express 5, TypeScript | REST endpoints & business logic |
| Persistence | PostgreSQL (Neon / Supabase), Prisma ORM | ACID-compliant relational storage |
| Background Jobs | BullMQ, Redis (Upstash) | Scheduled payment reminders & retries |
| Frontend | React 19, Vite, Tailwind CSS 4, Framer Motion | High-converting client dashboard |
| Data Fetching | TanStack React Query v5 | Cache invalidation, optimistic updates |
| Email Gateway | Resend API (Domain-verified DKIM/SPF) | Transactional invoice delivery |
| Payment Gateways | Stripe Checkout, Razorpay | Global USD ($) and local INR (โน) processing |
| Observability | Pino Structured Logging, Sentry | Request tracing and error profiling |
git clone https://github.com/sidsri14/invoiceflow.git
cd invoiceflow
cd backend
bun install
cp .env.example .env
# Run database migrations
bunx prisma migrate deploy
# Start API server
bun run dev
# In a separate terminal, start background worker
bun run worker
cd ../frontend
npm install
npm run dev
Navigate to http://localhost:5173 to explore the dashboard and interactive demo generator.
The test suite covers API response formatting, cryptographic auth workflows, schema validators, and webhook processors:
# Run backend test suite
cd backend
bun test src/__tests__
# Run frontend test suite
cd ../frontend
npm test -- --run
# Run full TypeScript verification & production build
npm run build
Results:
Distributed under the MIT License. Crafted with precision by Siddharth Srivastava.