Skip to content

[PoW] Architecture: Typed Frappe API Client and Secure Authentication Layer #18

@rohansaini-02

Description

@rohansaini-02

Ref: #1

We need a centralized API client for communicating with TAP's Frappe-based LMS backend.

Frappe uses token-based authentication (api_key:api_secret) and DocType-driven REST APIs, so handling authentication, request setup, and response parsing in one place will keep the mobile codebase cleaner and easier to maintain.

Scope

  • Store api_key and api_secret securely using react-native-keychain
  • Create a reusable Axios client that automatically attaches the Authorization: token api_key:api_secret header
  • Handle 401 and 403 responses centrally
  • Define TypeScript interfaces for:
    • LMS Course
    • LMS Lesson
    • LMS Assignment Submission
  • Build a small login PoC that authenticates a user and fetches their profile

Deliverables

  • Integrate react-native-keychain
  • Implement the FrappeAPI client with interceptors
  • Add TypeScript models for core LMS DocTypes
  • Create a login and profile fetch proof of concept

Expected Outcome

A secure, typed, and reusable API layer that serves as the foundation for all LMS-related network calls in the React Native app.

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