Apnaccountant.
A multi-tenant, subscription-based SaaS for invoicing and accounting aimed at SMBs — automated invoice generation, transaction tracking, P&L analytics, and recurring billing.
Architecture & Key Decisions
- Architected from scratch (0 → 1): modular service design, API versioning, a normalized MySQL schema, and multi-tenant data isolation.
- Subscription billing via Razorpay — webhook processing, tiered plans (Free / Paid), automated plan enforcement, and limit checking.
- REST APIs with JWT (RS256) authentication and API key management, serving both web and mobile clients.
- Design patterns in play: Strategy (payment gateways), Observer (webhooks), Factory (JWT generation), Repository (query builder).
Key Features
- Invoice management: multi-currency support, tax-group calculations, PDF generation (mPDF), email notifications, and auto-incrementing invoice numbering.
- Quotation generation and management.
- Financial reporting engine with fiscal-year calculations (April–March) and multi-category P&L analysis with PDF export.
- Query optimization: prepared statements, strategic indexing, and session-based caching.
Why It Matters
Fintech-adjacent domain, end to end
Recurring billing, invoicing, webhooks, financial reporting, and fiscal-year accounting — the exact concerns of a fintech backend. This is a direct-relevance project for fintech positioning, and I owned it from architecture through delivery.
Trade-offs & What v2 Adds
Why session-based limit checks over real-time DB checks?
Performance — acceptable given the way plan limits behave.
Why a monolith?
Faster MVP delivery for a 0→1 product.
What v2 would add
Redis for caching/sessions, a queue for async PDF/email, read replicas for reporting, audit logging for compliance, and international tax rules.
Want the full walkthrough?
Happy to walk through the billing model, webhook handling, and fiscal-year reporting in detail.