A Node.js + TypeScript boilerplate for calling downstream APIs using Controller → Service → Adapter pattern with Circuit Breaker.
npm install create-ts-downstream-boilerplateA Node.js + TypeScript boilerplate generator for creating downstream API applications using the Controller → Service → Adapter pattern with Circuit Breaker implementation.
- 🏗️ Clean Architecture: Controller → Service → Adapter pattern
- 🔄 Circuit Breaker: Built-in fault tolerance for downstream API calls
- 🔒 TypeScript: Full TypeScript support with strict configuration
- 🚀 Express.js: Fast and minimal web framework
- 📦 Ready to use: Includes HTTP client and error handling
- 🎯 Template replacement: Automatically replaces __APP_NAME__ placeholders
Create a new project using npx (no installation required):
``bash`
npx create-ts-downstream-boilerplate my-project-name
`bash`
cd my-project-name
npm install
npm run devAvailable Scripts
- npm run dev - Start development server with hot reloadnpm run build
- - Build TypeScript to JavaScriptnpm start` - Start production server
-
This boilerplate implements a clean, scalable architecture:
1. Controller: Handles HTTP requests/responses
2. Service: Contains business logic
3. Adapter: Manages external API communication
4. Circuit Breaker: Provides fault tolerance
Madhuri Badgujar
- Email: madhubadgujar25@gmail.com
- GitHub: @madhubadgujar