No description
  • Rust 76.4%
  • Just 16.6%
  • Dockerfile 7%
Find a file
Ed Sweeney eba358890d
All checks were successful
Build and push image / build (push) Successful in 1m27s
Merge pull request 'v1' (#3) from v1 into main
Reviewed-on: #3
2026-06-01 12:39:49 +00:00
.forgejo/workflows init 2026-05-26 15:33:39 -07:00
src v1 2026-06-01 05:37:29 -07:00
.dockerignore init 2026-05-26 15:33:39 -07:00
.gitignore init 2026-05-26 15:33:39 -07:00
anz.db v1 2026-06-01 05:37:29 -07:00
audit.log v1 2026-06-01 05:37:29 -07:00
Cargo.lock v1 2026-06-01 05:37:29 -07:00
Cargo.toml v1 2026-06-01 05:37:29 -07:00
Dockerfile init 2026-05-26 15:33:39 -07:00
justfile init 2026-05-26 15:33:39 -07:00
README.md v1 2026-06-01 05:37:29 -07:00
rust-toolchain.toml init 2026-05-26 15:33:39 -07:00

lots-of-names-service

An HTTP service that serves reproducible, safe-for-work names for arbitrary text input. A thin web layer over the lots-of-names crate.

Deployed at https://names.navicore.tech (TLS terminated upstream — this service speaks plain HTTP).

API

GET /v2/name/{text}

The current API. {text} is any url-encoded string. The response is JSON:

$ curl https://names.navicore.tech/v2/name/Edward%20John%20Sweeney
{"text":"Edward John Sweeney","name":"Sanjose Aldridge","version":"v2"}

The input is just text, not an identifier — names are not guaranteed unique. At v2 collisions occur roughly once per ~10,000 inputs.

Any other path returns a JSON 404 whose hint field points back at /v2/.

GET /healthz

Liveness/readiness probe. Returns 200 ok.

Versioning

The /v2/ prefix is the current API and is bound to a frozen major version of the lots-of-names crate. The same input always returns the same name under that prefix.

There are no plans to change the algorithm. If it ever does change, a new prefix (/v3/, …) would be added alongside /v2/ rather than replacing it: the service depends on each frozen version simultaneously via aliased dependencies in Cargo.toml (lots-of-names-v1, lots-of-names-v2, …), and each /vN/ route calls its own pinned version. Older /vN/ prefixes remain routed for existing callers.

Configuration

Env var Default Meaning
PORT 8080 TCP port to bind; the service listens on 0.0.0.0:$PORT.
RUST_LOG info Tracing filter (e.g. debug, tower_http=debug).

No TLS — run it behind TLS-terminating infrastructure.

Development

The justfile is the single source of truth for build/test/lint; Forgejo CI runs just ci and nothing else.

just ci      # fmt-check + clippy (warnings=errors) + test + release build
just run     # run locally on http://localhost:8080
just test    # run the test suite

Container image

just docker-build                     # builds git.navicore.tech/navicore/lots-of-names-rs-service:latest
just docker-run                       # runs it on http://localhost:8080
just docker-run 9000                  # ...or map to host port 9000

Publishing the image

Pushing a vX.Y.Z tag triggers .forgejo/workflows/release.yml, which builds and pushes the image to the Forgejo registry as both :X.Y.Z and :latest:

git tag v0.1.0
git push origin v0.1.0

Two repository secrets are required (Settings → Actions → Secrets):

  • REGISTRY_USER — Forgejo user with push access to the package registry.
  • REGISTRY_TOKEN — that user's access token, used for docker login git.navicore.tech.

License

MIT © Ed Sweeney