Software Requirements
Architecture, technology stack, database schema, API design, and 12 development phases with task-level breakdowns. This is the primary developer reference document.
๐ ๏ธ 1. Technology Stack
๐๏ธ 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
Foundation, Auth & Core Setup
Project scaffolding, authentication, database schema, CI/CD pipeline, and admin settings panel. Nothing is built until the foundation is solid.
| 1.1 | Project scaffolding: React + TypeScript + Vite web app, Node.js + Express + TypeScript API, monorepo structure (pnpm workspaces) | Must |
| 1.2 | Local PostgreSQL 15 setup: install on Oracle Cloud server, create docuwealth database, enable pgcrypto extension, configure pg_hba.conf for local socket access only | Must |
| 1.3 | Drizzle ORM setup: schema definition in TypeScript, drizzle-kit generate + migrate, run all DDL migrations to create full schema | Must |
| 1.4 | Custom 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.5 | Auth middleware: Express middleware that verifies Bearer JWT on all protected routes; extracts userId and role; returns 401 on invalid/expired token | Must |
| 1.6 | Seed first admin user: CLI script pnpm seed:admin โ creates initial admin account with hashed password; run once on first deploy | Must |
| 1.7 | Family Members management: CRUD for family member profiles (name, relation, DOB, senior citizen flag) | Must |
| 1.8 | Admin Settings panel: SMTP config, Document AI config, local storage path, alert defaults โ test buttons per section; secrets AES-256-GCM encrypted before DB storage | Must |
| 1.9 | User management UI: create users, assign roles (Admin/User/Viewer), reset passwords, deactivate accounts | Must |
| 1.10 | nginx + PM2 deployment on Oracle Cloud: HTTPS via Let's Encrypt, wealth.justsimple.online, zero-downtime reload; GitHub Actions CI/CD pipeline on push to main | Must |
| 1.11 | Navigation shell: sidebar / top-nav with all module links, responsive layout, dark theme; health check endpoint (GET /health) verifying DB + storage | Must |
Property Management
Full property CRUD with taxes, expenses, contacts, map integration, and document linking. The most-used module for the primary user.
| 2.1 | Property CRUD: create/edit/delete with all fields (name, type, address, purchase price/date, current value, notes, rental flag) | Must |
| 2.2 | Address geocoding: integrate OpenStreetMap Nominatim, auto-convert address to lat/lng, cache results in DB | Should |
| 2.3 | Leaflet map integration: all properties as markers, colour-coded by type, popup with summary, marker clustering | Must |
| 2.4 | Property taxes module: add/edit property tax and water tax per year, due date, paid/unpaid status, receipt upload | Must |
| 2.5 | Property expenses module: log electricity, internet, maintenance, other; monthly/annual summary | Must |
| 2.6 | Property contacts: add multiple contacts per property (name, phone, role), clickable phone link | Must |
| 2.7 | Property detail page: full summary view with tabs for overview, taxes, expenses, contacts, documents | Must |
| 2.8 | Property list view: card grid with key info, status badges, filter by type | Must |
| 2.9 | Property tax alert integration: 30-day due date alerts wired to alert scheduler | Must |
| 2.10 | Property cost-of-ownership report: total expenses per property per year (taxes + utilities + maintenance) | Should |
Vehicle Management
Two-wheeler and four-wheeler registry with insurance, service history, RC/PUC/road tax renewal tracking, and automated alerts.
| 3.1 | Vehicle CRUD: all fields for 2W and 4W (make, model, year, reg no., chassis, engine, fuel type, colour, purchase details), photo upload | Must |
| 3.2 | Vehicle list view: cards with thumbnail photo, status badges (insurance, service, RC, PUC), filter by type | Must |
| 3.3 | Vehicle insurance tracking: CRUD for each vehicle's insurance with all fields, document upload | Must |
| 3.4 | Insurance expiry alerts: 60, 30, 7 days before expiry via alert scheduler | Must |
| 3.5 | Service history: add/edit/view service records, cost tracking, next service date/odometer configuration | Must |
| 3.6 | Service due alert: 7 days before next service date | Must |
| 3.7 | RC renewal tracking and 30-day alert; PUC expiry tracking and 15-day alert | Must |
| 3.8 | Road tax renewal tracking and 45-day alert | Should |
| 3.9 | Vehicle detail page: full tabs for overview, insurance, service history, renewals, documents | Must |
Insurance Management
Personal and family insurance policies โ health, life, term โ with senior citizen support, premium tracking, and claim history.
| 4.1 | Insurance policy CRUD: all types (health/life/term/PA/home), all fields, document upload | Must |
| 4.2 | Health policy member linking: assign covered family members to each health policy | Must |
| 4.3 | Senior citizen policy view: filter for Father/Mother policies, pre-existing conditions notes, cashless hospital list upload | Must |
| 4.4 | Premium renewal alerts: 60 and 30 days before renewal date for each active policy | Must |
| 4.5 | Claim history: add/edit claims with date, amount, status, settlement amount | Should |
| 4.6 | Insurance summary dashboard: total annual premium by type, total sum insured, expiring policies this year | Should |
| 4.7 | Policy list view: cards with insurer logo placeholder, status badge, coverage amount, renewal date | Must |
| 4.8 | Insurance detail page: full policy details, covered members, premium history, claims, document viewer | Must |
Document Management & AI
AI-powered document upload, extraction, classification, and expiry alerts. The system's core intelligence layer.
| 5.1 | File upload API: multer middleware, local/S3 storage backend, file validation (type, size) | Must |
| 5.2 | Google Document AI integration: send uploaded file, parse response, map fields to document schema | Must |
| 5.3 | Document create form: AI-pre-filled fields, confidence indicators, user edits and confirms | Must |
| 5.4 | Document CRUD: view, edit, delete with file replacement on re-upload | Must |
| 5.5 | Expiry / Non-Expiry classification toggle on each document | Must |
| 5.6 | Document status auto-compute: valid / expiring_soon / expired โ updated on cron and on load | Must |
| 5.7 | Signed URL generation for secure document download (1-hour TTL) | Must |
| 5.8 | Document list with search (name, number, type, person), filters, colour-coded status pills | Must |
| 5.9 | AI review queue: documents with confidence <70% shown for manual review | Must |
| 5.10 | Document version history: re-upload creates new version; previous versions accessible | Should |
Family Finances โ Expenses & Income
Family expense tracking by category with budgets, income logging from all sources, EMI/loan tracking, and monthly financial reports.
| 6.1 | Expense CRUD: date, category (predefined + custom), amount, description, optional receipt photo | Must |
| 6.2 | Monthly expense summary: total by category, bar chart, compared to previous month | Must |
| 6.3 | Budget limits per category: set monthly budget, visual alert at 80% consumed, red at 100% | Should |
| 6.4 | Income CRUD: date, source, amount, description; all income sources tracked | Must |
| 6.5 | Income vs expense monthly chart (Recharts bar chart); trailing 6-month view | Must |
| 6.6 | Loan/EMI tracking CRUD: lender, type, principal, interest rate, EMI amount, due day, start/end date | Must |
| 6.7 | EMI calendar: upcoming EMI due dates shown in monthly calendar view; alert 3 days before due | Should |
| 6.8 | Outstanding loan balance tracker: manually update balance; amortization estimate shown | Should |
| 6.9 | Annual financial report: total income, total expenses, savings rate, top expense categories | Should |
Rental Management
Tenant management, monthly rent collection, arrear tracking, agreement expiry alerts, and rental income reports.
| 7.1 | Tenant CRUD: name, phone, email, move-in date, expected rent, security deposit, agreement upload | Must |
| 7.2 | Monthly rent collection: log received amount, payment date, payment mode; auto-calculate arrear | Must |
| 7.3 | Arrear dashboard: total outstanding per property, overall total, red highlight for overdue >30 days | Must |
| 7.4 | Rental agreement expiry: track agreement end date, alert 60 days before for renewal | Must |
| 7.5 | Rental property expenses linked to property: maintenance, repairs, painting tracked separately | Must |
| 7.6 | Security deposit tracking: amount received, current holder, refund status and amount | Should |
| 7.7 | Annual rental income report per property: total collected vs expected, occupancy months | Should |
| 7.8 | Tenant history: past tenants per property with dates and payment summary | Should |
Investment Tracking & Net Worth
Investment portfolio management across all asset classes, FD maturity alerts, bank account tracking, and net worth calculator.
| 8.1 | Investment CRUD: type (stocks/MF/FD/PPF/NPS/bonds/gold), institution, account no., invested amount, current value, maturity date | Should |
| 8.2 | FD maturity alert: 30 days before maturity date via alert scheduler | Should |
| 8.3 | Investment value update: manually update current value periodically; system plots value timeline | Should |
| 8.4 | Bank account tracker: bank, account no. (masked), type, balance (manual entry), IFSC | Should |
| 8.5 | Net worth calculator: property values + vehicle book value + investments โ outstanding loans | Should |
| 8.6 | Net worth history: net worth calculated monthly and plotted on line chart | Could |
| 8.7 | Portfolio allocation chart: investment types as pie chart (% of total portfolio) | Could |
Passport Photographs Archive
Organised photo archive per family member, dated by YYYY-MM-DD, with timeline view and high-quality download.
| 9.1 | Photo upload per family member: date taken (YYYY-MM-DD), high-quality storage (no compression), notes | Must |
| 9.2 | Member gallery: all family members shown with their most recent photo as thumbnail | Must |
| 9.3 | Timeline view per member: all photos ordered by date (newest first), date label displayed | Must |
| 9.4 | Download original: signed URL for high-quality original download; filename as MEMBER_YYYY-MM-DD.jpg | Must |
| 9.5 | Delete old photos: with confirmation; cannot delete the only photo for a member | Should |
Alerts, Notifications & Dashboard
Unified alert scheduler across all modules, email delivery, alert logs, and the main dashboard with net worth and upcoming due items.
| 10.1 | Unified cron scheduler: single daily job evaluates ALL alert types across all modules at 08:00 IST | Must |
| 10.2 | Email alert templates: well-designed HTML emails per alert type with action links | Must |
| 10.3 | Alert deduplication: check alert_logs before sending; no duplicate alerts for same event | Must |
| 10.4 | Alert log UI: history of all sent alerts with status, filter by type and date | Must |
| 10.5 | Test alert trigger from settings panel: send test email using current SMTP config | Should |
| 10.6 | Dashboard: summary cards (properties, vehicles, docs, insurance, monthly income, monthly expenses) | Must |
| 10.7 | Dashboard upcoming dues panel: all due items in next 90 days sorted by urgency, colour-coded | Must |
| 10.8 | Dashboard income/expense chart and net worth card | Must |
| 10.9 | Recent activity feed: last 10 additions/edits across all modules | Should |
Android Application
React Native mobile app with full feature parity to web โ camera document upload, push notifications, offline cache, and property map.
| 11.1 | React Native + Expo project setup, navigation structure (Stack + Tab navigators), shared TypeScript types | Must |
| 11.2 | Custom JWT auth client: login/logout/token refresh using the same REST API as web; secure token storage in Expo SecureStore | Must |
| 11.3 | Dashboard screen: summary cards, upcoming dues list, income/expense chart | Must |
| 11.4 | Property list and detail screens with map (React Native Maps) | Must |
| 11.5 | Vehicle list and detail screens with status badges | Must |
| 11.6 | Insurance list and detail screens | Must |
| 11.7 | Document list with search + detail screen with document viewer | Must |
| 11.8 | Camera capture + file picker for document upload โ AI processing status screen | Must |
| 11.9 | Family expenses: add expense, view monthly summary | Must |
| 11.10 | Firebase Cloud Messaging: push notifications for all alert types | Should |
| 11.11 | Offline mode: cache document list, vehicle list, property contacts using AsyncStorage; sync on reconnect | Should |
| 11.12 | APK build, signing, and internal distribution (direct APK + Play Store preparation) | Must |
Security, Testing & Go-Live
End-to-end testing, security audit, performance testing, backup strategy, error monitoring, and production launch.
| 12.1 | End-to-end test suite: Playwright (web) โ critical paths: login, add property, upload doc, view alerts | Must |
| 12.2 | Security audit: JWT secret rotation, bcrypt round verification, AES-256-GCM encryption of stored secrets, signed URL TTL, SQL injection review via parameterised queries | Must |
| 12.3 | Load testing: k6 or Artillery โ 10 concurrent users, 10,000 document scenario, 1,000 alert runs | Must |
| 12.4 | Backup strategy: daily pg_dump to Google Drive via rclone; 30-day retention; monthly restore test | Must |
| 12.5 | File backup: daily sync of /storage to Backblaze B2; verify integrity weekly | Must |
| 12.6 | SSL verification: Let's Encrypt A+ rating on SSL Labs; auto-renewal verified | Must |
| 12.7 | Sentry integration: error monitoring for web + Android; alert on error spike | Should |
| 12.8 | User acceptance testing: Waheed tests all modules with real data for 2 weeks | Must |
| 12.9 | Operations runbook: deployment steps, backup restore, common troubleshooting, alert failure recovery | Should |
| 12.10 | Family onboarding: account creation for spouse, data migration from existing records, walkthrough session | Must |
๐ 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