Empower learners to understand blockchain by doing. ChainLiteMobile is an interactive mobile app that teaches core concepts—mining, peer-to-peer networking, block exploration, and consensus—through guided, hands-on modules.
- Overview
- Features
- Tech Stack
- Getting Started
- Configuration (API Base URL)
- Development Scripts
- Build (APK / Local)
- Screenshots
- Architecture
- Performance Notes
- Contributing
ChainLiteMobile pairs a clean, modern UI with an educational flow that progressively introduces blockchain mechanics. It speaks to both newcomers and builders who want to see how the pieces fit together in practice.
-
Install dependencies
npm install # or yarn -
Configure backend URL (optional)
The app defaults to the production backend:
https://chainlite.onrender.com.You can override via env at runtime:
EXPO_PUBLIC_API_BASE_URL="https://your-backend" npx expo startOr in-app from Settings: see
Settings → API Base URL(writes to SecureStore). -
Start the app
npx expo start
In the output, you'll find options to open the app in a
- development build
- Android emulator
- iOS simulator
- Expo Go, a limited sandbox for trying out app development with Expo
You can start developing by editing the files inside the app directory. This project uses file-based routing.
- Interactive modules: Mining, Network Builder, Block Explorer, Consensus Challenge
- Production API default with secure, user-overridable base URL
- Optimized polling: mining status polls only when screen is focused, every 15s
- Dark, gradient UI with custom headers and icons
- TypeScript-first services and hooks
- React Native + Expo Router (file-based navigation)
- TypeScript across app and services
- Axios for API calls (
src/services/blockchain.ts) - Expo SecureStore for persisting user API base URL
- UI routes:
app/with Expo Router (tabs underapp/(tabs)/) - Mining UI:
components/MiningScreen.tsx - Backend service layer:
src/services/blockchain.ts(Axios instance, endpoints) - Global init:
app/_layout.tsxcallsinitializeApiBaseUrl()and sets a light StatusBar - Settings UI for API URL:
app/settings/index.tsx,app/mine/settings.tsx
Resolution priority for the API base URL (src/services/blockchain.ts):
EXPO_PUBLIC_API_BASE_URLenvironment variable- SecureStore value saved from Settings
- Default:
https://chainlite.onrender.com
Changes persist locally and update the Axios instance at runtime.
Commonly used scripts:
npm start # Launch Expo
npm run android # Open on Android emulator/device
npm run ios # Open on iOS simulator
npm run lint # Lint codebaseRecommended: EAS Build (cloud):
npm i -g eas-cli # or: yarn global add eas-cli
eas login
eas build:configure
eas build -p android --profile preview # produces an APK you can downloadLocal build (requires Android SDK):
npx expo prebuild --platform android
cd android && ./gradlew :app:assembleRelease
# APK: android/app/build/outputs/apk/release/app-release.apkA few representative screens from the app.
app/— Screens and routes (Expo Router)components/— Reusable UI componentssrc/services/blockchain.ts— API client and endpointssrc/contexts/— Context providers (e.g., wallet)utils/— Utilitiesscripts/— Local test scripts
- Mining status polling limited to focused screen and every 15s to protect backend free tier
- Intervals are properly cleaned up on unmount/blur
Contributions, issues, and feature requests are welcome. Please open a GitHub issue or submit a PR. For larger changes, consider opening a discussion first to align on scope and approach.
When you're ready, run:
npm run reset-projectThis command will move the starter code to the app-example directory and create a blank app directory where you can start developing.
To learn more about developing your project with Expo, look at the following resources:
- Expo documentation: Learn fundamentals, or go into advanced topics with our guides.
- Learn Expo tutorial: Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
Join our community of developers creating universal apps.
- Expo on GitHub: View our open source platform and contribute.
- Discord community: Chat with Expo users and ask questions.
