- Added a new AGENTS.md file to document the project structure and conventions. - Updated .gitignore to include node_modules and refined cursor rules. - Introduced new backend and frontend components for improved map interactions, including context menus and controls. - Enhanced API composables for better admin and authentication functionalities. - Refactored existing components for cleaner code and improved user experience. - Updated README.md to clarify production asset serving and user setup instructions.
1.5 KiB
1.5 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/ |
Backend logic (auth, API, map, tiles, admin, migrations) |
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 (part of docs is in Russian) |
grids/ |
Runtime data (in .gitignore) |
Where to look
- API: docs/api.md and handlers in
internal/app/(e.g.api.go,map.go,admin_*.go). - Configuration: .env.example and docs/configuration.md.
- Local run / build: docs/development.md and CONTRIBUTING.md.
Conventions
- Backend: Go; use
go fmt ./...; tests withgo 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/.
See .cursor/rules/ for project-specific Cursor rules.