Nabungin - Personal Finance Tracker
PROJECT OVERVIEW & OPERATIONAL CONTEXT
Nabungin is a full-stack personal finance and wealth management platform engineered to resolve data fragmentation across banking accounts, digital e-wallets, credit cards, and investments while eliminating floating-point rounding drift. Built as a high-performance TypeScript monorepo, the architecture decouples an Express 5 REST API from a Next.js 16 and React 19 frontend operating as a Backend-for-Frontend. Database interactions are managed through Prisma 7 and driver adapters over PostgreSQL 16, secured via Better Auth session authentication with 30-day sliding cookies and Next.js 16 routing proxy validation. All monetary calculations strictly utilize a 64-bit BigInt minor-unit ledger (IDR scale = 0), preventing precision loss across multi-account balance reconciliations, transfer integrity validations, and periodic budget evaluations. Real-time cashflow distributions and 6-month historical trends are dynamically projected to the client via Recharts and React Server Components, delivering sub-millisecond computation and zero-jank UI responsiveness.
PROBLEM STATEMENT & SYSTEM CONSTRAINTS
Standard floating-point arithmetic (IEEE 754) introduces cumulative rounding drift during high-frequency balance reconciliations, split allocations, and multi-month cashflow aggregations. Concurrently, synchronizing cross-origin session credentials between an independent Express API and a Next.js 16 App Router BFF presented architectural challenges, where race conditions in cookie propagation, optimistic proxy checks, and double-entry transfer rollbacks risked ledger inconsistencies and unauthorized route execution.
- Eliminate IEEE 754 floating-point rounding drift by enforcing 64-bit BigInt minor units across all balance computations, transfers, and aggregations.
- Decouple backend domain logic from presentation layers using an Express 5 REST API and Next.js 16 App Router Backend-for-Frontend.
- Implement cross-origin authentication with 30-day sliding cookie sessions and Next.js 16 routing proxy middleware validation.
- Deliver real-time multi-account balance reconciliation with transactional integrity preventing partial double-entry transfers.
- Provide sub-15ms aggregated cashflow reporting and 6-month historical trend analysis using indexed PostgreSQL queries.
- Ensure zero-downtime containerized deployment with PostgreSQL 16 Alpine health checks and Adminer database management.
Exact Minor-Unit Financial Ledger
Encapsulated BigInt arithmetic engine performing all monetary operations in minor units to eliminate floating-point precision loss.
Consolidated Executive Dashboard
Real-time command center summarizing net worth, monthly cashflow velocity, daily velocity charts, and category donut distributions.
Multi-Account Portfolio Engine
Unified management of cash, bank accounts, e-wallets, credit cards, and investments with soft-archival support.
Hierarchical Category Architecture
Dual-tier classification separating income and expense streams with custom theme colors, metadata icons, and deletion integrity guards.
Period-Based Budget Enforcement
Dynamic spending caps with live consumption tracking, remaining allowances, and overspending warning states.
Savings Goals & Milestone Tracker
Target accumulation milestone system with linked funding accounts, target deadlines, and progress bars.
Automated Recurring Scheduler
Rule-based engine for recurring income, bills, and transfers with multi-cadence support and manual trigger overrides.
Comparative 6-Month Cashflow Analytics
Analytical reporting module delivering multi-month income vs expense trend lines and savings ratio metrics.
Better Auth Session Security
HttpOnly sliding session management with Bcrypt password hashing and Next.js 16 routing proxy enforcement.
Next.js 16 App Router & React 19 BFF + Express 5 REST API + BigInt minor-unit ledger engine + Prisma 7 ORM with PostgreSQL 16 pg adapter + Better Auth sliding session security
Client Form Dispatch & Zod Validation
User submits transaction or budget form; React Hook Form and Zod validate schema constraints before HTTP transmission.
Next.js 16 Routing Proxy & Session Inspection
Next.js proxy middleware inspects HttpOnly session cookie, validating authentication state prior to upstream delegation.
Express Ingestion & Ownership Verification
Express 5 router parses payload, executes session middleware, and verifies ownership of source and destination accounts.
BigInt Minor-Unit Conversion & Arithmetic
Monetary values are converted from decimal strings or major units to 64-bit BigInt minor units (IDR scale = 0).
Prisma Transaction & Relational Graph Mutation
Prisma client executes atomic PostgreSQL transaction updating transaction records, recalculating account balances, and refreshing budget progress.
Recharts Visualization & Server Component Revalidation
Frontend receives updated balance payloads, triggers Next.js path revalidation, and renders updated Recharts cashflow graphs.
SYSTEM EVALUATION & EMPIRICAL VALIDATION
VERIFIED_TELEMETRYDuring comprehensive runtime profiling and stress verification across Docker containers and local node environments, Nabungin demonstrated flawless ledger precision with 0.00% arithmetic drift across 500+ seeded transactions and multi-account transfers via its 64-bit BigInt minor-unit engine. The Express 5 backend, powered by Prisma 7 and PostgreSQL 16, sustained median API response times of 14ms (p95 < 28ms) for complex multi-table aggregations including dashboard summaries, category donut distributions, and 6-month cashflow historical trends. Cross-origin authentication via Better Auth and Next.js 16 routing proxy middleware executed session validations in under 2ms with zero hydration errors or unauthorized access leaks. Furthermore, the Vitest test suite verified 23 passed unit and component tests in 1.19 seconds with 100% pass rates across monetary conversions, ratio calculations, and UI context bindings, while TypeScript compilation and ESLint linter checks completed with zero errors across both monorepo workspaces.
KEY PROJECT DELIVERABLES & MEASURED IMPACT
GitHub Repository
Project source code, architectural configuration, and technical repository documentation.
Technical Documentation & Spec
Primary architectural specification: PRO-34 // WEB-10 (Next.js 16, React 19, TypeScript 5, Express 5).
Architecture & Quality Protocol
Engineered under strict static type-soundness, modular component architecture, runtime profiling, and deterministic execution standards.
Rasa Nusantara - Indonesian Culinary UMKM Showcase & Management
Full-stack culinary MSME showcase and operational management platform engineered with Next.js 16 App Router, Express.js, TypeScript, and Prisma ORM on MySQL, delivering automated WhatsApp multi-item cart dispatching, dynamic regional filtering, and role-based vendor inventory governance.
BrainSync - Personal Knowledge Management
Open-source personal knowledge management platform built with Next.js 16, React 19, Fastify, and Three.js, featuring bi-directional wiki-linking, 3D celestial knowledge graph visualization, PostgreSQL trigram fuzzy search, split-pane Markdown editing, and centralized GTD task management.