docs: add frontend development guidelines

This commit is contained in:
2026-08-26 15:29:11 +08:00
parent f7601d554e
commit faaa33717f
8 changed files with 213 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
# Directory Structure
The Vite workbench lives in `workbench/client/`. Application code is under `src/`: `components/` for UI, `map/` for OpenLayers adapters, `lib/` for API clients, `types/` for API contracts, and `ui/` for shared primitives. The Node HTTP server remains `workbench/server.js`.
Keep OpenLayers construction and source mutation outside page components; `src/components/MapCanvas.tsx` owns lifecycle and `src/map/layers.ts` owns the layer registry.