appkit

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: MIT

README

appkit

The shared platform under pursuit: sign-in and sessions, API tokens, the HTTP and CLI plumbing, the store core, and the dashboard's reusable UI.

  • Go module github.com/adrianmross/appkit
  • npm package @adrianmross/appkit-ui in ui/

It builds on three small libraries: ratchet (migrations), tokenkeep (keyring) and oauthlite (OAuth server).

Go packages

Package What it is
actor who authorized a request, carried in the context
apperr the structured error every transport returns
paging the list envelope, cursors and the fields check
session API token checks, dashboard sign-ins with idle and absolute lifetimes, the session cookie and the request gate
httpx JSON request and response helpers, request tracing, CORS, and writes with dry run and Idempotency-Key replay
sqldb Postgres or SQLite behind one query style: ? placeholders, a transaction in the context, one database-wide lock
events the activity feed: events about a subject, with JSON data the app owns
cli the command line framework: commands as data, schema, --help --json, field projection and exit codes
migrations the schema of the platform tables, as a ratchet set named appkit

Run the tests with go test ./.... Set APPKIT_TEST_DATABASE_URL to a Postgres URL to run the schema test there too; it works in its own schema, appkit_migrations_test.

Directories

Path Synopsis
Package actor carries who authorized a request through the context.
Package actor carries who authorized a request through the context.
Package apperr is the structured error every transport returns.
Package apperr is the structured error every transport returns.
Package cli is an agent-facing command line as data: a tree of Commands, the global flags, `schema` and `--help --json`, compact JSON when piped, JSON errors on stderr, and the exit codes 0 ok, 2 usage, 3 not found, 4 conflict, 5 auth, 6 validation, 1 other.
Package cli is an agent-facing command line as data: a tree of Commands, the global flags, `schema` and `--help --json`, compact JSON when piped, JSON errors on stderr, and the exit codes 0 ok, 2 usage, 3 not found, 4 conflict, 5 auth, 6 validation, 1 other.
Package events is the activity feed: one row per thing that happened to one of a user's records.
Package events is the activity feed: one row per thing that happened to one of a user's records.
Package httpx is the JSON API plumbing a handler needs: reading and checking a request, and writing results and errors.
Package httpx is the JSON API plumbing a handler needs: reading and checking a request, and writing results and errors.
Package migrations is the schema of appkit's platform tables: users, API tokens, the audit log, idempotency records, rate-limit counters, OAuth grants, clients and refresh tokens, and passkeys.
Package migrations is the schema of appkit's platform tables: users, API tokens, the audit log, idempotency records, rate-limit counters, OAuth grants, clients and refresh tokens, and passkeys.
Package paging holds the list envelope, cursors and field projection checks.
Package paging holds the list envelope, cursors and field projection checks.
Package session checks API tokens and runs dashboard sign-ins on top of them: a sign-in is a token with an idle and an absolute lifetime.
Package session checks API tokens and runs dashboard sign-ins on top of them: a sign-in is a token with an idle and an absolute lifetime.
Package sqldb opens Postgres or SQLite and runs queries written once for both: `?` placeholders, a transaction carried in the context, and one database-wide lock.
Package sqldb opens Postgres or SQLite and runs queries written once for both: `?` placeholders, a transaction carried in the context, and one database-wide lock.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL