Skip to main content

Scaffolds

Scaffolds are production-ready service templates. Each scaffold ships with a complete, opinionated project structure so you spend zero time on boilerplate and start writing business logic immediately.

Available scaffolds

TypeFrameworkLanguageStatus
nodejsFastify 4TypeScript✅ Available
fastapiFastAPIPython 3.12✅ Available

What every scaffold includes

FeatureDetails
Layered architectureroutes → controllers → services → repositories
Global error handlerCatches sync + async errors, returns formatted JSON
Custom error classesAppError, NotFoundError, ValidationError, UnauthorizedError
Structured loggingRequest-ID-correlated logs (Pino / structlog)
Input sanitizationSchema validation + XSS / injection protection
CORSConfigurable per environment via env vars
Rate limitingConfigurable limits via env vars
Health checkGET /health returns status, version, uptime
Env validationFails fast at startup if required vars are missing
Standardized responses{ success, data, error, meta } envelope
DockerMulti-stage Dockerfile + docker-compose for local dev
CI/CDGitHub Actions pipeline included

Generate a scaffold

idp scaffold new --type nodejs --name my-service
idp scaffold new --type fastapi --name my-service

Scaffold versioning

Every generated service contains a .idp.json file recording the scaffold type and version. Run idp scaffold check at any time to see whether your service is behind the latest template.

idp scaffold check
# → ✅ my-service is on the latest nodejs scaffold (v1.2.0)