150 lines
4.6 KiB
Markdown
150 lines
4.6 KiB
Markdown
|
|
<!-- go-doc:generated:begin source=go-places signature=2ccc0e464627498e334eed4a4ee84aa8 generated=2026-10-07 08:28 UTC -->
|
||
|
|
# go-places
|
||
|
|
|
||
|
|
This project has no README yet. The analyser found Go module `go-places-api`, 33 Go source files, 10 HTTP endpoints and 8 environment variables.
|
||
|
|
|
||
|
|
| | |
|
||
|
|
| --- | --- |
|
||
|
|
| Module | go-places-api · go 1.24 · 33 Go files |
|
||
|
|
| Endpoints | 10 endpoints |
|
||
|
|
| Components | 1 component directory |
|
||
|
|
| Tests | 106 in 8 files |
|
||
|
|
| Go lines | 9856 lines |
|
||
|
|
|
||
|
|
> Everything between the generated markers is rewritten by every sync. Notes written outside the markers are kept.
|
||
|
|
|
||
|
|
## For Users
|
||
|
|
|
||
|
|
### What this application does
|
||
|
|
|
||
|
|
This project has no README yet. The analyser found Go module `go-places-api`, 33 Go source files, 10 HTTP endpoints and 8 environment variables.
|
||
|
|
|
||
|
|
This project ships no README, so the summary above was derived from the source tree. If that is wrong, write a README and re-run the sync.
|
||
|
|
|
||
|
|
### Reading this in go-doc
|
||
|
|
|
||
|
|
Open the page and pick the tab that matches you:
|
||
|
|
|
||
|
|
- **User** — you use the finished application. This section is all you need.
|
||
|
|
- **Operator** — you run it. Configuration, ports and deployment notes are under that tab.
|
||
|
|
- **Developer** — you integrate with it or change it. The API and layout tables are under that tab.
|
||
|
|
|
||
|
|
The feedback panel stores a note per audience, tagged with your badge, so operators and developers can see which audience raised it.
|
||
|
|
|
||
|
|
### Where the original documentation lives
|
||
|
|
|
||
|
|
This project already carries 2 Markdown documents. They stay in the project repository: this page points at them instead of copying them, so there is always exactly one copy of the truth.
|
||
|
|
|
||
|
|
| Document | Size |
|
||
|
|
| --- | --- |
|
||
|
|
| `DEVELOPER.md` | 8602 bytes |
|
||
|
|
| `INFRASTRUCTURE.md` | 6216 bytes |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## For Operators
|
||
|
|
|
||
|
|
### Running it locally
|
||
|
|
|
||
|
|
The root Makefile defines 1 target:
|
||
|
|
|
||
|
|
- `make web-dev`
|
||
|
|
|
||
|
|
### Image
|
||
|
|
|
||
|
|
`Dockerfile` builds from `golang:1.24-alpine`, `alpine:3.20` in stages: builder and exposes 8080.
|
||
|
|
|
||
|
|
### Configuration
|
||
|
|
|
||
|
|
Every environment variable found in the source or in a `.env` file:
|
||
|
|
|
||
|
|
| Variable | Example | Found in |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `ADDR` | `:8080 # Go API listen address` | .env file |
|
||
|
|
| `ALLOWED_IMAGE_TYPES` | — | source |
|
||
|
|
| `AUTH_MODE` | `dev # Authentication mode: dev or jwt` | .env file |
|
||
|
|
| `ENABLE_REST` | `true # Enable REST API endpoints (/api/places, etc.)` | .env file |
|
||
|
|
| `LOG_FORMAT` | — | source |
|
||
|
|
| `LOG_LEVEL` | — | source |
|
||
|
|
| `VITE_PROXY_TARGET` | `http://localhost:8080 # API target for Vite proxy` | .env file |
|
||
|
|
|
||
|
|
### Network surface
|
||
|
|
|
||
|
|
Ports referenced across the project: `8080`.
|
||
|
|
|
||
|
|
### Deployment artefacts
|
||
|
|
|
||
|
|
Helm 2 charts found:
|
||
|
|
|
||
|
|
- `charts/api`
|
||
|
|
- `charts/go-loose`
|
||
|
|
|
||
|
|
### Operations documentation that already exists
|
||
|
|
|
||
|
|
Read these in place rather than duplicating them here:
|
||
|
|
|
||
|
|
- `INFRASTRUCTURE.md` — 🏰 Ecosystem Installation Playbook: End-to-End Guide
|
||
|
|
|
||
|
|
> This project ships no README, so the summary was derived from the tree layout. Add one and re-run the sync.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## For Developers
|
||
|
|
|
||
|
|
### Module layout
|
||
|
|
|
||
|
|
- api/go.mod — module go-places-api, go 1.24, 6 direct and 8 indirect dependencies
|
||
|
|
|
||
|
|
### HTTP API
|
||
|
|
|
||
|
|
Every route registration found in the source:
|
||
|
|
|
||
|
|
| Method | Path | Handler |
|
||
|
|
| --- | --- | --- |
|
||
|
|
| `GET` | `/api/places` | `protect` |
|
||
|
|
| `POST` | `/api/places` | `protect` |
|
||
|
|
| `GET` | `/api/places/` | `protect` |
|
||
|
|
| `GET` | `/api/places/{placeId}/images` | `protect` |
|
||
|
|
| `GET` | `/graphql` | `handleGraphQLConsole` |
|
||
|
|
| `POST` | `/graphql` | `graphqlHandler` |
|
||
|
|
| `GET` | `/healthz` | `handleHealthz` |
|
||
|
|
| `POST` | `/places/{placeId}/images` | `upload` |
|
||
|
|
| `GET` | `/readyz` | `handleReadyz` |
|
||
|
|
| `POST` | `/upload` | `upload` |
|
||
|
|
|
||
|
|
### Direct dependencies
|
||
|
|
|
||
|
|
- `github.com/golang-jwt/jwt/v5` v5.3.1
|
||
|
|
- `github.com/google/uuid` v1.6.0
|
||
|
|
- `github.com/graphql-go/graphql` v0.8.1
|
||
|
|
- `github.com/rabbitmq/amqp091-go` v1.15.0
|
||
|
|
- `golang.org/x/image` v0.23.0
|
||
|
|
- `modernc.org/sqlite` v1.34.5
|
||
|
|
|
||
|
|
### Directory map
|
||
|
|
|
||
|
|
| Directory | Files | Lines | Likely purpose |
|
||
|
|
| --- | --- | --- | --- |
|
||
|
|
| `api/` | 38 | 10024 | HTTP handlers and routing |
|
||
|
|
| `charts/` | 18 | 399 | deployment manifests |
|
||
|
|
| `web/` | 10 | 695 | frontend assets |
|
||
|
|
| `shared-interfaces/` | 1 | 160 | unknown — inspect directly |
|
||
|
|
|
||
|
|
### Languages
|
||
|
|
|
||
|
|
- **Go** — 33 files, 9856 lines
|
||
|
|
- **JSON** — 5 files, 1672 lines
|
||
|
|
- **TypeScript** — 5 files, 695 lines
|
||
|
|
- **YAML** — 14 files, 686 lines
|
||
|
|
- **tgz** — 1 file, 319 lines
|
||
|
|
- **CSS** — 1 file, 285 lines
|
||
|
|
- **Markdown** — 2 files, 264 lines
|
||
|
|
- **graphql** — 1 file, 160 lines
|
||
|
|
- **Templates** — 2 files, 80 lines
|
||
|
|
- **db-wal** — 1 file, 14 lines
|
||
|
|
|
||
|
|
### Developer documentation that already exists
|
||
|
|
|
||
|
|
- `DEVELOPER.md` — Developer Workflow Guide for Go Places Project
|
||
|
|
<!-- go-doc:generated:end -->
|