From the registry directory (so .env is next to the compose file and justfile):
cd registry
cp .env.example .env # edit .env: set DATABASE_URL and optionally OAuth vars
just deps # start Postgres in Docker
just dev # API (air) + Web (Vite + Better Auth); Ctrl+C kills bothOr full stack in Docker:
cd registry
docker compose -f docker-compose.dev.yml up --build- Postgres: localhost:5432 (user
registry, passwordregistry, dbdevsper_registry) - API: http://localhost:8080 (Go app with Air hot reload)
- Web: http://localhost:3000 (Vite dev server; serves
/authin-process, proxies/apiand/simpleto API)
Edit code in registry/api or registry/web; API restarts on Go changes, frontend HMR on save.
If you see CONNRESET in the browser or terminal, the API may have restarted (e.g. Air rebuild). Refresh the page or retry; the proxy is configured with a 30s timeout. If it persists, ensure only one docker compose ... up is running and that the API container is healthy.
-
Use the web UI: Open http://localhost:3000, register, log in, create a package (e.g.
my-plugin), then upload a wheel/sdist via the dashboard or API. -
Install from the registry (use the simple index via the web port so
/apiand/simpleare on the same origin, or use the API port directly):# Prefer proxied URL (same origin as UI) pip install --index-url http://localhost:3000/simple/ --extra-index-url https://pypi.org/simple/ my-plugin # Or point pip only at the local registry (no PyPI) pip install --index-url http://localhost:3000/simple/ my-plugin
If you use the API port directly (no Vite proxy):
pip install --index-url http://localhost:8080/simple/ my-plugin
-
Publish from a local project (after creating the package in the UI and getting an API key or logging in):
- Configure the index in
pyproject.toml:[tool.devsper] index-url = "http://localhost:3000/simple/"
- Upload via the registry UI (package page → upload), or use the API with auth (e.g.
POST /api/v1/packages/{name}/uploadwith Bearer token or API key).
- Configure the index in
Trust/certificate warnings for http:// are expected for local dev; use HTTPS in production.
A minimal plugin lives in registry/test-plugin/. To build and optionally seed the registry:
- Build the wheel: From repo root,
just test-plugin-build(orcd registry/test-plugin && pip install build && python -m build). - Create the package and upload: Use the web UI (register, create package
devsper-plugin-demo, upload the wheel fromregistry/test-plugin/dist/), or run the seed script when the API has storage (S3) configured:Set./registry/scripts/seed-dev.sh # Or with custom wheel: ./registry/scripts/seed-dev.sh /path/to/wheel.whlREGISTRY_EMAIL,REGISTRY_PASSWORDif needed; default isseed@localhost/seedpass123. - Install from the registry:
pip install --index-url http://localhost:3000/simple/ devsper-plugin-demo(orjust test-plugin-installfrom repo root).
Without S3 configured, the API will not accept uploads (upload and file download return 503). For local dev with uploads, use AWS credentials and set S3_BUCKET, or use a local S3-compatible store (e.g. LocalStack).
To enable "Log in with GitHub" or "Log in with Google", create OAuth apps and set the client ID and secret in your env. See registry/docs/oauth-setup.md for step-by-step instructions and callback URLs.
-
Copy env example and set secrets:
cp registry/.env.prod.example registry/.env.prod # Edit .env.prod: POSTGRES_PASSWORD, JWT_SECRET, etc. -
Build and run (from repo root):
docker compose -f registry/docker-compose.prod.yml --env-file registry/.env.prod build docker compose -f registry/docker-compose.prod.yml --env-file registry/.env.prod up -d
- Postgres: internal only (volume
postgres_data) - API: port 8080
- Web: port 80 (nginx serving built frontend)
Set VITE_API_BASE_URL and VITE_REGISTRY_URL in .env.prod before building so the frontend points at your public API URL. For a single-domain setup, put Caddy/nginx in front: route /api and /simple to the API container, and everything else (including / and /auth) to the web container (Node server serving static + Better Auth).