Skip to content

Commit 9406857

Browse files
committed
docs: add mobile build instructions to root README.md
1 parent d8fae39 commit 9406857

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

practice-app/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,76 @@ docker-compose logs -f backend
7272
docker-compose up --build
7373
```
7474

75+
## Mobile Application
76+
77+
### Prerequisites
78+
- [Docker Desktop](https://www.docker.com/get-started) with 8GB+ RAM allocated
79+
- Android Studio with emulator (for testing)
80+
81+
### Build APK
82+
83+
```bash
84+
cd mobile
85+
86+
# Build Docker image
87+
docker build --platform=linux/amd64 -t mobile-app-builder .
88+
89+
# Run build (generates APK)
90+
docker run --name mobile-build --memory=8g mobile-app-builder
91+
92+
# Extract APK
93+
docker cp mobile-build:/app/android/app/build/outputs/apk/release/app-release.apk .
94+
95+
# Cleanup
96+
docker rm mobile-build
97+
```
98+
99+
### Connect to Local Backend
100+
101+
1. **Start backend** (from practice-app root):
102+
```bash
103+
docker-compose up backend
104+
```
105+
106+
2. **Run database migrations** (if needed):
107+
```bash
108+
docker-compose exec backend python manage.py migrate
109+
```
110+
111+
3. **Set up ADB port forwarding** (for emulator):
112+
```bash
113+
adb reverse tcp:8000 tcp:8000
114+
```
115+
116+
4. **Install APK**: Drag `app-release.apk` onto Android Studio emulator
117+
118+
### Environment Variables
119+
120+
See `mobile/.env.example` for all configuration options. Key variable:
121+
- `API_BASE_URL` - Backend server URL (default: `http://10.0.2.2:8000` for emulator)
122+
123+
### Development Mode (No Docker)
124+
125+
```bash
126+
cd mobile
127+
npm install
128+
npm start
129+
# Press 'a' for Android
130+
```
131+
132+
For detailed instructions, see `mobile/BUILD_INSTRUCTIONS.md`.
133+
134+
---
135+
75136
## Project Structure
76137

77138
```
78139
practice-app/
79140
├── backend/ # Django backend
80141
├── frontend-web/ # React frontend
142+
├── mobile/ # React Native mobile app
143+
│ ├── Dockerfile # APK build configuration
144+
│ └── .env.example # Environment variables template
81145
├── docker-compose.yml # Docker orchestration
82146
└── .env # Environment variables (create from .env.sample)
83147
```

0 commit comments

Comments
 (0)