# Contributing to hnh-map ## Getting started Clone the repository and run the project locally (see [Development](docs/development.md)): - **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 in `internal/app/` (package `app`): `app.go` (App, types, routes, session helpers), `api.go`, `admin.go`, `client.go`, `map.go`, `tile.go`, `topic.go`, `manage.go`, `migrations.go`. The `webapp/` package in the repo root handles HTML template loading and execution. - **Frontend:** Nuxt 3 app in `frontend-nuxt/` (pages, components, composables, layouts, server, plugins, `public/gfx`). It is served by the Go backend under `/map/` with baseURL `/map/`. ## 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](https://github.com/APXEOLOG/hnh-auto-mapper-server) if relevant (e.g. client protocol or API).