Back to projects
Full StackSaaSBusiness
DuitTools
A suite of business tools at duittools.com: invoice generation with customizable templates and PDF export, payroll management with Malaysian statutory compliance (EPF, SOCSO, PCB), and document AI for automated invoice processing using LLMs and OCR.
Solo Developer
6 months
Problem
Malaysian SMEs rely on spreadsheets for invoicing, payroll, and document processing — leading to calculation errors, compliance risks, and hours of manual data entry each month.
Solution
Built duittools.com — a platform combining three tools: an invoice generator with customizable templates and PDF export, a payroll system with automatic EPF/SOCSO/PCB calculations, and a document AI pipeline that extracts structured data from invoices using OCR and LLMs.
Architecture
Next.js frontend with Supabase for auth and database. FastAPI backend handles document processing — PyTesseract for OCR feeding into OpenAI structured outputs API. Payroll engine applies Malaysian statutory rates server-side. PDF generation via jsPDF and html2canvas. Row-Level Security for multi-tenant data isolation.
Features
Invoice generator with customizable templates, client profiles, and PDF export
Payroll system with automatic EPF, SOCSO, EIS, and PCB tax calculation
Document AI: multi-format upload (PDF, PNG, JPG), LLM extraction with confidence scoring
Human review dashboard for low-confidence document extractions
Monthly payroll runs with approval workflow and payslip generation
Recurring invoice scheduling and payment status tracking
Batch document processing with async task queue
Role-based access: admin, manager, employee views
Tech Stack
Next.jsTypeScriptPythonFastAPIPostgreSQLSupabaseOpenAI APITailwindCSSDocker
Lessons Learned
- Malaysian compliance rules change yearly — build for configurability, not hard-coded rates
- LLM structured outputs need validation — confidence scoring builds user trust
- Multi-tenant RLS must be designed upfront, not retrofitted
- PDF generation with complex layouts is harder than it looks
Challenges
- Annual tax bracket changes required a configurable rates engine
- OpenAI API rate limits required queue-based batching for document processing
- Handling poor-quality document scans with rotated text required preprocessing
- Payslip PDF layouts needed pixel-perfect precision for legal compliance
Future Improvements
- E-invoicing compliance with LHDN MyInvois
- Direct bank integration for salary disbursement
- Fine-tuned model for specific document types
- Mobile app for employee payslip and invoice access