Overview
SaviTools exposes a NestJS API that CrowdPay, Fluxa, and external developers will call directly. There is currently no documentation for these endpoints beyond the source code itself. Without a clear API contract, integrators have nothing to build against, errors are opaque, and onboarding new contributors takes longer than it should. This issue covers auto-generating an OpenAPI spec from the codebase and producing a complete written integration guide alongside it.
What needs to be built
OpenAPI / Swagger (in-app)
- Add
@nestjs/swagger to apps/api and decorate all controllers, DTOs, and response classes
- Serve Swagger UI at
/api/docs in development and staging environments only (disabled in production)
- Spec must cover every existing and planned module:
network, composer, sandbox, inspector, simulator, webhooks
- All response shapes must include example values — no empty schemas
docs/api-reference.md
Sections:
- Base URLs — testnet vs mainnet environments, versioning strategy
- Authentication — API key header format (
X-SaviTools-Key), where to generate keys, which endpoints require auth
- Endpoint catalogue — for every endpoint: method + path, description, full request params/body schema, full response schema, and at least one
curl example
- Error reference — Stellar/Horizon pass-through error codes vs SaviTools-originated errors, with meaning and suggested resolution for each
- Caching behaviour — which endpoints are Redis-cached, TTL per endpoint, how to bust the cache in development
docs/quickstart.md
End-to-end walkthrough: "From zero to a submitted Stellar transaction in 5 minutes"
- Generate a keypair via
/sandbox/keypair
- Fund it on testnet via
/sandbox/fund
- Inspect the account via
/sandbox/account/:publicKey
- Find a payment path via
/simulator/paths
- Build a transaction via
/composer/build
- Submit and inspect the result via
/inspector
Each step includes the exact curl command, expected response, and a note on what could go wrong.
README.md updates
- Link to
/api/docs, docs/api-reference.md, and docs/quickstart.md from the root README
- Add a "Documentation" section above "Contributing"
Acceptance Criteria
Overview
SaviTools exposes a NestJS API that CrowdPay, Fluxa, and external developers will call directly. There is currently no documentation for these endpoints beyond the source code itself. Without a clear API contract, integrators have nothing to build against, errors are opaque, and onboarding new contributors takes longer than it should. This issue covers auto-generating an OpenAPI spec from the codebase and producing a complete written integration guide alongside it.
What needs to be built
OpenAPI / Swagger (in-app)
@nestjs/swaggertoapps/apiand decorate all controllers, DTOs, and response classes/api/docsindevelopmentandstagingenvironments only (disabled in production)network,composer,sandbox,inspector,simulator,webhooksdocs/api-reference.mdSections:
X-SaviTools-Key), where to generate keys, which endpoints require authcurlexampledocs/quickstart.mdEnd-to-end walkthrough: "From zero to a submitted Stellar transaction in 5 minutes"
/sandbox/keypair/sandbox/fund/sandbox/account/:publicKey/simulator/paths/composer/build/inspectorEach step includes the exact
curlcommand, expected response, and a note on what could go wrong.README.mdupdates/api/docs,docs/api-reference.md, anddocs/quickstart.mdfrom the root READMEAcceptance Criteria
/api/docswith all endpoints documented including request/response schemas and examplesapi-reference.mdhas at least one workingcurlexample tested against the testnet environmentREADME.mdNODE_ENV=production