Skip to content

Milestone 7: Add Flutter/mobile and Node NAT backends #44

Description

@vm75

Objective

Extend the NAT API to Flutter/mobile and Node while preserving the same model contract and allowing platform-specific inference runtimes.

Architecture

The logical API remains shared:

                 NAT API
                   │
       ┌───────────┼───────────┐
       ↓           ↓           ↓
     Web          Node       Flutter
   WebGPU/WASM   ONNX/etc.   native/WASM

The model/input/output contract must remain consistent even if the inference backend differs.

Requirements

  1. Reuse the NAT API introduced earlier; do not create separate incompatible APIs for each platform.
  2. Implement Node support using a suitable ONNX/WASM/native runtime based on measured constraints.
  3. Implement Flutter/mobile support using a suitable runtime compatible with the existing package architecture.
  4. Keep neural runtime dependencies optional where the package ecosystem permits.
  5. Do not increase the dependency footprint of deterministic inditrans for users who do not use NAT.
  6. Support background execution where platform architecture permits:
    • Worker for Node/browser
    • isolate/background/native execution for Flutter as appropriate
  7. Lazy-load models.
  8. Reuse model manifests/versioning.
  9. Implement deterministic fallback on all platforms.
  10. Ensure platform backends produce compatible outputs for the same model and test vectors.
  11. Add cross-platform golden test vectors.

Cross-platform test vectors

For a fixed set of Tamil examples, record:

  • input
  • deterministic baseline
  • expected NAT decision
  • expected final transliteration/pronunciation
  • model version
  • relevant metadata

Use these vectors to catch backend divergence.

Acceptance criteria

  • Node NAT backend works.
  • Flutter/mobile NAT backend works.
  • Shared NAT API remains stable.
  • Shared model contract works across platforms.
  • Cross-platform golden tests pass.
  • Model loading is lazy.
  • Background execution is used where appropriate.
  • Deterministic fallback works on every supported platform.
  • Existing core package remains usable without NAT.
  • Platform-specific dependencies are isolated from the deterministic core.
  • Performance and memory measurements exist for representative environments.

Out of scope

  • additional languages
  • redesigning the NAT API without evidence
  • replacing the existing transliteration engine

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    milestoneUmbrella milestone tracking issueroadmapPart of the long-term project roadmap

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions