Skip to content
theborderlandPublic

About

No description, website, or topics provided.

Resources

Stars

12 stars

Watchers

5 watching

Forks

Latest commit

 

History

857 Commits

Folders and files

Repository files navigation

The Borderland Map

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

Setup

All commands are run from the project root.

Install dependencies

npm install

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

Development

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 dev

This starts both apps using concurrently:

  • Admin (React) runs on Vite dev server
  • Map (vanilla) is served via proxy from Vite

Local URLs

  • / → map app (proxied through Vite)
  • /admin → React admin app

Hot Reloading

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


Build for production

npm run build

This will:

  1. Build the map app into public/
  2. 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.


Routing

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


Notes

  • 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

QGIS tips & tricks

See wiki

Yearly archive of camps

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.

About

No description, website, or topics provided.

Resources

Stars

12 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages