An open-source platform to stop unapproved garbage dumping in the ciy of Accra and encourage dumping at landfill sites instead. Owners of garbage request pickup via App. Collectors mark "Collected" and must "Dump" at landfill site within 24hrs. If not, owners and AMA are alerted with photo/GPS evidence.
# TrackBola-GH
An open-source platform to stop unapproved garbage dumping in the city of Accra and encourage dumping at landfill sites instead. Owners request pickup via the app, collectors complete collection and dump steps, and AMA/admin users can review active and overdue trips.
## Features
- Pickup request creation by owners
- Collector acceptance flow
- GPS-based collection and landfill verification
- Trip and violation tracking
- Prisma/PostgreSQL persistence
- WhatsApp and SMS notification hooks
- Cron-based overdue trip checks
## Local development
1. Copy the example environment file:
cp .env.example .env
2. Start PostgreSQL locally or with Docker Compose:
docker compose up -d db
3. Run Prisma migrations:
npx prisma migrate dev --name init
4. Seed sample data:
npx prisma db seed
5. Start the app:
npm install
npm run dev
The API runs on
localhost.
## Docker deployment
You can run the full stack with Docker Compose:
```bash
docker compose up --build
```
This starts:
- PostgreSQL on port 5432
- the TrackBola API on port 3000
## Production notes
- Keep secrets in a real deployment secret manager rather than committing them.
- Set `DATABASE_URL` to the production Postgres instance.
- Fill in valid WhatsApp, Hubtel, and Cloudinary credentials.
- Use HTTPS and a reverse proxy in front of the app in production.
- Run Prisma migrations in deployment before starting the app.
## Key routes
- GET /health
- POST /api/request
- POST /api/trip/accept
- POST /api/trip/collect
- POST /api/trip/dump
- GET /api/admin/holding
- GET /cron/check-24hr
## Environment variables
See .env.example for the required keys.