๐Ÿ› ๏ธ 1. Technology Stack

Web Frontend
React 18 + TypeScript + Vite
shadcn/ui ยท Tailwind CSS ยท React Router v6
Charts & Visualization
Recharts
Income/expense charts ยท Net worth timeline
Maps
Leaflet.js + React-Leaflet
Property map ยท Marker clustering ยท Popups
Backend API
Node.js + Express + TypeScript
REST API ยท JWT middleware ยท multer uploads
Database
PostgreSQL 15 (local)
Self-hosted ยท node-postgres (pg) ยท Drizzle ORM ยท pgcrypto
Authentication
Custom JWT (jsonwebtoken + bcrypt)
Email + password ยท Access token (15m) + Refresh token (7d)
DB Migrations
Drizzle Kit
Versioned SQL migrations ยท push & generate commands
AI / OCR
Google Cloud Document AI
Form parser ยท Field extraction ยท Confidence scores
File Storage
Local FS (primary) / AWS S3
Configurable in settings ยท Signed URLs
Email Alerts
Nodemailer + Gmail SMTP
HTML templates ยท App password auth
Push Notifications
Firebase Cloud Messaging
Android push ยท Alert supplements
Task Scheduler
node-cron
Daily alert evaluation ยท 08:00 IST default
Web Server
nginx
HTTPS ยท Reverse proxy ยท Static assets
SSL
Let's Encrypt + Certbot
Auto-renew ยท wealth.justsimple.online
Geocoding
OpenStreetMap Nominatim
Free ยท 1 req/sec ยท Results cached in DB
Mobile App
React Native + Expo
Android 10+ ยท Camera ยท Offline cache
CI/CD
GitHub Actions
Build ยท Test ยท Deploy on push to main
Process Manager
PM2
Cluster mode ยท Zero-downtime reload
Error Monitoring
Sentry
Web + Android ยท Error tracking ยท Alerts

๐Ÿ—„๏ธ 2. Core Database Schema

-- Enable UUID generation (PostgreSQL <13 needs pgcrypto; 13+ has gen_random_uuid() built-in)
CREATE EXTENSION IF NOT EXISTS pgcrypto;

