An open-source map of playgrounds in Copenhagen, built for the Public Space Lab MVP.
A filterable, mobile-friendly map showing all public playgrounds in Copenhagen — with equipment details, age suitability, and crowd-sourced corrections. Data is sourced from KK's open WFS feed (CC BY 4.0) and enriched with OpenStreetMap (ODbL).
playmap/
├── frontend/ # Next.js 14 app (MapLibre GL JS, Tailwind)
├── backend/ # Next.js API routes + ingest scripts
│ ├── src/app/api/ # /playgrounds, /playgrounds/[id], /suggest
│ └── scripts/ingest # kk.ts, osm.ts, run-all.ts
├── migrations/ # Postgres/PostGIS SQL migrations
├── shared/ # Shared TypeScript types
└── docs/ # ADRs, mapping spec, data sources, API reference
- Node.js 20+
- A Supabase project with PostGIS enabled
- Copy
.env.example→.env.localand fill in your values
cd frontend
npm install
npm run devOpen http://localhost:3000.
The API routes live in backend/src/app/api/ and are deployed alongside the frontend on Vercel (see PSL-10).
cd backend
npm install
# Run all sources
npx ts-node -P tsconfig.scripts.json scripts/ingest/run-all.ts
# Or individual sources
npx ts-node -P tsconfig.scripts.json scripts/ingest/kk.ts
npx ts-node -P tsconfig.scripts.json scripts/ingest/osm.tsIngestion runs automatically every Monday at 03:00 UTC via GitHub Actions (.github/workflows/ingest.yml).
Run migrations in order:
psql $DATABASE_URL -f migrations/001_initial_schema.sqlSee docs/PSL-4-mapping-spec.md for field-level mapping from KK and OSM sources.
| Source | License | Coverage |
|---|---|---|
KK WFS k101:legeplads |
CC BY 4.0 | ~125 playgrounds (primary) |
| OpenStreetMap Overpass | ODbL | Enrichment only |
KK data and OSM enrichment are stored in separate columns (kk_id, osm_id) and merged only at render time — this avoids triggering ODbL share-alike on a distributed merged database.
See docs/ for ADRs:
| Issue | Title | Status |
|---|---|---|
| PSL-1 | MVP architecture and scope | ✅ Done |
| PSL-2 | Tech stack selection | ✅ Done |
| PSL-3 | Playground data sources | ✅ Done |
| PSL-4 | Data model and mapping schema | ✅ Done |
| PSL-5 | UI wireframes | 🔲 Backlog |
| PSL-6 | User testing plan | 🔲 Backlog |
| PSL-7 | Map UI implementation | ✅ Done |
| PSL-8 | MIT Lab integration | 🔲 Backlog |
| PSL-9 | Backend and data ingestion | ✅ Done |
| PSL-10 | Deployment setup | 🔲 Backlog |
Code: MIT. Data: see individual source licenses above.