https://www.theborderland.se/map/
This project consists of two separate applications:
- map → Vanilla JavaScript app (built with esbuild)
This is the placement map - admin → React + TypeScript app (built with Vite)
This is an admin control app for managing stuff visible on the map like areas, roads, edit-mode etc
All commands are run from the project root.
npm installThis installs dependencies for all workspaces (map and admin).
Both apps are managed using npm workspaces and are combined into a single static output in the public/ folder.
apps/
map/ # vanilla app
admin/ # React app
public/ # final build output (deploy this)
First you need to set the backend API url in .env (see the template .env.template).
Then there are some settings related to the placement map see apps\map\SETTINGS.ts
npm run devThis starts both apps using concurrently:
- Admin (React) runs on Vite dev server
- Map (vanilla) is served via proxy from Vite
/→ map app (proxied through Vite)/admin→ React admin app
- Admin (React): Full hot module replacement (HMR) via Vite — updates instantly without page reload
- Map (vanilla): Automatically rebuilds on changes (via esbuild
--watch)
Note: The map app does not use true hot reload — you may need to refresh the browser manually to see updates.
npm run buildThis will:
- Build the map app into
public/ - Build the admin app into
public/admin/
This folder can be deployed to any static hosting provider (e.g. GitHub Pages). Make sure the API_URL is set in GitHub Actions variables as it is needed as an environment variable.
The admin app is served under /admin.
- On prod its currently
/map/admin - On dev its just
/admin
This is mapped in apps/admin/vite.config.ts
- The root
public/folder should not contain source files — only build output - Always run installs and scripts from the root (workspace-managed)
- The admin app uses Vite, which handles fast refresh and dev server features
- The map app uses esbuild for fast bundling
See wiki
You can access old camp placements by adding the query string ?year=2025 to the url. For example theborderland.se/map?year=2025
Every year after the event, download the placement via the existing export function and save it to public/data/blxx/all_camps.geojson.
Don't forget to anonymize by clearing out the contact info fields.