- Updated the application to serve the SPA from the root path instead of /map/, enhancing accessibility. - Modified redirect logic to ensure backward compatibility with old /map/* URLs. - Adjusted documentation across multiple files to reflect the new routing structure and API endpoints. - Improved handling of OAuth redirects and session management in the backend. - Updated frontend configuration to align with the new base URL settings.
1.4 KiB
1.4 KiB
Contributing to hnh-map
Getting started
Clone the repository and run the project locally (see Development):
- Option A: Docker Compose for development:
docker compose -f docker-compose.dev.yml up(frontend on 3000, backend on 3080). - Option B: Run Go backend from the repo root (
go run ./cmd/hnh-map -grids=./grids -port=8080) and Nuxt separately (cd frontend-nuxt && npm run dev). Ensure the frontend can reach the backend (proxy or same host).
Code layout
- Backend: Entry point is
cmd/hnh-map/main.go. All application logic lives ininternal/app/(packageapp):app.go,auth.go,api.go,handlers_redirects.go,client.go,client_grid.go,client_positions.go,client_markers.go,admin_*.go,map.go,tile.go,topic.go,migrations.go. - Frontend: Nuxt 3 app in
frontend-nuxt/(pages, components, composables, layouts, server, plugins,public/gfx). It is served by the Go backend at root/with baseURL/.
Formatting and tests
- Go: run
go fmt ./...before committing. - Add or update tests if you change behaviour; run
go test ./...if tests exist.
Submitting changes
- Open a pull request with a clear description of the change.
- Mention compatibility with hnh-auto-mapper-server if relevant (e.g. client protocol or API).