Campus Neighborhood Mentorship Network connects students for academic and professional mentorship. This repository contains:
- Web client (React + TypeScript)
- Backend API (Django + DRF)
- Mobile app (Expo + React Native)
- PostgreSQL database
This README is intentionally production-focused. Detailed contributor workflows are maintained in the project wiki.
Live: neighborship.app
- Docker Desktop and Docker Compose
- Node.js 18+ (required for mobile app)
- Create an environment file at repository root:
cp .env.example .envWindows PowerShell alternative:
Copy-Item .env.example .env- Review and update required values in
.env:
SECRET_KEYPOSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORDVITE_API_BASE_URLALLOWED_HOSTSCORS_ALLOWED_ORIGINSCSRF_TRUSTED_ORIGINS
- For production-like usage, set:
DEBUG=FalseAUTH_COOKIE_SECURE=True
Follow this order on a fresh machine:
- Create
.envfrom.env.exampleand set required values. - Start containers:
docker compose up --build -d- Run backend migrations:
docker compose exec backend python manage.py migrate- Verify services:
- Frontend:
http://localhost:3000 - API:
http://localhost:8000
- (Optional) Start mobile app using the steps in "Run Mobile App Separately".
From repository root:
docker compose up --build -d| Services | URL |
|---|---|
| Frontend | http://localhost:3000 |
| API | http://localhost:8000 |
| Database | localhost:5432 |
Useful commands:
# show container status
docker compose ps
# stream logs
docker compose logs -f
# stop services
docker compose downThe mobile app is not started by Docker Compose. Run it independently while backend services are available.
- Make sure API is running (preferred):
docker compose up -d backend db- Install mobile dependencies:
cd mobile
npm install- Configure mobile API base URL with
mobile/.env.local:
EXPO_PUBLIC_API_BASE_URL=http://127.0.0.1:8000Use your machine IP instead of 127.0.0.1 when testing on a physical device.
Example for physical device on same Wi-Fi:
EXPO_PUBLIC_API_BASE_URL=http://192.168.1.23:8000- Start Expo:
npx expo startRun backend migrations locally:
cd backend
python manage.py makemigrations
python manage.py migrateRun migrations in Docker:
docker compose exec backend python manage.py migrateBackend tests:
docker compose exec backend python manage.py testWeb tests:
docker compose exec frontend npm ci
docker compose exec frontend npm run testMobile tests:
cd mobile
npm ci
npm run test- Set mobile API URL in
mobile/.env.local:
EXPO_PUBLIC_API_BASE_URL=http://your-api-host:8000- Build APK:
cd mobile
npm run apk:arm64Output APK:
mobile/android/app/build/outputs/apk/release/app-release.apk
Workflow file:
.github/workflows/mobile-apk.yml
What it does:
- validates
EXPO_PUBLIC_API_BASE_URLsecret - runs Expo prebuild for Android
- builds arm64 debug APK
- uploads artifact
Required GitHub secret:
EXPO_PUBLIC_API_BASE_URL(must start withhttp://orhttps://)
Developed and maintained by Boğaziçi University Software Engineering Team (Group 5).