DevStride auto-generates a fully typed frontend API client and OpenAPI documentation from backend route definitions. This ensures the frontend SDK always matches the backend API — no manual sync needed.
ds api generate-api-client
frontend/src/api/The generated SDK provides:
Run ds api generate-api-client after:
Add x-skip-client metadata to routes that shouldn't appear in the frontend SDK (e.g., internal healthcheck endpoints, webhook receivers):
// In your Hono route definition
app.get('/healthcheck', { 'x-skip-client': true }, (c) => {
return c.json({ status: 'ok' });
});
ds api generate-api-docs
Generates a comprehensive OpenAPI 3.0.0 specification at:
backend/src/modules/api/interface-adapters/lambda/http/openapi.json
The generated spec includes:
Two exclusion levels are available:
| Metadata | Effect |
|---|---|
x-skip | Excluded from documentation only; still appears in the API client SDK |
x-skip-client | Excluded from both documentation and the API client SDK |
Use x-skip for internal endpoints that developers need to call programmatically but shouldn't be in public docs. Use x-skip-client for endpoints that the frontend never calls (webhooks, healthchecks).
Understanding how a frontend API call reaches the backend helps when debugging:
Frontend SDK call
→ HTTP request to API Gateway
→ Lambda handler (Hono route)
→ Input validation
→ Command/Query constructed
→ CommandBus/QueryBus.execute()
→ Service handler (business logic)
→ Repository (database access)
→ Result<T, E> returned
→ Response formatted and sent
The code generators (ds local generate command/query) scaffold this entire chain. The API client generator ensures the frontend matches the entry point.