Skip to content

Phase 3: Scale Preparation - API Design, i18n & Multi-Region Support #13

@tkkr6895

Description

@tkkr6895

Description

Prepare the app for multi-region deployment at scale: design the server-side sync REST API (OpenAPI 3.0), scaffold internationalization for Indian regional languages, and design the multi-region data pack system.

Implementation Tasks

  • 3.6.1 — Design REST API spec for server-side sync: observation upload/download, species data sync, user auth, conflict resolution — documented as OpenAPI 3.0 YAML (docs/api/sync_api.yaml)
  • 3.6.2 — Design multi-region support: region selector on first launch, downloadable data packs per region (boundaries, species checklists, basemap tiles), region pack discovery API (Design only)
  • 3.6.3 — Add i18n scaffolding: extract all user-facing strings, create translation file structure for Kannada, Malayalam, Marathi, Tamil (src/i18n/)

Acceptance Criteria

  • sync_api.yaml is valid OpenAPI 3.0 with endpoints for:
    • POST /observations — upload observation batch
    • GET /observations — download observations (with filters)
    • POST /sync — bidirectional sync with conflict resolution strategy
    • GET /species — species data sync with region filter
    • POST /auth/login, POST /auth/register — authentication
  • API spec aligns with existing SyncEngine queue model and observation schema
  • Multi-region design document covers region discovery, pack format, download flow, and storage management
  • i18n scaffolding created at src/i18n/ with:
    • en.json — English (default, all strings extracted)
    • Placeholder files for kn.json (Kannada), ml.json (Malayalam), mr.json (Marathi), ta.json (Tamil)
    • Translation loader utility
    • Integration pattern documented for React components
  • i18n can be adopted incrementally (components fall back to English)

Dependencies

  • SyncEngine (1.4, ✅ complete) — API spec must align with client-side queue model
  • Species Database (2.1) — species sync endpoint must match local schema
  • Custom Layer system (1.8, ✅ complete) — region packs may include custom layers

Relevant Files

  • docs/api/sync_api.yaml (new)
  • src/i18n/ (new directory)
  • src/services/SyncEngine.ts — client-side sync model reference
  • src/types/index.ts — observation/species schema reference
  • src/services/SpeciesDatabase.ts — species sync requirements

Metadata

Metadata

Assignees

No one assigned

    Labels

    designDesign & architectureinfrastructureInfrastructure & toolingphase-3Phase 3: Pilot & Scale

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions