NEPH is an MVP-focused disaster preparedness platform. This repository contains the backend API, web application, and Android client for core emergency support flows such as authentication, profile management, help requests, and volunteer availability.
For local evaluation, the recommended path is the Dockerized web + backend + PostgreSQL setup. The Android project lives in the same repository, but it is built and run separately from Docker Compose.
This repository currently includes the main pieces of the MVP:
- authentication flows such as signup, login, email verification, and current-user access
- profile and privacy-related flows
- help-request creation, listing, and status handling
- volunteer availability and related backend flows
- web pages for core product flows and supporting informational pages
- an Android client in the same monorepo
This should be read as a runnable MVP rather than a finished production system.
.
├── backend/ Backend API, tests, environment examples, Dockerfile
├── web/ Next.js web application, environment examples, Dockerfile
├── android/ Android application project
├── infra/ PostgreSQL bootstrap SQL and related infrastructure files
├── docs/ Project documents and reports
├── .github/ Workflows and repository templates
└── README.md Top-level project guide
- Node.js
- Express
- PostgreSQL
- JWT-based authentication
- Nodemailer
- Jest and Supertest
- Next.js
- React
- TypeScript
- Kotlin
- Jetpack Compose
- Gradle
- Docker Compose
- PostgreSQL
For the recommended local setup:
- Docker Desktop, or Docker Engine with the Compose plugin
For module-level development outside Docker:
- Node.js
- npm
For Android development:
- Android Studio
- Android SDK compatible with the project
- Web app:
https://neph.app/ - Backend API:
https://api.neph.app/api
Keep secrets and real credentials out of the repository. Use local env files or shell overrides.
Example file:
backend/.env.example
Important variables include:
POSTGRES_HOSTPOSTGRES_PORTPOSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORDDATABASE_URLif the backend uses a single connection stringJWT_SECRETSMTP_HOSTSMTP_PORTSMTP_USERSMTP_PASSAPP_URLFRONTEND_URL
Notes:
- Email-based flows require valid SMTP credentials.
- Placeholder SMTP values in the example file are not usable as-is.
- In Docker Compose, the backend connects to PostgreSQL through the internal service name
postgres. - Production deployments must use real database credentials and secure secrets.
JWT_SECRETmust not remain at the default value in production.
Example file:
web/.env.example
Important variables include:
NEXT_PUBLIC_API_BASE_URLAPI_BASE_URL
Notes:
NEXT_PUBLIC_API_BASE_URLis the browser/client-side API base.API_BASE_URLis the server-side Next.js rewrite target./apiworks for Docker and Next.js rewrite usage.http://localhost:3000/apiworks for direct backend access outside the rewrite path.
The root docker-compose.yml provides sensible local defaults. If needed, you can override values from your shell or from a local root .env file before starting Compose.
Common overrides include:
POSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORDPOSTGRES_PORTJWT_SECRETSMTP_HOSTSMTP_PORTSMTP_USERSMTP_PASSNEXT_PUBLIC_API_BASE_URLINTERNAL_API_BASE_URL
From the repository root, run:
docker compose up --buildThis starts:
- PostgreSQL on
localhost:5432 - backend on
http://localhost:3000 - web on
http://localhost:3001
Useful URLs:
- web app:
http://localhost:3001 - backend API base:
http://localhost:3000/api - backend health check:
http://localhost:3000/health
Notes:
- PostgreSQL is initialized from
infra/docker/postgres/init.sql - backend automatically applies SQL migrations from
backend/migrations/on container start - the backend waits for PostgreSQL to become healthy before starting
- the web container is configured to talk to the backend in the local Docker setup
To run the backend directly:
cd backend
cp .env.example .env
npm install
npm run migrate
npm startUse real database credentials and secure secrets for production. JWT_SECRET must not remain at the default value in production.
To run the web app directly:
cd web
cp .env.example .env.local
npm install
npm run dev
npm run build
npm run startUse NEXT_PUBLIC_API_BASE_URL=/api with the Next.js rewrite, including Docker. Use NEXT_PUBLIC_API_BASE_URL=http://localhost:3000/api when the browser should call the backend directly.
To build the Android app:
cd android
cp .env.example .env
cp keystore.properties.example keystore.properties
./gradlew :app:assembleDebug
./gradlew :app:assembleReleaseDebug Android emulator builds use http://10.0.2.2:3000/api to reach the host backend. Do not use localhost from inside the emulator for the host backend. Release builds use NEPH_RELEASE_API_BASE_URL, defaulting to https://api.neph.app/api.
android/.env.example is included for submission documentation. Local Gradle builds read release values from keystore.properties, environment variables, or Gradle properties. Before running ./gradlew :app:assembleRelease, replace the placeholder values in keystore.properties with real signing values and make sure the keystore file exists at ANDROID_KEYSTORE_PATH. Do not include real secrets in the repository.
The signed release APK must be attached to the GitHub Release manually or by the release workflow.
Final demo data is stored in the normal backend migration flow:
backend/migrations/20260512_120000__seed_bogazici_final_demo_data.sqlbackend/migrations/20260512_130000__seed_bogazici_final_demo_admin.sql
It is applied by the normal backend migration runner. In Docker Compose, backend migrations run automatically on startup, so no separate ENABLE_DEMO_SEED=true npm run seed:demo command is needed for the Boğaziçi final demo data after migrations run. The old backend/demo-migrations/ flow is optional legacy demo data only.
Boğaziçi final demo accounts are applied by the normal migration flow. All listed users use password DemoPass123!:
| Role | Password | Notes | |
|---|---|---|---|
| Admin | bogazici_admin@neph.test |
DemoPass123! |
SUPER_ADMIN account for web/admin checks |
| Requester | bogazici_requester_new_hall@neph.test |
DemoPass123! |
Active emergency request near New Hall |
| Requester | bogazici_requester_hisarustu@neph.test |
DemoPass123! |
Hisarüstü request scenario |
| Volunteer/responder | bogazici_assigned_1@neph.test |
DemoPass123! |
Assigned first-aid responder |
| Volunteer/responder | bogazici_assigned_2@neph.test |
DemoPass123! |
Assigned logistics responder |
| Reserve volunteer | bogazici_reserve_1@neph.test |
DemoPass123! |
Available first-aid volunteer |
| Reserve volunteer | bogazici_reserve_2@neph.test |
DemoPass123! |
Available search-and-rescue volunteer |
| Reserve volunteer | bogazici_reserve_3@neph.test |
DemoPass123! |
Available food/water volunteer |
| Reserve volunteer | bogazici_reserve_4@neph.test |
DemoPass123! |
Available shelter/communications volunteer |
Additional legacy demo-ready data is stored as SQL seed migrations under backend/demo-migrations/, but it is not applied by the normal backend migration flow. This keeps regular npm run migrate and start:with-migrations safe for normal environments.
To apply the demo dataset intentionally, run the regular migrations first and then run the guarded demo seed command:
cd backend
npm run migrate
ENABLE_DEMO_SEED=true npm run seed:demoThe demo seed is clearly marked with [DEMO] in user-facing records and uses deterministic demo_* IDs so local and deployment demo databases get the same presentation dataset. The demo seed command refuses to run unless ENABLE_DEMO_SEED=true is set. It includes 24 demo people: 1 admin, 9 requesters, 9 volunteers, and 5 additional community residents.
Demo login password for *@neph.test users:
DemoPass123!
Demo accounts:
| Role | Password | |
|---|---|---|
| Admin | admin_demo@neph.test |
DemoPass123! |
| Requester | requester_ayse@neph.test |
DemoPass123! |
| Requester | requester_mert@neph.test |
DemoPass123! |
| Requester | requester_fatma@neph.test |
DemoPass123! |
| Requester | requester_orhan@neph.test |
DemoPass123! |
| Volunteer | volunteer_elif@neph.test |
DemoPass123! |
| Volunteer | volunteer_can@neph.test |
DemoPass123! |
| Volunteer | volunteer_sarp@neph.test |
DemoPass123! |
| Volunteer | volunteer_zeynep@neph.test |
DemoPass123! |
| Mixed requester/volunteer/resident demos | resident_nazan@neph.test through resident_lale@neph.test |
DemoPass123! |
If you want to run modules directly on your machine instead of Docker Compose, use the module-specific setup inside each folder:
backend/web/android/
In that mode, copy the example env files inside backend/ and web/, then run the modules with npm or Android Studio as appropriate.
The Dockerized setup in this repository is intentionally focused on local development and evaluation.
Included in Docker Compose:
- PostgreSQL
- backend API
- web application
Not included in Docker Compose:
- Android application
- deployment infrastructure
- release workflows
Relevant files:
docker-compose.ymlbackend/Dockerfileweb/Dockerfileinfra/docker/postgres/init.sql
Production deployment requires backend production environment values for database credentials or DATABASE_URL, a secure JWT_SECRET, SMTP values if email flows are used, Google OAuth values if Google Sign-In is used, and push notification values if push delivery is enabled. It also requires web production values for NEXT_PUBLIC_API_BASE_URL and API_BASE_URL.
Use secure secrets instead of demo/default values. Start the backend with the normal migration-enabled startup flow so SQL migrations are applied before serving traffic.
Before final release, verify the backend health endpoint, the backend API base at https://api.neph.app/api, and the deployed web URL. The signed Android APK must be attached to the GitHub Release.
The deployed backend API base is https://api.neph.app/api. The deployed web URL must be filled into this README and the GitHub Release notes before final submission if it is not already known.
- Code is merged to
main. - Tag
final-milestonepoints to the finalmaincommit. - GitHub Release name is
1.0.0. - GitHub Release is official, not a pre-release.
- Release notes include the deployed web URL. A ready-to-copy draft is available at
docs/releases/final-milestone-release-notes.md. - Signed APK is attached to the GitHub Release.
- keep documentation and env examples in sync with the actual setup
- prefer the root Docker flow for quick end-to-end verification
The repository now includes browser-based end-to-end coverage for the main web + backend user journeys:
- guest navigation and protected-route redirects
- signup, email verification, and profile completion
- profile/privacy updates after login
- forgot-password and reset-password flows
Run them from web/:
npm run test:e2eNotes:
- Playwright global setup starts the backend and web app automatically for the test run.
- The suite expects a PostgreSQL server reachable through
TEST_POSTGRES_*variables. In CI this is provided by a service container; locally you can use your own PostgreSQL instance or Docker. - The backend runs in
NODE_ENV=testduring E2E, so auth emails are stubbed instead of being sent to a real SMTP provider. - keep local configuration out of version control