A React Native mobile application for managing EV charging sessions, built with Node.js + Express backend and SQLite database.
git clone https://github.com/yjyun0531/wirelessAssignment.git
cd wirelessAssignmentnpm installOpen the file:
frontend/src/utils/api.js
Find the BASE_URL line and replace it with your PC's IPv4 address:
// Before
export const BASE_URL = 'http://10.74.91.100:3000';
// After (example — use YOUR actual IPv4)
export const BASE_URL = 'http://192.168.1.5:3000';How to find your IPv4 address: Open Command Prompt and run
ipconfig, then look for IPv4 Address under your active network adapter.
Open a Command Prompt, navigate to the backend folder, and run the server:
cd backend
node server.jsYou should see:
Server running on port 3000
Keep this terminal open while using the app.
Open a new Command Prompt, go back to the root project folder, and run:
cd ..
npx react-native run-androidMake sure your Android device is connected via USB with USB Debugging enabled, or an Android emulator is running.
wirelessAssignment/
├── backend/
│ ├── models/
│ │ └── database.js # SQLite database setup
│ ├── routes/
│ │ ├── auth.js # Register & login
│ │ ├── users.js # User profile CRUD
│ │ └── sessions.js # Charging session CRUD
│ └── server.js # Express + Socket.IO server
└── frontend/
└── src/
├── context/
│ └── AuthContext.js
├── navigation/
│ └── AppNavigator.js
├── screens/
│ ├── HomeScreen.js
│ ├── LoginScreen.js
│ ├── RegisterScreen.js
│ ├── SearchScreen.js
│ ├── ChargingScreen.js
│ ├── HistoryScreen.js
│ ├── ProfileScreen.js
│ └── SummaryScreen.js
└── utils/
└── api.js # Base URL & API helpers
| Layer | Technology |
|---|---|
| Mobile Frontend | React Native |
| Backend | Node.js + Express |
| Database | SQLite |
| Real-time | Socket.IO |
App cannot connect to server
- Make sure
BASE_URLinapi.jsmatches your PC's IPv4 address - Make sure the backend server is running (
node server.js) - Make sure your phone and PC are on the same Wi-Fi network
npx react-native run-android fails
- Make sure Android Studio and an emulator are installed, or a physical device is connected with USB Debugging on
- Run
adb devicesto verify your device is detected