-- USERS (self-contained local auth โ€” no external auth provider)
CREATE TABLE users (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  full_name     TEXT NOT NULL,
  email         TEXT NOT NULL UNIQUE,
  password_hash TEXT NOT NULL,                  -- bcrypt (12 rounds)
  role          TEXT NOT NULL DEFAULT 'user',   -- 'admin'|'user'|'viewer'
  phone         TEXT,
  is_active     BOOLEAN NOT NULL DEFAULT TRUE,
  refresh_token_hash TEXT,                      -- SHA-256 of current refresh token
  created_at    TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  updated_at    TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX idx_users_email ON users(email);

-- FAMILY MEMBERS
CREATE TABLE family_members (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id    UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
  name        TEXT NOT NULL,
  relation    TEXT NOT NULL,  -- 'Self'|'Spouse'|'Father'|'Mother'|'Child'|'Other'
  dob         DATE,
  is_senior   BOOLEAN DEFAULT FALSE,
  created_at  TIMESTAMPTZ DEFAULT NOW()
);

-- PROPERTIES
CREATE TABLE properties (
  id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id        UUID REFERENCES users(id) ON DELETE CASCADE,
  name            TEXT NOT NULL,
  type            TEXT NOT NULL,  -- 'residential'|'commercial'|'land'|'plot'
  address         TEXT,
  latitude        DOUBLE PRECISION,
  longitude       DOUBLE PRECISION,
  purchase_price  NUMERIC(14,2),
  purchase_date   DATE,
  current_value   NUMERIC(14,2),
  notes           TEXT,
  is_rental       BOOLEAN DEFAULT FALSE,
  created_at      TIMESTAMPTZ DEFAULT NOW()
);

-- PROPERTY CONTACTS
CREATE TABLE property_contacts (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  property_id UUID REFERENCES properties(id) ON DELETE CASCADE,
  name        TEXT NOT NULL,
  phone       TEXT NOT NULL,
  role        TEXT NOT NULL  -- 'Caretaker'|'Agent'|'Tenant'|'Neighbour'|'Other'
);

-- PROPERTY TAXES
CREATE TABLE property_taxes (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  property_id UUID REFERENCES properties(id) ON DELETE CASCADE,
  tax_type    TEXT NOT NULL,  -- 'property_tax'|'water_tax'
  year        INTEGER NOT NULL,
  amount_due  NUMERIC(10,2) NOT NULL,
  due_date    DATE NOT NULL,
  paid_date   DATE,
  receipt_path TEXT,
  is_paid     BOOLEAN DEFAULT FALSE
);

-- PROPERTY EXPENSES
CREATE TABLE property_expenses (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  property_id UUID REFERENCES properties(id) ON DELETE CASCADE,
  category    TEXT NOT NULL,  -- 'electricity'|'water'|'internet'|'maintenance'|'other'
  amount      NUMERIC(10,2) NOT NULL,
  expense_date DATE NOT NULL,
  description TEXT,
  receipt_path TEXT
);

-- VEHICLES
CREATE TABLE vehicles (
  id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id        UUID REFERENCES users(id) ON DELETE CASCADE,
  type            TEXT NOT NULL,  -- '2W'|'4W'
  make            TEXT NOT NULL,
  model           TEXT NOT NULL,
  year            INTEGER NOT NULL,
  reg_number      TEXT NOT NULL,
  chassis_no      TEXT,
  engine_no       TEXT,
  fuel_type       TEXT,
  colour          TEXT,
  purchase_price  NUMERIC(12,2),
  purchase_date   DATE,
  photo_path      TEXT,
  created_at      TIMESTAMPTZ DEFAULT NOW()
);

-- VEHICLE INSURANCE
CREATE TABLE vehicle_insurance (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  vehicle_id    UUID REFERENCES vehicles(id) ON DELETE CASCADE,
  insurer       TEXT NOT NULL,
  policy_no     TEXT NOT NULL,
  type          TEXT NOT NULL,  -- 'comprehensive'|'third_party'
  premium       NUMERIC(10,2),
  idv           NUMERIC(12,2),
  start_date    DATE NOT NULL,
  expiry_date   DATE NOT NULL,
  document_path TEXT
);

-- VEHICLE SERVICE
CREATE TABLE vehicle_service (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  vehicle_id    UUID REFERENCES vehicles(id) ON DELETE CASCADE,
  service_date  DATE NOT NULL,
  odometer      INTEGER,
  work_done     TEXT,
  cost          NUMERIC(10,2),
  service_centre TEXT,
  next_date     DATE,
  next_odometer INTEGER
);

-- VEHICLE RENEWALS (RC, PUC, Road Tax)
CREATE TABLE vehicle_renewals (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  vehicle_id  UUID REFERENCES vehicles(id) ON DELETE CASCADE,
  type        TEXT NOT NULL,  -- 'rc'|'puc'|'road_tax'
  expiry_date DATE NOT NULL,
  document_path TEXT
);

-- INSURANCE POLICIES
CREATE TABLE insurance_policies (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id      UUID REFERENCES users(id) ON DELETE CASCADE,
  type          TEXT NOT NULL,  -- 'health'|'life'|'term'|'personal_accident'|'home'
  insurer       TEXT NOT NULL,
  plan_name     TEXT NOT NULL,
  policy_no     TEXT NOT NULL,
  sum_insured   NUMERIC(14,2),
  premium       NUMERIC(10,2),
  frequency     TEXT DEFAULT 'annual',  -- 'annual'|'monthly'|'quarterly'
  start_date    DATE NOT NULL,
  renewal_date  DATE NOT NULL,
  nominee       TEXT,
  notes         TEXT,
  document_path TEXT,
  created_at    TIMESTAMPTZ DEFAULT NOW()
);

-- INSURANCE MEMBERS (covered under policy)
CREATE TABLE insurance_members (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  policy_id   UUID REFERENCES insurance_policies(id) ON DELETE CASCADE,
  member_id   UUID REFERENCES family_members(id) ON DELETE CASCADE
);

-- DOCUMENTS
CREATE TABLE documents (
  id                UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id          UUID REFERENCES users(id) ON DELETE CASCADE,
  member_id         UUID REFERENCES family_members(id) ON DELETE SET NULL,
  property_id       UUID REFERENCES properties(id) ON DELETE SET NULL,
  vehicle_id        UUID REFERENCES vehicles(id) ON DELETE SET NULL,
  doc_type          TEXT NOT NULL,  -- 'Passport'|'Aadhaar'|'PAN'|'DL'|'Visa'|'Other'
  name              TEXT NOT NULL,
  doc_number        TEXT,
  issuing_authority TEXT,
  issue_date        DATE,
  expiry_date       DATE,
  is_non_expiring   BOOLEAN DEFAULT FALSE,
  status            TEXT DEFAULT 'pending',  -- 'valid'|'expiring_soon'|'expired'|'review_needed'
  file_path         TEXT NOT NULL,
  storage_type      TEXT NOT NULL DEFAULT 'local',
  ai_confidence     FLOAT,
  ai_raw_response   JSONB,
  notes             TEXT,
  created_at        TIMESTAMPTZ DEFAULT NOW(),
  updated_at        TIMESTAMPTZ DEFAULT NOW()
);

-- PASSPORT PHOTOGRAPHS
CREATE TABLE photographs (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id    UUID REFERENCES users(id) ON DELETE CASCADE,
  member_id   UUID REFERENCES family_members(id) ON DELETE CASCADE,
  taken_date  DATE NOT NULL,
  file_path   TEXT NOT NULL,
  notes       TEXT,
  created_at  TIMESTAMPTZ DEFAULT NOW()
);

-- FAMILY EXPENSES
CREATE TABLE expenses (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id    UUID REFERENCES users(id) ON DELETE CASCADE,
  category    TEXT NOT NULL,
  amount      NUMERIC(10,2) NOT NULL,
  expense_date DATE NOT NULL,
  description TEXT,
  receipt_path TEXT,
  created_at  TIMESTAMPTZ DEFAULT NOW()
);

-- INCOME
CREATE TABLE income (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id    UUID REFERENCES users(id) ON DELETE CASCADE,
  source      TEXT NOT NULL,  -- 'Salary'|'Rental'|'Freelance'|'Dividend'|'Interest'|'Other'
  amount      NUMERIC(10,2) NOT NULL,
  income_date DATE NOT NULL,
  description TEXT
);

-- RENTAL RECORDS
CREATE TABLE rental_records (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  property_id   UUID REFERENCES properties(id) ON DELETE CASCADE,
  tenant_name   TEXT NOT NULL,
  tenant_phone  TEXT,
  tenant_email  TEXT,
  move_in_date  DATE NOT NULL,
  move_out_date DATE,
  expected_rent NUMERIC(10,2) NOT NULL,
  security_deposit NUMERIC(10,2),
  agreement_path TEXT,
  agreement_end  DATE,
  is_active     BOOLEAN DEFAULT TRUE
);

-- RENT PAYMENTS
CREATE TABLE rent_payments (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  rental_id     UUID REFERENCES rental_records(id) ON DELETE CASCADE,
  period_month  INTEGER NOT NULL,  -- 1-12
  period_year   INTEGER NOT NULL,
  expected      NUMERIC(10,2) NOT NULL,
  received      NUMERIC(10,2) NOT NULL DEFAULT 0,
  payment_date  DATE,
  payment_mode  TEXT,  -- 'cash'|'bank_transfer'|'upi'|'cheque'
  notes         TEXT
);

-- INVESTMENTS
CREATE TABLE investments (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id      UUID REFERENCES users(id) ON DELETE CASCADE,
  type          TEXT NOT NULL,  -- 'stocks'|'mutual_fund'|'fd'|'ppf'|'nps'|'bonds'|'gold'|'other'
  name          TEXT NOT NULL,
  institution   TEXT,
  account_no    TEXT,
  invested      NUMERIC(14,2),
  current_value NUMERIC(14,2),
  start_date    DATE,
  maturity_date DATE,
  notes         TEXT,
  updated_at    TIMESTAMPTZ DEFAULT NOW()
);

-- LOANS
CREATE TABLE loans (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  owner_id      UUID REFERENCES users(id) ON DELETE CASCADE,
  type          TEXT NOT NULL,  -- 'home'|'vehicle'|'personal'|'education'|'other'
  lender        TEXT NOT NULL,
  principal     NUMERIC(14,2) NOT NULL,
  interest_rate NUMERIC(5,2),
  emi           NUMERIC(10,2) NOT NULL,
  emi_due_day   INTEGER NOT NULL,  -- day of month (1-28)
  start_date    DATE NOT NULL,
  end_date      DATE NOT NULL,
  outstanding   NUMERIC(14,2)
);

-- ALERTS LOG
CREATE TABLE alert_logs (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  alert_type  TEXT NOT NULL,  -- 'document_expiry'|'vehicle_insurance'|'property_tax'|etc.
  ref_id      UUID,           -- ID of the record that triggered alert
  sent_to     TEXT NOT NULL,
  days_before INTEGER,
  sent_at     TIMESTAMPTZ DEFAULT NOW(),
  status      TEXT NOT NULL   -- 'sent'|'failed'
);

-- AUDIT LOG (tracks all data changes)
CREATE TABLE audit_logs (
  id         UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  user_id    UUID REFERENCES users(id) ON DELETE SET NULL,
  action     TEXT NOT NULL,     -- 'INSERT'|'UPDATE'|'DELETE'
  table_name TEXT NOT NULL,
  record_id  UUID,
  old_data   JSONB,
  new_data   JSONB,
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

-- SYSTEM SETTINGS (fully self-contained โ€” no external auth provider keys)
CREATE TABLE system_settings (
  key        TEXT PRIMARY KEY,
  value      TEXT NOT NULL,     -- AES-256-GCM encrypted for secrets
  is_secret  BOOLEAN NOT NULL DEFAULT FALSE,
  updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

-- Seed default settings
INSERT INTO system_settings (key, value, is_secret) VALUES
  ('smtp_host',           'smtp.gmail.com',  FALSE),
  ('smtp_port',           '587',             FALSE),
  ('smtp_email',          '',                FALSE),
  ('smtp_password',       '',                TRUE),
  ('smtp_from_name',      'DocuWealth',      FALSE),
  ('docai_api_key',       '',                TRUE),
  ('docai_processor_id',  '',                FALSE),
  ('storage_path',        '/var/docuwealth/storage', FALSE),
  ('alert_schedule',      '0 8 * * *',       FALSE),
  ('global_alert_days',   '[90,30,7]',       FALSE),
  ('jwt_secret',          '',                TRUE),
  ('encryption_key',      '',                TRUE);

๐Ÿ—“๏ธ 3. Development Phases & Tasks

1

Foundation, Auth & Core Setup

Project scaffolding, authentication, database schema, CI/CD pipeline, and admin settings panel. Nothing is built until the foundation is solid.

Weeks 1โ€“310 TasksDeliverable: Deployed base with login + settings
1.1Project scaffolding: React + TypeScript + Vite web app, Node.js + Express + TypeScript API, monorepo structure (pnpm workspaces)Must
1.2Local PostgreSQL 15 setup: install on Oracle Cloud server, create docuwealth database, enable pgcrypto extension, configure pg_hba.conf for local socket access onlyMust
1.3Drizzle ORM setup: schema definition in TypeScript, drizzle-kit generate + migrate, run all DDL migrations to create full schemaMust
1.4Custom JWT authentication: POST /auth/login โ†’ bcrypt verify โ†’ issue access token (15min) + refresh token (7d); POST /auth/refresh; POST /auth/logout (revoke refresh token)Must
1.5Auth middleware: Express middleware that verifies Bearer JWT on all protected routes; extracts userId and role; returns 401 on invalid/expired tokenMust
1.6Seed first admin user: CLI script pnpm seed:admin โ€” creates initial admin account with hashed password; run once on first deployMust
1.7Family Members management: CRUD for family member profiles (name, relation, DOB, senior citizen flag)Must
1.8Admin Settings panel: SMTP config, Document AI config, local storage path, alert defaults โ€” test buttons per section; secrets AES-256-GCM encrypted before DB storageMust
1.9User management UI: create users, assign roles (Admin/User/Viewer), reset passwords, deactivate accountsMust
1.10nginx + PM2 deployment on Oracle Cloud: HTTPS via Let's Encrypt, wealth.justsimple.online, zero-downtime reload; GitHub Actions CI/CD pipeline on push to mainMust
1.11Navigation shell: sidebar / top-nav with all module links, responsive layout, dark theme; health check endpoint (GET /health) verifying DB + storageMust
โœ“ DELIVERABLEDeployed web app at wealth.justsimple.online with local PostgreSQL running, JWT login, family member management, and admin settings panel fully operational.
2

Property Management

Full property CRUD with taxes, expenses, contacts, map integration, and document linking. The most-used module for the primary user.

Weeks 4โ€“610 TasksDeliverable: Full property module with map
2.1Property CRUD: create/edit/delete with all fields (name, type, address, purchase price/date, current value, notes, rental flag)Must
2.2Address geocoding: integrate OpenStreetMap Nominatim, auto-convert address to lat/lng, cache results in DBShould
2.3Leaflet map integration: all properties as markers, colour-coded by type, popup with summary, marker clusteringMust
2.4Property taxes module: add/edit property tax and water tax per year, due date, paid/unpaid status, receipt uploadMust
2.5Property expenses module: log electricity, internet, maintenance, other; monthly/annual summaryMust
2.6Property contacts: add multiple contacts per property (name, phone, role), clickable phone linkMust
2.7Property detail page: full summary view with tabs for overview, taxes, expenses, contacts, documentsMust
2.8Property list view: card grid with key info, status badges, filter by typeMust
2.9Property tax alert integration: 30-day due date alerts wired to alert schedulerMust
2.10Property cost-of-ownership report: total expenses per property per year (taxes + utilities + maintenance)Should
โœ“ DELIVERABLEComplete property management module with interactive map, tax tracking, expense logging, contacts, and 30-day tax due alerts.
3

Vehicle Management

Two-wheeler and four-wheeler registry with insurance, service history, RC/PUC/road tax renewal tracking, and automated alerts.

Weeks 7โ€“89 TasksDeliverable: Complete vehicle module with all alerts
3.1Vehicle CRUD: all fields for 2W and 4W (make, model, year, reg no., chassis, engine, fuel type, colour, purchase details), photo uploadMust
3.2Vehicle list view: cards with thumbnail photo, status badges (insurance, service, RC, PUC), filter by typeMust
3.3Vehicle insurance tracking: CRUD for each vehicle's insurance with all fields, document uploadMust
3.4Insurance expiry alerts: 60, 30, 7 days before expiry via alert schedulerMust
3.5Service history: add/edit/view service records, cost tracking, next service date/odometer configurationMust
3.6Service due alert: 7 days before next service dateMust
3.7RC renewal tracking and 30-day alert; PUC expiry tracking and 15-day alertMust
3.8Road tax renewal tracking and 45-day alertShould
3.9Vehicle detail page: full tabs for overview, insurance, service history, renewals, documentsMust
โœ“ DELIVERABLEVehicle module with full registry, insurance/service/renewal tracking, and automated alerts at all configured thresholds.
4

Insurance Management

Personal and family insurance policies โ€” health, life, term โ€” with senior citizen support, premium tracking, and claim history.

Weeks 9โ€“108 TasksDeliverable: Full insurance management module
4.1Insurance policy CRUD: all types (health/life/term/PA/home), all fields, document uploadMust
4.2Health policy member linking: assign covered family members to each health policyMust
4.3Senior citizen policy view: filter for Father/Mother policies, pre-existing conditions notes, cashless hospital list uploadMust
4.4Premium renewal alerts: 60 and 30 days before renewal date for each active policyMust
4.5Claim history: add/edit claims with date, amount, status, settlement amountShould
4.6Insurance summary dashboard: total annual premium by type, total sum insured, expiring policies this yearShould
4.7Policy list view: cards with insurer logo placeholder, status badge, coverage amount, renewal dateMust
4.8Insurance detail page: full policy details, covered members, premium history, claims, document viewerMust
โœ“ DELIVERABLEComplete insurance management with family and senior citizen policies, claim history, and renewal alerts.
5

Document Management & AI

AI-powered document upload, extraction, classification, and expiry alerts. The system's core intelligence layer.

Weeks 11โ€“1210 TasksDeliverable: AI document processing fully operational
5.1File upload API: multer middleware, local/S3 storage backend, file validation (type, size)Must
5.2Google Document AI integration: send uploaded file, parse response, map fields to document schemaMust
5.3Document create form: AI-pre-filled fields, confidence indicators, user edits and confirmsMust
5.4Document CRUD: view, edit, delete with file replacement on re-uploadMust
5.5Expiry / Non-Expiry classification toggle on each documentMust
5.6Document status auto-compute: valid / expiring_soon / expired โ€” updated on cron and on loadMust
5.7Signed URL generation for secure document download (1-hour TTL)Must
5.8Document list with search (name, number, type, person), filters, colour-coded status pillsMust
5.9AI review queue: documents with confidence <70% shown for manual reviewMust
5.10Document version history: re-upload creates new version; previous versions accessibleShould
โœ“ DELIVERABLEDocument upload with AI extraction, classification, search, signed downloads, and review queue for low-confidence extractions.
6

Family Finances โ€” Expenses & Income

Family expense tracking by category with budgets, income logging from all sources, EMI/loan tracking, and monthly financial reports.

Weeks 13โ€“149 TasksDeliverable: Financial tracking with charts
6.1Expense CRUD: date, category (predefined + custom), amount, description, optional receipt photoMust
6.2Monthly expense summary: total by category, bar chart, compared to previous monthMust
6.3Budget limits per category: set monthly budget, visual alert at 80% consumed, red at 100%Should
6.4Income CRUD: date, source, amount, description; all income sources trackedMust
6.5Income vs expense monthly chart (Recharts bar chart); trailing 6-month viewMust
6.6Loan/EMI tracking CRUD: lender, type, principal, interest rate, EMI amount, due day, start/end dateMust
6.7EMI calendar: upcoming EMI due dates shown in monthly calendar view; alert 3 days before dueShould
6.8Outstanding loan balance tracker: manually update balance; amortization estimate shownShould
6.9Annual financial report: total income, total expenses, savings rate, top expense categoriesShould
โœ“ DELIVERABLEComplete family financial tracking with expense categories, income sources, budgets, loan tracking, and monthly comparison charts.
7

Rental Management

Tenant management, monthly rent collection, arrear tracking, agreement expiry alerts, and rental income reports.

Weeks 15โ€“168 TasksDeliverable: Full rental collection module
7.1Tenant CRUD: name, phone, email, move-in date, expected rent, security deposit, agreement uploadMust
7.2Monthly rent collection: log received amount, payment date, payment mode; auto-calculate arrearMust
7.3Arrear dashboard: total outstanding per property, overall total, red highlight for overdue >30 daysMust
7.4Rental agreement expiry: track agreement end date, alert 60 days before for renewalMust
7.5Rental property expenses linked to property: maintenance, repairs, painting tracked separatelyMust
7.6Security deposit tracking: amount received, current holder, refund status and amountShould
7.7Annual rental income report per property: total collected vs expected, occupancy monthsShould
7.8Tenant history: past tenants per property with dates and payment summaryShould
โœ“ DELIVERABLERental management with tenant profiles, monthly collection, arrear tracking, agreement alerts, and annual income reports.
8

Investment Tracking & Net Worth

Investment portfolio management across all asset classes, FD maturity alerts, bank account tracking, and net worth calculator.

Weeks 17โ€“187 TasksDeliverable: Investment portfolio + net worth
8.1Investment CRUD: type (stocks/MF/FD/PPF/NPS/bonds/gold), institution, account no., invested amount, current value, maturity dateShould
8.2FD maturity alert: 30 days before maturity date via alert schedulerShould
8.3Investment value update: manually update current value periodically; system plots value timelineShould
8.4Bank account tracker: bank, account no. (masked), type, balance (manual entry), IFSCShould
8.5Net worth calculator: property values + vehicle book value + investments โˆ’ outstanding loansShould
8.6Net worth history: net worth calculated monthly and plotted on line chartCould
8.7Portfolio allocation chart: investment types as pie chart (% of total portfolio)Could
โœ“ DELIVERABLEInvestment portfolio with FD alerts, bank account summary, and live net worth calculator.
9

Passport Photographs Archive

Organised photo archive per family member, dated by YYYY-MM-DD, with timeline view and high-quality download.

Week 195 TasksDeliverable: Photograph archive module
9.1Photo upload per family member: date taken (YYYY-MM-DD), high-quality storage (no compression), notesMust
9.2Member gallery: all family members shown with their most recent photo as thumbnailMust
9.3Timeline view per member: all photos ordered by date (newest first), date label displayedMust
9.4Download original: signed URL for high-quality original download; filename as MEMBER_YYYY-MM-DD.jpgMust
9.5Delete old photos: with confirmation; cannot delete the only photo for a memberShould
โœ“ DELIVERABLEPhotograph archive with timeline view, member gallery, and dated original downloads.
10

Alerts, Notifications & Dashboard

Unified alert scheduler across all modules, email delivery, alert logs, and the main dashboard with net worth and upcoming due items.

Weeks 20โ€“219 TasksDeliverable: All alerts live + full dashboard
10.1Unified cron scheduler: single daily job evaluates ALL alert types across all modules at 08:00 ISTMust
10.2Email alert templates: well-designed HTML emails per alert type with action linksMust
10.3Alert deduplication: check alert_logs before sending; no duplicate alerts for same eventMust
10.4Alert log UI: history of all sent alerts with status, filter by type and dateMust
10.5Test alert trigger from settings panel: send test email using current SMTP configShould
10.6Dashboard: summary cards (properties, vehicles, docs, insurance, monthly income, monthly expenses)Must
10.7Dashboard upcoming dues panel: all due items in next 90 days sorted by urgency, colour-codedMust
10.8Dashboard income/expense chart and net worth cardMust
10.9Recent activity feed: last 10 additions/edits across all modulesShould
โœ“ DELIVERABLEAll alerts live across all modules + complete dashboard with upcoming dues, financial summary, and activity feed.
11

Android Application

React Native mobile app with full feature parity to web โ€” camera document upload, push notifications, offline cache, and property map.

Weeks 22โ€“2812 TasksDeliverable: Android APK with full features
11.1React Native + Expo project setup, navigation structure (Stack + Tab navigators), shared TypeScript typesMust
11.2Custom JWT auth client: login/logout/token refresh using the same REST API as web; secure token storage in Expo SecureStoreMust
11.3Dashboard screen: summary cards, upcoming dues list, income/expense chartMust
11.4Property list and detail screens with map (React Native Maps)Must
11.5Vehicle list and detail screens with status badgesMust
11.6Insurance list and detail screensMust
11.7Document list with search + detail screen with document viewerMust
11.8Camera capture + file picker for document upload โ†’ AI processing status screenMust
11.9Family expenses: add expense, view monthly summaryMust
11.10Firebase Cloud Messaging: push notifications for all alert typesShould
11.11Offline mode: cache document list, vehicle list, property contacts using AsyncStorage; sync on reconnectShould
11.12APK build, signing, and internal distribution (direct APK + Play Store preparation)Must
โœ“ DELIVERABLEAndroid APK with full feature parity โ€” camera upload, push notifications, offline cache, property map.
12

Security, Testing & Go-Live

End-to-end testing, security audit, performance testing, backup strategy, error monitoring, and production launch.

Weeks 29โ€“3110 TasksDeliverable: Fully tested production launch
12.1End-to-end test suite: Playwright (web) โ€” critical paths: login, add property, upload doc, view alertsMust
12.2Security audit: JWT secret rotation, bcrypt round verification, AES-256-GCM encryption of stored secrets, signed URL TTL, SQL injection review via parameterised queriesMust
12.3Load testing: k6 or Artillery โ€” 10 concurrent users, 10,000 document scenario, 1,000 alert runsMust
12.4Backup strategy: daily pg_dump to Google Drive via rclone; 30-day retention; monthly restore testMust
12.5File backup: daily sync of /storage to Backblaze B2; verify integrity weeklyMust
12.6SSL verification: Let's Encrypt A+ rating on SSL Labs; auto-renewal verifiedMust
12.7Sentry integration: error monitoring for web + Android; alert on error spikeShould
12.8User acceptance testing: Waheed tests all modules with real data for 2 weeksMust
12.9Operations runbook: deployment steps, backup restore, common troubleshooting, alert failure recoveryShould
12.10Family onboarding: account creation for spouse, data migration from existing records, walkthrough sessionMust
โœ“ DELIVERABLEFully tested, secured, monitored production system with all family accounts active and all existing data migrated.

๐Ÿ“ 4. Project Folder Structure

docuwealth/
โ”œโ”€โ”€ apps/
โ”‚   โ”œโ”€โ”€ web/                        # React 18 + TypeScript + Vite
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ components/         # Reusable UI components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Properties/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Vehicles/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Insurance/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Documents/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Finances/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Rental/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Investments/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Photographs/
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Alerts/
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Settings/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ lib/                # api.ts, auth.ts, utils.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ types/
โ”‚   โ”‚   โ””โ”€โ”€ public/
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ android/                    # React Native + Expo
โ”‚       โ””โ”€โ”€ src/
โ”‚           โ”œโ”€โ”€ screens/
โ”‚           โ”œโ”€โ”€ components/
โ”‚           โ”œโ”€โ”€ navigation/
โ”‚           โ””โ”€โ”€ services/
โ”‚
โ”œโ”€โ”€ server/                         # Node.js + Express + TypeScript
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ routes/                 # properties, vehicles, insurance, docs, finances, rental, investments, photos, alerts, settings
โ”‚       โ”œโ”€โ”€ middleware/             # auth.ts, rateLimit.ts, upload.ts
โ”‚       โ””โ”€โ”€ services/
โ”‚           โ”œโ”€โ”€ documentAI.ts
โ”‚           โ”œโ”€โ”€ storage.ts          # local + S3 abstraction
โ”‚           โ”œโ”€โ”€ mailer.ts
โ”‚           โ”œโ”€โ”€ scheduler.ts        # unified cron job
โ”‚           โ””โ”€โ”€ geocoding.ts
โ”‚
โ”œโ”€โ”€ db/
โ”‚   โ”œโ”€โ”€ schema/                     # Drizzle ORM schema definitions (TypeScript)
โ”‚   โ”œโ”€โ”€ migrations/                 # Generated SQL migration files (numbered)
โ”‚   โ”œโ”€โ”€ seed.ts                     # Seed script (default settings, first admin)
โ”‚   โ””โ”€โ”€ drizzle.config.ts
โ”‚
โ””โ”€โ”€ docs/                           # This requirements documentation
    โ”œโ”€โ”€ index.html
    โ”œโ”€โ”€ Business_Requirements.html
    โ”œโ”€โ”€ Stakeholder_Requirements.html
    โ”œโ”€โ”€ User_Requirements.html
    โ”œโ”€โ”€ System_Requirements.html
    โ”œโ”€โ”€ Software_Requirements.html
    โ””โ”€โ”€ Task-Done.html