Skip to content

theborderland/map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

758 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Borderland Map

https://www.theborderland.se/map/

Project Structure

This project consists of two separate applications:

  • map → Vanilla JavaScript app (built with esbuild)
  • admin → React + TypeScript app (built with Vite)

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)

Available Commands

All commands are run from the project root.

Install dependencies

npm install

This installs dependencies for all workspaces (map and admin).


Development

First you need an API url, 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 for the workflow, otherwise you need to define the override repository url in SETTINGS.ts.


Routing

The admin app is served under /admin.

  • On prod its currently /map/admin
  • On dev its just /admin

This is mapped in vite.config.ts


Notes

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

About

No description, website, or topics provided.

Resources

Stars

12 stars

Watchers

6 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors