Skip to content

ceyniustranberg/playmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playmap — Copenhagen Playground Map

An open-source map of playgrounds in Copenhagen, built for the Public Space Lab MVP.

What it is

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).

Repo structure

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

Quick start

Prerequisites

  • Node.js 20+
  • A Supabase project with PostGIS enabled
  • Copy .env.example.env.local and fill in your values

Frontend

cd frontend
npm install
npm run dev

Open http://localhost:3000.

Backend / API routes

The API routes live in backend/src/app/api/ and are deployed alongside the frontend on Vercel (see PSL-10).

Data ingestion

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.ts

Ingestion runs automatically every Monday at 03:00 UTC via GitHub Actions (.github/workflows/ingest.yml).

Database

Run migrations in order:

psql $DATABASE_URL -f migrations/001_initial_schema.sql

See docs/PSL-4-mapping-spec.md for field-level mapping from KK and OSM sources.

Data sources & licensing

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.

Architecture decisions

See docs/ for ADRs:

Status

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

License

Code: MIT. Data: see individual source licenses above.

About

Open-source map of playgrounds in Copenhagen — Public Space Lab MVP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors