Parents' Paperwork: System Design

How the rules engine, reminders, document scanning and benefits engine fit together, and how the data stays safe.

Scope and goals

Version 1 turns a family's facts into a personal, correct calendar of deadlines, guides, documents and benefits, shared across siblings. It is software-first: it informs and guides, it never acts on a parent's accounts.

In scope for v1

Out of scope for v1

Requirements

Functional

ID Requirement
F1 A family admin adds parents, siblings, institutions, accounts, policies, deposits, property and vehicles
F2 The system generates each family's tasks from rules and the family's facts, and regenerates them when facts or rules change
F3 Each task has one owner, a due date, a recurrence, steps, required documents and optional help actions
F4 Step progress, ownership and completion sync across all family members in near real time
F5 Members upload or scan documents; the system extracts type, dates and references for review
F6 The system evaluates every benefit scheme for each parent and stores a status per parent
F7 Reminders go out at configurable offsets (default 30 and 7 days, plus the day a window opens)
F8 Members export a one-page emergency card as PDF

Non-functional

Area Target
Correctness Every generated task traces back to a rule version and a source
Privacy Data stored in India; encrypted in transit and at rest; field-level encryption for identifiers
Availability 99.5% for the app; reminders delivered within 15 minutes of schedule
Performance Home screen loads in under 1.5 s on a mid-range Android phone over 4G
Accessibility Large type, high contrast, 44 px touch targets; parent-facing screens in English and Hindi first
Cost Infrastructure under Rs 15 per family per month at 10,000 families

Architecture

One rules engine turns versioned rules into each family's tasksFamily appReact Native, Android first; for family membersRules consoleContent team drafts, reviews and publishes rulesAPI and authREST plus a WebSocket per family; phone OTP sign-in; rolesFamily and tasksTasks, owners, steps,trackers, live syncRules engineVersioned rules todated tasks per familyBenefits engineScheme status perparent, age, stateDocumentsVault, scans, OCR,field extractionJob queue and workersNightly regeneration, reminders at local 9:00, extraction; retries with backoffPostgreSQLFamilies, rules, tasks, auditIndia region, encryptedObject storageDocument imagesPer-family KMS keys, IndiaNotificationsPush first, then WhatsApptemplates, then email

The rules engine is the centre: rule or fact changes flow through the job queue, which regenerates tasks, schedules reminders and runs extraction. Services and workers share one PostgreSQL database; document images live in encrypted object storage in India.

Data model

Everything hangs off a Family. Facts about parents and their holdings drive rules; rules produce Tasks; Tasks reference Documents. Generated rows always keep the rule version that made them.

Entity Key fields Relationships
Family id, name, state, city, plan, created_at has many Members, Parents
Member id, family_id, name, role (admin, member), country, timezone, notify_prefs owns Tasks
Parent id, family_id, name, date_of_birth, pension_type (central, state, none), pension_bank_id, state_of_residence has Holdings, Documents, BenefitStatuses
Institution id, name, type (bank, post office, insurer, municipality, fund) referenced by Holdings
Holding id, parent_id, institution_id, type (savings, FD, SCSS, MIS, policy, property, vehicle, MF folio), maturity_or_renewal_date, nominee_set, masked_ref drives rules
Rule id, version, category, applies_when (condition), schedule, steps, required_doc_types, source_url, owner, reviewed_on produces Tasks
Task id, family_id, parent_ids, rule_id, rule_version, title, due_date, window_opens, recurrence, owner_id, status, generated (bool) has StepProgress, links Documents
StepProgress task_id, step_index, done_by, done_at belongs to Task
Document id, parent_id, doc_type, status (on_file, missing, due, review), valid_until, storage_key, extracted_fields, kept_at linked to Tasks
Scheme id, version, name, level (central, state), eligibility (condition), claim_steps, agency, source_url evaluated into BenefitStatus
BenefitStatus parent_id, scheme_id, status (in_use, auto, not_claimed, check, available, suspended, not_eligible), set_by (engine or member), updated_at belongs to Parent
Reminder id, task_id, member_id, channel, send_at, sent_at, state belongs to Task
AuditEvent id, family_id, actor_id, action, object, at append-only

Account numbers are never stored in full: masked_ref keeps the last four digits so families can tell holdings apart.

Rules engine

Rules are data, not code. Each rule is a versioned JSON record that a content team edits and reviews; the engine evaluates it against a family's facts to produce tasks. This is the product's moat, so it gets the most care.

Rule schema (example: pensioner life certificate)

{
  "id": "pension.life_certificate",
  "version": 3,
  "applies_when": { "parent.pension_type": { "in": ["central", "state"] } },
  "schedule": {
    "due": "YYYY-11-30",
    "window_opens": [
      { "when": { "parent.age_on": { "date": "YYYY-10-01", "gte": 80 } }, "date": "YYYY-10-01" },
      { "else": "YYYY-11-01" }
    ],
    "recurrence": "yearly"
  },
  "consequence": "Pension paused from December until submitted; paid as arrears.",
  "steps": ["Install AadhaarFaceRD and Jeevan Pramaan", "Keep Aadhaar, PPO and account number ready", "Face scan on a video call", "Save the Jeevan Pramaan ID"],
  "required_doc_types": ["aadhaar", "ppo"],
  "help": ["video_walkthrough", "ippb_doorstep"],
  "source_url": "https://jeevanpramaan.gov.in",
  "reviewed_on": "2026-09-15",
  "owner": "rules-team"
}

