Gridmen is a desktop + web GIS-style grid editing and visualization workspace. It combines an Electron shell, a React/Vite renderer, and a Python (FastAPI) backend.
High-level structure (monorepo):
.
├─ package.json # Workspace orchestration (concurrently)
├─ client/ # Electron desktop shell
│ ├─ package.json # Electron dependencies + build script
│ ├─ electron/ # Electron main/preload process (TypeScript)
│ └─ src/ # Renderer app (Vite + React)
│ ├─ package.json # Frontend dependencies
│ ├─ vite.config.ts # Dev server + proxy + build output
│ └─ src/ # React app source (components/core/store/views/...)
├─ server/ # Python backend project (uv + FastAPI)
│ ├─ pyproject.toml # Python deps/constraints (incl. GIS stack)
│ ├─ main.py # Uvicorn entrypoint
│ └─ py-noodle/ # Local editable dependency used by backend
├─ src/ # Backend source package (gridmen_backend)
├─ templates/ # Frontend build output target (generated)
├─ resource/ # Example datasets / resources
└─ temp/ # Runtime/temp artifacts
Versions are taken from manifests in this repository (e.g. package.json, pyproject.toml).
For full dependency lists, see client/package.json, client/src/package.json, and server/pyproject.toml.
- Node.js (v18 or higher recommended)
- Python (3.12 or higher)
- uv (Python package manager) - Install uv
Install Electron dependencies:
cd ./client
npm installInstall renderer (React/Vite) dependencies:
cd ./client/src
npm installCreate a .env file in client/src/ with the following content:
# Replace with your local API URL, e.g., http://localhost:8000
VITE_LOCAL_API_URL=http://localhost:8000
# Replace with your remote API URL, e.g., http://xxx.yyy.zzz.www:8000
VITE_REMOTE_API_URL=http://localhost:8000
# Replace with your Mapbox token, e.g., pk.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
VITE_MAP_TOKEN=your_mapbox_token_hereNote: Get your Mapbox token from Mapbox Account
Navigate to the server directory and install Python dependencies:
cd server
uv run main.pyThis will automatically:
- Create a virtual environment in
.venv/ - Install all dependencies listed in
pyproject.toml - Start the FastAPI server on
http://localhost:8000
From the repository root:
npm startThis command will concurrently:
- Start Electron desktop shell (
client/) - Launch Vite dev server (
client/src/) onhttp://127.0.0.1:5173 - Run the FastAPI backend (
server/) onhttp://localhost:8000
If you prefer to run components separately:
Frontend only (Vite dev server):
cd ./client/src
npm run devElectron desktop only:
cd ./client
npm startBackend only:
cd ./server
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv run main.py- The Vite dev server proxies
/apiand/noodlerequests toVITE_LOCAL_API_URL - Frontend build output is configured to go to
templates/ - Press
F12in the Electron app to toggle DevTools