mirror of
https://github.com/odoobiznes/BUS-Ticket-client.git
synced 2026-05-28 06:24:44 +00:00
- Remove all workspace package dependencies (@bus-tickets/*) - Create local ApiClient, formatting utilities - Add environment.ts for configurable defaults - Update ConfigContext to use environment config - Add README with configuration instructions - API URL can be: 1. Changed at runtime via Settings screen 2. Set via EXPO_PUBLIC_API_URL environment variable 3. Changed in src/config/environment.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.8 KiB
2.8 KiB
BUS-Tickets Mobile App
React Native / Expo mobile application for bus ticket booking.
Configuration
API URL Configuration
The app can connect to any compatible Odoo backend. There are several ways to configure the API URL:
1. Runtime Configuration (Recommended for Development)
Users can change the backend URL directly in the app:
- Go to Settings > Backend > Change Backend
- Enter the new API URL
- Tap Connect
2. Environment Variables (Build-time)
Set environment variables before building:
export EXPO_PUBLIC_API_URL="https://your-api-server.com"
export EXPO_PUBLIC_INSTANCE_NAME="Your Company Name"
Then build with:
eas build --platform android --profile preview
3. Edit Default Configuration
Edit src/config/environment.ts to change the default API URL:
export const DEFAULT_API_URL = 'https://your-api-server.com';
export const DEFAULT_INSTANCE_NAME = 'Your Company Name';
Deep Links Configuration
If you want to use deep links for your domain, update these files:
- app.json - Update
ios.associatedDomainsandandroid.intentFilters - Configure your server to serve the
.well-known/apple-app-site-associationand.well-known/assetlinks.jsonfiles
Development
# Install dependencies
npm install
# Start development server
npm run dev
# Build for Android
npm run build:android:preview
# Build for iOS
npm run build:ios:preview
Building
Android APK (Preview)
export EXPO_TOKEN="your-expo-token"
eas build --platform android --profile preview
iOS App (Preview)
export EXPO_TOKEN="your-expo-token"
eas build --platform ios --profile preview
Note: iOS builds require Apple Developer account credentials.
Project Structure
├── app/ # Expo Router pages
│ ├── (tabs)/ # Tab navigation screens
│ ├── auth/ # Authentication screens
│ └── ...
├── src/
│ ├── components/ # Reusable UI components
│ ├── contexts/ # React contexts (Auth, Theme, Config, etc.)
│ ├── config/ # Configuration files
│ ├── hooks/ # Custom React hooks
│ ├── services/ # API client and services
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── assets/ # Images, fonts, etc.
└── app.json # Expo configuration
Features
- Multi-language support (Ukrainian, Czech, English)
- Dark/Light/System theme
- Offline mode with sync
- QR code tickets
- Multiple payment providers
- Multiple bus operator support
- OAuth authentication (Google, Facebook, Apple)
License
Copyright (c) 2024-2026 IT Enterprise