Skip to main content

Mobile App Integration Guide

This guide details best practices for Flutter / Mobile developers building against the LearnWay Backend.

1. Network & Base URL Configuration

  • Development (iOS Simulator): http://localhost:3000 or http://127.0.0.1:3000
  • Development (Android Emulator): http://10.0.2.2:3000
  • Staging / Production: https://api.learnway.xyz
All endpoints are strictly namespaced under /api/v2/.

2. Localization Header

To receive content translated into the user’s selected language, pass the Accept-Language header in every request:
Supported language codes include en, es, fr, pt, sw, ar, id, and hi.

3. WebSockets Connection in Flutter

Use socket_io_client:

4. Push Notification Device Registration

Upon receiving an FCM token on device startup, register it immediately: