diff --git a/mobile/.env.example b/mobile/.env.example new file mode 100644 index 0000000..c114e56 --- /dev/null +++ b/mobile/.env.example @@ -0,0 +1,2 @@ +API_BASE_URL=https://example.com +SOCKET_BASE_URL=wss://example.com \ No newline at end of file diff --git a/mobile/README.md b/mobile/README.md new file mode 100644 index 0000000..bbf5180 --- /dev/null +++ b/mobile/README.md @@ -0,0 +1,27 @@ +# GovTech Learning App Mobile Structure + +This folder contains the initial scalable React Native architecture proposal for the GovTech learning application. + +## Folder Structure + +src/ + ├── api/ + ├── components/ + ├── config/ + ├── constants/ + ├── hooks/ + ├── navigation/ + ├── screens/ + ├── services/ + ├── store/ + ├── theme/ + └── utils/ + +## Purpose + +This structure is designed to support: +- LMS integration +- offline-first architecture +- AI Tutor integration +- scalable feature development +- white-label deployments \ No newline at end of file diff --git a/mobile/src/api/client.ts b/mobile/src/api/client.ts new file mode 100644 index 0000000..7dcd81f --- /dev/null +++ b/mobile/src/api/client.ts @@ -0,0 +1,6 @@ +import axios from "axios"; +import { CONFIG } from "../config"; + +export const apiClient = axios.create({ + baseURL: CONFIG.API_BASE_URL, +}); \ No newline at end of file diff --git a/mobile/src/api/components/config/index.ts b/mobile/src/api/components/config/index.ts new file mode 100644 index 0000000..9e471a7 --- /dev/null +++ b/mobile/src/api/components/config/index.ts @@ -0,0 +1,4 @@ +export const CONFIG = { + API_BASE_URL: process.env.API_BASE_URL || "", + SOCKET_BASE_URL: process.env.SOCKET_BASE_URL || "", +};