This project implements a simple feature voting system where users can post new feature ideas and upvote existing ones. It includes:
- ✅ A Django backend using Django REST Framework
- ✅ A SQLite database
- ✅ A React Native (Expo) Android app using TypeScript
- ✅ Full support for local network testing via emulator or physical Android device
- Add new feature ideas
- View features sorted by upvotes (highest first)
- Upvote any feature
- Fully functional on Android (tested via LDPlayer + Expo Go)
cd backend
python -m venv env
source env/bin/activate # On Windows: env\Scripts\activate
pip install -r requirements.txt
If you don’t have requirements.txt
, install manually:
pip install django djangorestframework django-cors-headers
python manage.py makemigrations
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
0.0.0.0
exposes the server to your local network so your mobile device or emulator can access it.
Method | Endpoint | Description |
---|---|---|
GET | /api/features/ |
List all features |
POST | /api/features/ |
Add a new feature |
POST | /api/features/<id>/upvote/ |
Upvote a feature |
cd mobile
npm install
Edit mobile/constants.ts
:
export const API_BASE_URL = "http://<YOUR_LOCAL_IP>:8000/api";
Replace
<YOUR_LOCAL_IP>
with the output fromipconfig
(e.g.,172.20.1.21
). Avoid usinglocalhost
.
npx expo start --tunnel
- Open the built-in browser
- Visit https://expo.dev/client
- Download & install the Expo Go APK
- Launch Expo Go
- Tap "Enter URL manually"
- Paste the tunnel URL shown in your terminal (
exp://...
)
You should now see:
- Input to submit a new feature
- A list of features fetched from Django
- "Upvote" buttons that increase the vote count via API
project-root/
├── backend/ # Django project
│ ├── featurevote/
│ ├── api/
│ ├── manage.py
│ └── ...
│
├── mobile/ # React Native frontend (Expo)
│ ├── App.tsx
│ ├── constants.ts
│ ├── components/
│ │ └── FeatureItem.tsx
│ ├── screens/
│ │ └── HomeScreen.tsx
│
├── prompts.txt # AI interaction log
└── README.md # This file
- ✅
prompts.txt
— All AI prompts used - ✅
README.md
— Fully completed - ✅
backend/
— Working Django REST API - ✅
mobile/
— Working React Native TypeScript app
- Django + Django REST Framework
- SQLite
- React Native (Expo)
- TypeScript
- Axios
- Expo Go + LDPlayer (for Android testing)