Prerequisites
- Node.js v20 or later
- Python 3.10 or later
- MongoDB locally or a cloud database URL
1. FastAPI Backend
1
Go to the backend folder
2
Create and activate a Python virtual environment
3
Install dependencies
4
Copy and configure the environment file
Set at least
MONGO_URL in the .env file.5
Start the FastAPI server
2. Expo Frontend (React Native)
1
Go to the frontend folder
2
Install npm packages
3
Copy the environment configuration
4
Start Expo
ito open the iOS simulatorato open the Android emulator- Scan the terminal QR code with the Expo Go app on a physical device
Mock Mode vs Production
The application has a global Mock Mode toggle. WhenEXPO_PUBLIC_MOCK_MODE=true in the frontend config:
- No backend server or MongoDB is required.
- OTP codes are auto-validated (any 6 digits pass).
- Wallet top-ups are credited instantly for test cards.
- Charging session metrics (kWh delivered, elapsed time, cost) are incremented and updated locally every second.
EXPO_PUBLIC_MOCK_MODE=false redirects all traffic to the FastAPI server configured in frontend/services/api.ts.
