Prototype backend for a "Pokemon GO" style trash cleanup game. This repo ships with a functional API and gameplay loop backed by Postgres/PostGIS.
- Map/game loop: dirty pins -> cleanup -> verify -> reward
- Core gamification: XP, levels, collections, leaderboards
- Social features: squads, raids, adopted territories
- Verification: AI score placeholder + community voting
backend/: Node.js API prototype (Express)db/schema.sql: PostGIS schema you can migrate into Postgresfrontend/: Svelte + Vite client UIROADMAP.md: Development phases and milestones
docker compose up -dcd backendnpm installDATABASE_URL=postgres://trash:trash@localhost:5433/trash_cleanup npm run migrateDATABASE_URL=postgres://trash:trash@localhost:5433/trash_cleanup npm run devcd ../frontendnpm installnpm run dev- Visit
http://localhost:5173
- Frontend uses
VITE_API_BASE(defaults to/api). - Copy
frontend/.env.exampletofrontend/.envto override.
cd frontendnpm run buildnpm run preview -- --port 5173
npm run frontend:devnpm run frontend:buildnpm run frontend:previewnpm run frontend:verifynpm run backend:testnpm test
- The client registers a service worker in production builds.
- Image uploads and AI verification are stubbed and modeled as URLs + scores.
- The API expects a
DATABASE_URLenvironment variable. - Seed data for trash types is included at the end of
db/schema.sql. - Migrations live in
backend/migrationsand are run vianpm run migrate. - The client uses Leaflet via CDN for the map view.