Skip to content

bounswe/bounswe2026group5

Repository files navigation

Campus Neighborhood Mentorship Network

Status React TypeScript TanStack Router Django Python PostgreSQL Docker Expo React Native Vitest Jest GitHub Actions

About

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

Deployment Prerequisites

  • Docker Desktop and Docker Compose
  • Node.js 18+ (required for mobile app)

Environment Configuration

  1. Create an environment file at repository root:
cp .env.example .env

Windows PowerShell alternative:

Copy-Item .env.example .env
  1. Review and update required values in .env:
  • SECRET_KEY
  • POSTGRES_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • VITE_API_BASE_URL
  • ALLOWED_HOSTS
  • CORS_ALLOWED_ORIGINS
  • CSRF_TRUSTED_ORIGINS
  1. For production-like usage, set:
  • DEBUG=False
  • AUTH_COOKIE_SECURE=True

Quick Start (First Run Order)

Follow this order on a fresh machine:

  1. Create .env from .env.example and set required values.
  2. Start containers:
docker compose up --build -d
  1. Run backend migrations:
docker compose exec backend python manage.py migrate
  1. Verify services:
  • Frontend: http://localhost:3000
  • API: http://localhost:8000
  1. (Optional) Start mobile app using the steps in "Run Mobile App Separately".

Run with Docker Compose (Web + API + DB)

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 down

Run Mobile App Separately

The mobile app is not started by Docker Compose. Run it independently while backend services are available.

  1. Make sure API is running (preferred):
docker compose up -d backend db
  1. Install mobile dependencies:
cd mobile
npm install
  1. Configure mobile API base URL with mobile/.env.local:
EXPO_PUBLIC_API_BASE_URL=http://127.0.0.1:8000

Use 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
  1. Start Expo:
npx expo start

Migrations

Run backend migrations locally:

cd backend
python manage.py makemigrations
python manage.py migrate

Run migrations in Docker:

docker compose exec backend python manage.py migrate

Tests

Backend tests:

docker compose exec backend python manage.py test

Web tests:

docker compose exec frontend npm ci
docker compose exec frontend npm run test

Mobile tests:

cd mobile
npm ci
npm run test

APK Build (Android)

Local arm64 APK build

  1. Set mobile API URL in mobile/.env.local:
EXPO_PUBLIC_API_BASE_URL=http://your-api-host:8000
  1. Build APK:
cd mobile
npm run apk:arm64

Output APK:

mobile/android/app/build/outputs/apk/release/app-release.apk

GitHub Actions APK workflow

Workflow file:

.github/workflows/mobile-apk.yml

What it does:

  • validates EXPO_PUBLIC_API_BASE_URL secret
  • runs Expo prebuild for Android
  • builds arm64 debug APK
  • uploads artifact

Required GitHub secret:

  • EXPO_PUBLIC_API_BASE_URL (must start with http:// or https://)

Documentation

Team

Developed and maintained by Boğaziçi University Software Engineering Team (Group 5).

About

CMPE354 Group 5 repository

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors