Files
tabungin/docs/planning/project-plan.md
dwindown 35e93b826a chore: cleanup root folder markdown files
- Deleted 36 old session/progress files (Oct 8-13)
- Deleted deprecated FIREBASE_SETUP.md
- Moved 4 planning documents to docs/planning/
  - PROJECT_PLAN.md → project-plan.md
  - PROJECT_STANDARDS.md → project-standards.md
  - TODO_ADMIN_FEATURES.md → todo-admin-features.md
  - IMPLEMENTATION_PLAN.md → implementation-plan.md
- Updated docs/README.md with new planning documents
- Root folder now only contains README.md
2025-10-13 09:37:03 +07:00

82 lines
3.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tabungin — CrossPlatform Final Plan (v1)
_Last updated: 11 Aug 2025_
---
## 1) Executive summary
**Goal:** Build a **simple but flexible** crossplatform personal finance app (web, desktop via Tauri, Android via Tauri Mobile) with a freemium model. Core features: money wallets, transactions (incl. recurring), basic reports. Premium priorities (in order): **Assets**, **Exports**, **API/Webhooks**.
**Principles:** One backend for all clients; one shared UI + core logic; thin platform shells; OIDC-based login that works everywhere; data consistency within 10s across devices. Keep the stack lean to avoid unnecessary complexity or startupscale overhead.
---
## 2) Architecture overview
- **Clients:**
- Web SPA (client-side pages) / optional PWA
- Desktop app (Tauri) for Win/macOS/Linux
- Android app (Tauri Mobile); iOS later if needed
- **Shared packages:**
- `packages/core` — domain models, currency math, recurrence engine, validations (TS)
- `packages/ui` — React components/screens, theming, accessibility
- **Backend:** NestJS (Node + TypeScript). REST API with typed SDK. Jobs/queues for recurring txns, price updates, exports, and notifications.
- **Database:** PostgreSQL (selfhosted on Coolify) — no reliance on 3rdparty DB vendors.
- **Auth:** OIDC via **Supabase Auth** (costeffective, quick to set up) with mapping to our own `users` table for vendor independence.
- **Notifications:** Inapp center + Email; other channels (Web Push, Desktop OS, Android Push) can be added later.
---
## 3) Technology choices (finalized for v1)
- **Frontend:** React + Tailwind CSS.
- **Desktop/Mobile shell:** Tauri v2.
- **Backend framework:** **NestJS** — opinionated structure, modular, maintainable.
- **ORM & schema:** **Prisma** — typesafe queries, smooth migrations.
- **Database hosting:** Selfhosted PostgreSQL on Coolify.
- **Email delivery:** Elastic Email (API-based) with backend webhook support for bounces/complaints; fallback to SMTP if desired.
- **Charting library:** **Recharts**.
- **Export libraries:** CSV (builtin first), Excel (ExcelJS, later), PDF (Playwright for serverside render, later).
- **Jobs/queues:** **pg-boss** (Postgresbased) — minimal extra infra.
- **Object storage:** Not needed for v1 (direct downloads); S3compatible (e.g., Cloudflare R2) later.
- **Error tracking:** Optional for v1; add Sentry when in public beta.
- **Date/time & validation:** datefns (+TZ) and Zod.
---
## 4) SingleDev Lean Mode Workflow
**Purpose:** Deliver a usable crossplatform MVP quickly without committing to full “startupscale” complexity.
**Keep for v1:**
- Web SPA as the first client; desktop shell added once web is stable.
- NestJS backend + Prisma with Postgres on Coolify.
- Supabase Auth (OIDC) → local `users` table mapping.
- Inapp notifications.
- Elastic Email API for critical notices.
- CSV export (inline download).
- Simple recurring engine (pg-boss).
**Defer to later:**
- Mobile shell (after desktop parity).
- Push notifications (Web, Desktop OS, Android FCM).
- PDF/Excel exports.
- Object storage.
- Public API + webhooks.
- Sentry and advanced monitoring.
**Benefit:** Lower development overhead, fewer vendors, faster iteration. All deferred features are planned so they can be slotted in without rearchitecture.
---
## 5) Roadmap & acceptance criteria
- **Phase 1:** Web MVP (auth, wallets, transactions, recurrences, basic reports, CSV export, email notices).
- **Phase 2:** Desktop app (Tauri) with parity.
- **Phase 3:** Android app (Tauri Mobile) with local notifications.
- **Phase 4:** Premium features (Assets → Exports → API/Webhooks) + extra notification channels.
---
## 6) Next steps
1) Finalize Elastic Email API integration + webhook handling.
2) Prepare sprintready tickets for Phase 1.
3) Implement in Lean Mode, keeping deferred features behind flags for future expansion.