How a family's calendar is generated

  1. A trigger arrives: a fact changed (new deposit, birthday crossed 75 or 80), a rule version was published, or the nightly sweep runs.
  2. The engine loads the family's facts and every active rule, and evaluates applies_when for each parent and holding.
  3. For each match it computes due dates and windows for the current and next tax year.
  4. It upserts tasks keyed on (family, rule id, subject, period), so reruns never duplicate. Owner, step progress and completion are preserved.
  5. Tasks whose rule no longer applies are archived, not deleted, and the family is told why.
  6. Reminder jobs are rescheduled for any task whose dates moved.

Versioning and review

Reminders and notifications

Reminders are scheduled jobs created per task and member, sent in the member's own timezone at a sensible local hour (9:00 by default).

  1. When a task is created or its dates change, the scheduler writes Reminder rows for each offset: window opens, 30 days, 7 days, 1 day.
  2. A worker polls due reminders every minute and skips any whose task is done.
  3. Owners get every reminder; other members get only the 7-day and overdue ones, to avoid noise.
  4. Delivery goes by push first; WhatsApp (approved message templates) for members who opt in; email as fallback.
  5. Each send is logged. A failed send retries 3 times with backoff, then falls to the next channel.
  6. If a task is still open 3 days before its due date and has no owner, every member is alerted.

WhatsApp templates contain no sensitive values, only the task name and a deep link, for example: "Dad's life certificate is due 30 Nov. Open the walkthrough."

Document scanning and extraction

A scan becomes a filed document and, where it carries a date, a task, with a person confirming every field.

  1. The app captures the image, crops and de-skews it on the device, and uploads it over TLS to object storage in India.
  2. An OCR step extracts the text; a classifier predicts the document type (policy, FD receipt, tax notice, bank letter).
  3. A field extractor pulls type-specific fields: provider, holder, reference (masked), dates, amounts.
  4. Identifiers such as Aadhaar or PAN numbers are masked before the extracted text is stored.
  5. The member reviews the pre-filled form; nothing is saved until they confirm.
  6. On confirm, the Document row is written and the rules engine runs for that parent, creating any new tasks.

Extraction confidence is stored per field. Low-confidence fields are highlighted in the review form.

Benefits eligibility engine

Schemes use the same condition language as rules, evaluated per parent. The engine only suggests a status; a family member confirms whether a benefit is actually in use.

Status Set by Meaning
Not eligible Engine Conditions fail (for example, a BPL-only scheme)
Suspended Content team Scheme paused nationally (for example, rail fare concession)
Automatic Engine Applies without action (for example, no advance tax for seniors)
Check Engine Eligible, but the system cannot tell if it is being received (for example, additional pension at 80+)
Not claimed / Available Engine Eligible and needs an action, or optional
In use Member Confirmed by the family

State schemes are scoped by parent.state_of_residence; v1 launches with central schemes plus Maharashtra. When a parent crosses an age threshold (70, 75, 80), the engine re-evaluates and notifies the family of newly eligible benefits. "Mark in use" by a member is never overwritten by the engine; a conflict is shown as "Check".

Security, privacy and compliance

The design minimises what is stored, and treats each parent as a data principal under India's Digital Personal Data Protection Act, 2023.

Area Approach
Credentials Never store passwords or OTPs; never log in to any portal as a parent
Identifiers Aadhaar and PAN stored masked; full numbers only inside encrypted document images
Encryption TLS 1.2+ in transit; AES-256 at rest; per-family keys in a managed KMS for document storage
Residency All personal data and backups in Indian cloud regions
Consent Each parent gives recorded consent, with a plain-language notice, before their data is added; consent can be withdrawn
Access Role-based: admin, member, view-only; every read of a document is logged to AuditEvent
Deletion A family can export and delete all data; deletion completes within 30 days, including backups
Regulation No investment advice, no money handling; partner hand-offs only after explicit family approval
Authentication Phone OTP sign-in plus device binding; optional biometric lock on the app

API, stack and rollout

API surface (REST over HTTPS, JSON)

Endpoint Purpose
GET /families/{id}/today Hero task, 60-day list, counts
GET /families/{id}/timeline?year=2026-27&category= Tasks by month plus long-cycle items
PATCH /tasks/{id} Owner, status; PUT /tasks/{id}/steps/{n} for step progress
GET/POST /parents/{id}/documents Vault list and uploads (pre-signed URLs)
POST /scans Start extraction; returns fields for review
GET /parents/{id}/benefits and PATCH .../benefits/{scheme} Benefit statuses and member confirmation
GET /families/{id}/trackers/{kind} Deposits, insurance, pension, nominees
GET /families/{id}/emergency-card.pdf Export

Changes made by one member reach others through a WebSocket channel per family.

Suggested stack

Layer Choice Why
App React Native (Android first) Most parents and many children use Android; one codebase
API Node.js (TypeScript) or Go Small team, strong typing
Database PostgreSQL with JSONB for rule conditions Relational core plus flexible rules
Jobs Queue (for example, SQS or a Postgres-backed queue) plus workers Reminders, regeneration, extraction
Storage Object storage in an Indian region, KMS-encrypted Document images
Messaging Push (FCM), WhatsApp Business API, email Reach where families already are
Admin Internal rules console with review workflow The moat needs its own tooling

Scaling. Load is light and predictable: most work is nightly regeneration and reminder sends, with known peaks in November (life certificates), April (tax declarations) and July (returns). Workers scale out ahead of those months.

Rollout

  1. Pilot (Oct 2026 to Apr 2027): WhatsApp plus a spreadsheet, rules applied by hand. Proves demand and the rule set.
  2. v1 alpha: app for pilot families, central rules plus Maharashtra benefits, manual scan review.
  3. v1 public: automated extraction, paid plans, partner hand-offs.
  4. Later: more states, Hindi and regional languages, B2B employer channel.

Open questions