- 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.
29 lines
1.5 KiB
Markdown
29 lines
1.5 KiB
Markdown
# Agent guide — hnh-map
|
|
|
|
Automapper server for HnH, (mostly) compatible with [hnh-auto-mapper-server](https://github.com/APXEOLOG/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](docs/api.md) and handlers in `internal/app/` (e.g. `api.go`, `map.go`, `admin_*.go`).
|
|
- **Configuration:** [.env.example](.env.example) and [docs/configuration.md](docs/configuration.md).
|
|
- **Local run / build:** [docs/development.md](docs/development.md) and [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
|
## Conventions
|
|
|
|
- **Backend:** Go; use `go fmt ./...`; tests with `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/`.
|
|
|
|
See [.cursor/rules/](.cursor/rules/) for project-specific Cursor rules.
|