Skip to content

[FEATURE] New Home page Navigation + Seva Page #374

@indersinghkhalis

Description

@indersinghkhalis

Goal

Add a Seva experience inside Sundar Gutka that:

  1. lives under a new Home navigation (Home / Dashboard / Seva / Settings)
  2. fetches server-controlled content + defaults from STTM API
  3. adapts messaging based on user locality (by IP, no location permission)
  4. supports donations via Stripe or Qgiv, with US tax receipt messaging
  5. tracks funnel analytics including one-time vs recurring
  6. creates a global donor state to personalize the app

Scope

Design Link: https://www.figma.com/design/aLcbophoZ6dl4Hrb4kMEFB/Sundar-Gutka-Audio?node-id=411-2&t=G6cP1Giobvfu5rsc-1

1) Home Navigation (App Shell)

Create a new Home-level nav with:

  • Home
  • Dashboard
  • Seva
  • Settings

Navigation switching rule

  • Home nav is visible only for Home-area screens.
  • When user opens a Bani, switch to existing Bani-specific navigation.
  • Returning from Bani restores Home nav.

Seva tab icon

  • Must support a notification indicator (red dot)
  • Red dot must be toggleable via remote config and/or local logic.

2) Seva Page Remote Config + Content (STTM API)

When Seva page opens:

  • Fetch config/content from STTM API to control:

    • headline + description
    • default donation amounts
    • featured campaigns (optional)
    • whether to show the red-dot indicator
    • payment provider preference (Stripe vs Qgiv vs Qgiv prefill-open)
    • localization message variants (US/CA/Other)

Resilience

  • Cache with TTL (e.g. 24h)
  • Use last cached or bundled defaults on API failure

3) Locality Detection (No Location Permission)

Locality must be determined via IP-based detection (server-side preferred).

Use cases

  • US:

    • show tax-deductible messaging
    • collect fields needed for receipt
  • Non-US:

    • alternate copy
  • Defaults + copy may vary by locality.


4) Donation Flow (Stripe vs Qgiv) + Fallback Strategy

Option A: Direct Integration (Preferred)

  • Stripe or Qgiv embedded

  • Support one-time and recurring

  • On success:

    • set donor state
    • show thank you screen
    • ensure US receipt handling

Option B: Qgiv Prefill + Open Form (Fallback)

  • Open Khalis Qgiv form with prefilled info
  • User only enters card details
  • On return, resolve donor state optimistically or via backend

Decision controlled by STTM API

  • payment_mode = stripe | qgiv_embedded | qgiv_prefill_open

5) Global Donor State (with Recurring Awareness)

Maintain global state:

donor: true | false
donorType: one_time | recurring | unknown
lastDonationAt (optional)
donorSource: stripe | qgiv | unknown

Set donorType from

  • Provider response (preferred)
  • Or fallback to selected donation type before redirect

Donor-aware Seva page

  • donor=true → show different content
  • recurring donors → show retention-focused content
  • one-time donors → show convert-to-recurring CTA

Analytics Requirements (with Recurring Tracking)

Page / Exposure

  • seva_opened (params: locality, donorState, configVersion)
  • seva_opened_first_time vs seva_opened_repeat

Donation Type Intent

  • seva_donation_type_selected

    • Params:

      • donation_type: one_time | recurring

Funnel Progression

All events below must include donation_type.

seva_amount_selected

  • Params:

    • amount
    • preset vs custom
    • donation_type

seva_next_clicked

  • Params:

    • step_name
    • donation_type

seva_donor_details_completed

  • Params:

    • fieldsCompletedMap (boolean only)
    • donation_type

seva_payment_started

  • Params:

    • provider
    • payment_mode
    • donation_type
    • amount_bucket

seva_payment_success

  • Params:

    • provider
    • donation_type
    • amount_bucket
    • locality

seva_payment_failed

  • Params:

    • provider
    • donation_type
    • error_category

seva_checkout_abandoned

  • Params:

    • lastStepReached
    • donation_type

Funnel Step Tracking

Steps:

  1. landing_view
  2. donation_type_selected
  3. amount_selected
  4. donor_details
  5. payment
  6. success

Store maxStepReached and emit on exit if not success.


UX / UI Requirements

  • Server-configurable copy and defaults
  • Donation type selector: One-time vs Recurring
  • Conditional donor form fields based on locality
  • No raw PII in analytics
  • Cached content + background refresh
  • Graceful error states with fallback to Qgiv open-form

Technical Interfaces (Proposed)

STTM API

GET /sundargutka/seva/config
Returns:

  • configVersion
  • country
  • content
  • defaults
  • payment_mode
  • showSevaDot
  • donorStateHint (optional)

Donor Status Resolve (Optional)

GET /sundargutka/seva/donor-status?userId=...


Acceptance Criteria

Navigation

  • Home nav appears only in Home area
  • Switches to Bani nav inside bani
  • Seva tab supports red dot

Seva Config

  • Loads from STTM API
  • Works offline / on failure
  • Content server-controlled

Locality

  • No permission-based location
  • US vs Non-US messaging works

Payment

  • At least one payment mode functional
  • Qgiv fallback implemented
  • Success updates donor state

Donor State

  • Tracks donor + donorType
  • Drives Seva content variation

Analytics

  • All events include donation_type
  • One-time vs recurring measurable at intent and success
  • Funnel drop-offs segmented by donation type

Out of Scope

  • Full donor CRM
  • Recurring management UI
  • Permission-based location tracking

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions