Zimbabwe pharmacy finder — NestJS + Expo + React
# MedFinderZW
Find medicine near you across Zimbabwe. Search by drug name or brand, compare prices, see which pharmacies have it in stock right now, and reserve your pack — all from your phone.
**Stack:** NestJS · Fastify · Prisma · PostgreSQL · Expo · React Native · React Query
---
## Quick Start (5 steps)
```bash
# 1. Create the database
psql -U postgres -c "CREATE DATABASE medfinderzw;"
# 2. Backend — install, migrate & seed
cd backend
npm install
npx prisma migrate dev --name init
npm run db:seed
npm run start:dev # →
localhost
# 3. Mobile — install & start (new terminal)
cd ../mobile
npm install
npx expo start # scan QR with Expo Go, or press i (iOS) / a (Android)
```
The backend and mobile use separate `.env` files (already created).
Swagger UI:
localhost
---
## Prerequisites
| Tool | Version | Notes |
|------|---------|-------|
| Node.js | 20 LTS | `node -v` |
| npm | 10+ | comes with Node |
| PostgreSQL | 15+ | must be running locally |
| Expo CLI | latest | `npm install -g expo-cli` |
| Expo Go app | latest | install from App Store / Play Store for physical device |
---
## Backend Setup
### Environment
`backend/.env` is pre-configured with your local credentials:
```env
DATABASE_URL="postgresql://postgres:%40malachi4@localhost:5432/medfinderzw?schema=public"
JWT_SECRET="medfinderzw-dev-secret-change-in-production-2025"
JWT_EXPIRES_IN="7d"
PORT=3000
NODE_ENV=development
```
> **Note:** The `@` in the password is percent-encoded as `%40` in the URL. PostgreSQL connection strings require this encoding for special characters.
### Database setup
```bash
cd backend
# Create the database (if psql isn't available, use pgAdmin or DBeaver)
psql -U postgres -c "CREATE DATABASE medfinderzw;"
# Generate Prisma client
npx prisma generate
# Run migrations (creates all tables)
npx prisma migrate dev --name init
# Seed demo data (drugs, pharmacies, branches, users, reservations)
npm run db:seed
``` …