Skip to main content

Developing Priompt

The repos

Priompt is a family of small repos, each doing one job:

RepoShipsLanguage
priomptserver + ops CLIGo
protoGo module priomptproto: the gRPC contract + stubs, JWT claims, validate, semdiffGo + protobuf
authpriompt-auth binary + the priomptauth/authn packageGo
db-adaptersGo module priomptdb: SQLite/Postgres storageGo
clipromptctlGo
python-sdkpip package (imports as priompt)Python
js-sdknpm packageNode
uiweb front endSvelteKit
priompt-dot-commarketing site + these docsNext.js + Docusaurus

The module graph

Every arrow points one way. Shared things live in exactly one place and are imported, never copied:

Authentication (credentials, JWT minting and verification, the tokens file, the pluggable Provider interface) lives entirely in auth/authn. The server keeps only authorization, in internal/auth, because org scoping is policy about prompt URIs. The server build-depends on auth but never calls the auth service at runtime.

Setup

Clone the family side by side (see From source). The Go repos use replace directives such as replace priomptproto => ../proto until the modules are published.

cd priompt && make build && make test
cd ../auth && go build -o priompt-auth . && go test ./...
cd ../cli && go build -o promptctl . && go test ./...
cd ../python-sdk && python -m venv venv && venv/bin/pip install -e . pytest && venv/bin/pytest -q
cd ../js-sdk && npm install

Server layout

cmd/priompt/main.go server + ops CLI
cmd/priompt/backup.go backup / restore
internal/auth/auth.go authorization: org scoping + write gate
internal/server/server.go gRPC handlers
internal/server/observability.go metrics, audit log, rate-limit interceptors
internal/server/cache.go in-process L2 cache
internal/server/redis_cache.go Redis L2 cache
internal/pubsub/pubsub.go embedded NATS publisher + subscriber

A request flows: agent → gRPC → auth interceptor → Server.GetPromptstore.Getvalidate.Prompt → response.

Dev data

cd priompt && ./priompt serve -db dev.db
sh seed-dev.sh localhost:8443 # prompts with real commit history (uses publish)

This docs site

cd priompt-dot-com
pnpm install
pnpm docs:dev # http://localhost:3000
pnpm docs:build # static output in docs/build

Release names that aren't final (the Docker image, the PyPI and npm packages) live in docs/src/vars.ts. Pages use them through two components, available in every .mdx page without an import:

Install with <Var name="pypiName" />.

<Cmd lang="sh">{`docker run -p 8443:8443 {{dockerImage}}`}</Cmd>

<Cmd> substitutes each {{var}} and adds a "name not final" note while a value is still a <placeholder>. To name the release, edit one line in vars.ts, or set PRIOMPT_DOCKER_IMAGE, PRIOMPT_PYPI_NAME, or PRIOMPT_NPM_NAME at build time.