Update project structure and enhance frontend functionality
- 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.
This commit is contained in:
11
.cursor/rules/backend-go.mdc
Normal file
11
.cursor/rules/backend-go.mdc
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
description: Go style and backend layout (internal/app)
|
||||
globs: "**/*.go"
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Backend (Go)
|
||||
|
||||
- Entry point: [cmd/hnh-map/main.go](cmd/hnh-map/main.go). All app logic in `internal/app/` (package `app`): `app.go`, `auth.go`, `api.go`, `map.go`, `tile.go`, `admin_*.go`, `client*.go`, `migrations.go`, etc.
|
||||
- Use `go fmt ./...` before committing. Run `go test ./...` when changing behaviour.
|
||||
- Compatibility note: keep in mind [hnh-auto-mapper-server](https://github.com/APXEOLOG/hnh-auto-mapper-server) when touching client protocol or public API.
|
||||
11
.cursor/rules/frontend-nuxt.mdc
Normal file
11
.cursor/rules/frontend-nuxt.mdc
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
description: Nuxt 3 frontend in frontend-nuxt, composables, public API
|
||||
globs: "frontend-nuxt/**/*"
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Frontend (Nuxt 3)
|
||||
|
||||
- All frontend source lives in **frontend-nuxt/** (pages, components, composables, layouts, plugins, `public/gfx`). Production build output goes to `frontend/` and is served by the Go backend.
|
||||
- Public API to backend: use composables — e.g. `composables/useMapApi.ts`, `useAuth.ts`, `useAdminApi.ts` — not raw fetch in components.
|
||||
- Nuxt 3 conventions; ensure dev proxy in `nuxt.config.ts` points at backend when running locally (e.g. 3080 or 8080).
|
||||
12
.cursor/rules/project-conventions.mdc
Normal file
12
.cursor/rules/project-conventions.mdc
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
description: Monorepo layout, backend/frontend locations, API/config pointers
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# Project conventions
|
||||
|
||||
- **Monorepo:** Go backend + Nuxt 3 frontend. Backend: `cmd/hnh-map/`, `internal/app/`. Frontend source: `frontend-nuxt/`; production static output: `frontend/` (build artifact from `frontend-nuxt/`, do not edit).
|
||||
- **Changing API:** Update `internal/app/` (e.g. `api.go`, `map.go`) and [docs/api.md](docs/api.md); frontend uses composables in `frontend-nuxt/composables/` (e.g. `useMapApi.ts`).
|
||||
- **Changing config:** Update [.env.example](.env.example) and [docs/configuration.md](docs/configuration.md).
|
||||
- **Local run / build:** [docs/development.md](docs/development.md), [CONTRIBUTING.md](CONTRIBUTING.md). Dev ports: frontend 3000, backend 3080; prod: 8080.
|
||||
- **Docs:** [docs/](docs/) (architecture, API, configuration, development, deployment). Some docs are in Russian.
|
||||
Reference in New Issue
Block a user