Sardis currently keeps two Connect packages because they integrate with different runtime surfaces. They share protocol concepts, but they are not interchangeable packages.
| Package | Runtime surface | Primary user | Owns | Does not own |
|---|---|---|---|---|
packages/sardis-connect/ |
Python FastAPI and Starlette-style server apps | Python merchants exposing paid HTTP APIs | FastAPI router mounting, service manifest generation, /sardis/pay, /sardis/verify, /sardis/usage, webhook signature verification, Python pricing models |
Browser widgets, TypeScript SDK behavior, canonical protocol validation |
packages/sardis-connect-js/ |
TypeScript Node, Express, and Connect-style middleware | TypeScript merchants exposing paid HTTP APIs | Express/Connect middleware, TypeScript manifest types, Node payment and verification route helpers | Python middleware, browser checkout UI, canonical TypeScript SDK behavior |
Keep both package directories for now:
sardis-connectremains the Python distribution and import package boundary.@sardis/connectremains the TypeScript package name.packages/sardis-connect-js/is the monorepo directory name that prevents path collision with the Python package.
Do not rename either package until the migration can preserve:
- published package names
- local editable installs or package manager filters
- README installation commands
- package-owned validation commands
- downstream import paths
- Put FastAPI or Starlette behavior in
packages/sardis-connect/. - Put Node, Express, or Connect middleware behavior in
packages/sardis-connect-js/. - Put reusable payment protocol primitives in
packages/sardis-protocol/orpackages/sardis-mpp/, not in either Connect package. - Put public TypeScript SDK behavior in
packages/sardis-sdk-js/, not inpackages/sardis-connect-js/. - Keep hosted dashboard, checkout UI, approval inbox, and managed merchant ops outside these packages unless the OSS/private boundary explicitly changes.
Run the owning package command before changing either package:
PYTHONPATH=packages/sardis-connect/src uv run pytest packages/sardis-connect/tests -q
pnpm --filter @sardis/connect buildRun the contributor gate before landing cross-package changes:
pnpm run check:contributor