How satrianugrahasaputra/geo-entity-manager works
Geo Entity Manager is a web app for viewing and managing geographically located entities. Users browse and filter a map-backed list, inspect details, then add, edit, or delete entities; creation and editing take coordinates from map clicks or a draggable marker. The frontend routes these actions through query hooks and an API client to a Go service, which validates requests and persists entities in PostgreSQL. README documents database migrations and seed data at startup. Backend source excerpts show the API layers; the frontend-to-backend and startup wiring is documented, while unsampled implementation details are omitted.
Main entry points: App.tsx App state · entity_handler.go Entity handlers · Sidebar.tsx Entity sidebar · entities.ts Entity API operations
Components 21
Map management UI
- App state
frontend/src/App.tsx - Entity sidebar
frontend/src/components/Sidebar.tsx - Entity form
frontend/src/components/EntityForm.tsx - Interactive map
frontend/src/components/Map.tsx
Frontend data access
- Entity schemas
frontend/src/schemas/entity.ts - Entity types
frontend/src/types/entity.ts - Entity query hooks
frontend/src/hooks/useEntities.ts - Entity API operations
frontend/src/api/entities.ts - HTTP client
frontend/src/api/client.ts - API types
frontend/src/types/api.ts
Backend API
- HTTP server
backend/internal/handler/router.go - Entity handlers
backend/internal/handler/entity_handler.go - Request decoding
backend/internal/handler/decode.go - Request validation
backend/internal/validation/validator.go - Entity service
backend/internal/service/entity_service.go - Entity model
backend/internal/model/entity.go - API startup
backend/cmd/server/main.go
Persistence
- Entity repository
backend/internal/repository/entity_repository.go - PostgreSQL
- Schema migrations
backend/internal/repository/migrate.go
Other components
- User
Connections 24
- User → App state: uses
README.md - App state → Entity sidebar: renders
frontend/src/App.tsx - App state → Interactive map: renders
frontend/src/App.tsx - App state → Entity query hooks: queries entities
frontend/src/App.tsx - Entity sidebar → Entity form: renders
frontend/src/components/Sidebar.tsx - Entity form → Entity schemas: validates with
frontend/src/components/EntityForm.tsx - Interactive map → App state: reports location
frontend/src/App.tsx - Entity sidebar → Entity query hooks: mutates entities
frontend/src/components/Sidebar.tsx - Entity query hooks → Entity API operations: calls
frontend/src/hooks/useEntities.ts - Entity API operations → HTTP client: sends requests
frontend/src/api/entities.ts - HTTP client → API types: formats errors
frontend/src/api/client.ts - Entity API operations → Entity types: uses types
frontend/src/api/entities.ts - Entity types → Entity schemas: infers types
frontend/src/types/entity.ts - HTTP client → HTTP server: HTTP API
README.md - API startup → HTTP server: starts
README.md - HTTP server → Entity handlers: routes requests
backend/internal/handler/router.go - Entity handlers → Request decoding: decodes requests
backend/internal/handler/entity_handler.go - Entity handlers → Request validation: validates input
backend/internal/handler/entity_handler.go - Entity handlers → Entity service: calls
backend/internal/handler/entity_handler.go - Entity service → Entity repository: delegates storage
backend/internal/service/entity_service.go - Entity repository → PostgreSQL: reads and writes
backend/internal/repository/entity_repository.go - Entity repository → Entity model: maps records
backend/internal/repository/entity_repository.go - API startup → Schema migrations: runs migrations
README.md - Schema migrations → PostgreSQL: updates schema
README.md