Files
hnh-map/AGENTS.md
Nikolay Tatarinov 6529d7370e Add configuration files and update project documentation
- Introduced .editorconfig for consistent coding styles across the project.
- Added .golangci.yml for Go linting configuration.
- Updated AGENTS.md to clarify project structure and components.
- Enhanced CONTRIBUTING.md with Makefile usage for common tasks.
- Updated Dockerfiles to use Go 1.24 and improved build instructions.
- Refined README.md and deployment documentation for clarity.
- Added testing documentation in testing.md for backend and frontend tests.
- Introduced Makefile for streamlined development commands and tasks.
2026-03-01 01:51:47 +03:00

2.3 KiB

Agent guide — hnh-map

Automapper server for HnH, (mostly) compatible with hnh-auto-mapper-server. This repo is a monorepo: Go backend + Nuxt 3 frontend.

Structure

Path Purpose
cmd/hnh-map/ Go entry point (main.go)
internal/app/ App struct, domain types, router, topic pub/sub, migrations
internal/app/store/ bbolt database access layer (db.go, buckets.go)
internal/app/services/ Business logic (auth.go, map.go, admin.go, client.go, export.go)
internal/app/handlers/ HTTP handlers (api.go, auth.go, map.go, client.go, admin.go, tile.go)
internal/app/apperr/ Domain error types
internal/app/response/ Shared JSON response utilities
frontend-nuxt/ Nuxt 3 app source (pages, components, composables, layouts, public/gfx)
frontend/ Build output — static assets served in production; generated from frontend-nuxt/ (do not edit here)
docs/ Architecture, API, configuration, development, deployment, testing
grids/ Runtime data (in .gitignore)

Where to look

Conventions

  • Backend: Go; use make fmt / make lint; tests with make test or go test ./....
  • Frontend: Nuxt 3 in frontend-nuxt/; public API access via composables (e.g. useMapApi, useAuth, useAdminApi).
  • Ports: Dev — frontend 3000, backend 3080 (docker-compose.dev); prod — single server 8080 serving backend + static from frontend/.
  • Architecture: Layered: Store → Services → Handlers. Domain errors in apperr/ are mapped to HTTP status codes by handlers.

See .cursor/rules/ for project-specific Cursor rules.