mirror of
https://gitea.jeffemmett.com/jeffemmett/regencommunity-staging.git
synced 2026-06-25 16:25:23 +02:00
Kāeo community resources map — MapLibre GL fork of regencommunity.shakespeare.wtf with self-hosted backend
- TypeScript 97.6%
- CSS 1.3%
- Dockerfile 0.8%
- HTML 0.3%
- MapLibre 5 auto-adds an AttributionControl by default. The explicit one we added produced a second 'OpenFreeMap © OpenMapTiles' badge. Pass attributionControl options to the Map constructor instead. - Force map.resize() once the style loads, and observe the container with ResizeObserver. Fixes the empty-canvas case where the WebGL context initialises before layout settles (Radix Tabs / flex parents can leave the container 0×0 on first paint). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .gitea/workflows | ||
| public | ||
| server | ||
| src | ||
| .dockerignore | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| index.html | ||
| LICENSE-FORK.md | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.ts | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.server.json | ||
| vite.config.ts | ||
regencommunity-staging
Staging fork of regencommunity.shakespeare.wtf by regencomm (Regenerate Community Kāeo Whangaroa, Aotearoa).
Recovered from the upstream production sourcemap, then upgraded with:
- Real OpenStreetMap (MapLibre GL + OpenFreeMap vector tiles by default)
- Native clustering at low zoom
- "Near me" geolocation
- Persistent backend (Hono + better-sqlite3) replacing the unfinished Workers stub
- Docker + Traefik deployment on the standard Netcup stack
The original SVG Graph view is preserved as an alternate visualisation alongside the new Map view.
Local dev
npm install --legacy-peer-deps
npm run dev:server # backend on :3000
npm run dev # vite on :5173, proxies /api → :3000
Production build
npm run build # vite build → dist/, tsc → dist-server/
npm start # serves dist/ + API on :3000
Configuration
Vite env vars (build-time, prefix VITE_):
| Var | Default | Purpose |
|---|---|---|
VITE_API_BASE_URL |
/api |
Override if API is on a different origin. |
VITE_MAP_STYLE_URL |
https://tiles.openfreemap.org/styles/liberty |
MapLibre style URL. |
VITE_MAPTILER_KEY |
(unset) | If set, overrides style with MapTiler streets-v2. |
Server env vars:
| Var | Default | Purpose |
|---|---|---|
PORT |
3000 |
HTTP listen port. |
DB_PATH |
./data/regen.db |
SQLite file location. |
STATIC_ROOT |
./dist |
Where the Vite build is served. |
Attribution
- Original code by regencomm on shakespeare.diy. No upstream LICENSE was published.
- Upstream attribution preserved in the footer ("Vibed with Shakespeare").
- This fork is for staging / experimentation; please contact the original author before publishing as a competing instance.