Skip to content

[PoW] DIKSHA Content Interoperability: Sunbird API Research & Integration Architecture #14

@rohansaini-02

Description

@rohansaini-02

Ref: #1 — Native GovTech Learning App for Public Education Systems

As part of the requirements for the parent issue, integrating India's national education infrastructure (DIKSHA) is critical. Because DIKSHA is built on the open-source Sunbird platform and relies heavily on custom package formats (ECML, .ecar), relying on standard WebViews will break offline functionality.

I am opening this issue to propose and track the development of a native-first content interoperability layer.

Objective

Build a native middleware service that seamlessly resolves and caches DIKSHA content alongside TAP's internal Frappe LMS content, allowing students to consume national curriculum materials fully offline.

Proposed Architecture: The Content Resolver

Instead of hardcoding Frappe API requests in the UI components, we will implement a proxy ContentResolver module.

When the app requests a lesson, the resolver inspects the ID namespace:

  • Prefix tap_: Routes via standard frappe-client to the TAP backend.
  • Prefix diksha_: Intercepts and routes to NDEAR / Sunbird APIs.

Required Sunbird Endpoints:

  • POST /api/content/v1/search — To natively render the DIKSHA library inside TAP.
  • GET /api/content/v1/read/{id} — To fetch specific lesson metadata.
  • GET /api/course/v1/hierarchy/{id} — To parse and map Sunbird courses to the local LMS Course WatermelonDB schema.

Offline .ecar Packaging Strategy

DIKSHA packages offline content into Export Content Archives (.ecar). To ensure offline functionality in low-connectivity areas:

  1. Download & Extract: Use react-native-fs to download the .ecar bundle and extract it locally.
  2. Local Server: Boot a lightweight react-native-static-server to serve the extracted HTML5/H5P content locally to the UI.
  3. Telemetry Sync: Queue NDEAR telemetry locally and flush it via POST /api/data/v1/telemetry when network connectivity is restored.

Deliverables for this PoW

  • Configure authentication for NDEAR / DIKSHA Sandbox access.
  • Implement the ContentResolver middleware service in React Native.
  • Develop a PoC downloading a DIKSHA .ecar file, extracting it, and serving it natively via a local HTTP server.
  • Unit tests for the resolver routing logic.

This architecture ensures TAP Buddy remains a cohesive, single app experience without relying on external browser redirects, while strictly adhering to the offline-first mandate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions