Zero configuration • TypeScript ready • Multiple databases • Developer-friendly
Quick Start • Features • Documentation • Roadmap • Contributing
Phase 2 development is now underway! After successfully completing Phase 1 with all core features, we're excited to introduce powerful new capabilities:
- ✨ PostgreSQL + Prisma ORM - Modern database integration with full type safety
- ⚡ Fastify Framework - High-performance alternative to Express
- 🎨 Enhanced Customization - More control over your project structure
- 📦 Advanced Templates - Pre-configured project templates for common use cases
create-node-spark is a powerful CLI tool that eliminates the tedious setup process for Node.js backend projects. Get from zero to production-ready REST API in under 30 seconds.
Inspired by industry leaders like Create React App and Vite, it provides instant scaffolding with modern best practices built-in — so you can focus on building features, not configuring boilerplate.
| Use Case | Why Choose Us |
|---|---|
| 🚀 Rapid Prototyping | Skip setup, start coding immediately |
| 👨💻 Solo Developers | Professional structure without the complexity |
| 🏢 Team Projects | Consistent architecture across all projects |
| 📚 Learning | Industry-standard practices from day one |
| 🔄 API Development | Pre-configured REST API patterns |
Get up and running in under 30 seconds:
# Using npx (recommended - always latest version)
npx create-node-spark@latest
# Or install globally
npm install -g create-node-spark
create-node-sparkThat's it! Follow the interactive prompts and you'll have a fully configured backend ready for development.
|
|
npx create-node-spark@latest✅ Always uses the latest version
✅ No global installation required
✅ Perfect for one-time usage
npm install -g create-node-spark
create-node-spark✅ Available from anywhere
✅ Faster subsequent usage
✅ Ideal for frequent use
git clone https://github.com/talhabilal-dev/create-node-spark.git
cd create-node-spark
npm install
npm link✅ Full source code access
✅ Contributing ready
✅ Latest development features
The CLI guides you through a seamless setup with these choices:
| Step | Options | Description |
|---|---|---|
| 📝 Project Name | Custom name | Your project identifier |
| 📦 Package Manager | npm, pnpm | Choose your preferred manager |
| 💻 Language | JavaScript, TypeScript | Pick your language |
| 🚀 Framework | Express, Fastify, None | Select your framework |
| 🗄️ Database | MongoDB, MySQL, PostgreSQL, None | Choose database integration |
| ⚙️ Features | ESLint, Multer, Docker | Optional enhancements |
Every project follows a professional, scalable architecture:
my-awesome-api/
├── 📁 public/ # Static assets & uploads
│ ├── css/ # Stylesheets
│ ├── js/ # Client-side scripts
│ ├── images/ # Image assets
│ └── temp/ # Temporary files
│
├── 📁 src/ # Source code (your work lives here)
│ ├── config/ # Configuration files
│ │ ├── database.js # Database connection
│ │ └── environment.js # Environment variables
│ │
│ ├── controllers/ # Route handlers & business logic
│ │ └── example.controller.js
│ │
│ ├── middlewares/ # Custom middleware functions
│ │ ├── auth.middleware.js
│ │ └── error.middleware.js
│ │
│ ├── models/ # Database models
│ │ └── example.model.js # (Mongoose/Knex/Prisma)
│ │
│ ├── routes/ # API route definitions
│ │ └── example.routes.js
│ │
│ ├── services/ # Business logic services
│ │ └── example.service.js
│ │
│ ├── utils/ # Utility functions & helpers
│ │ └── logger.js
│ │
│ └── index.js/.ts # Application entry point
│
├── 📄 .env # Environment variables (DO NOT COMMIT)
├── 📄 .env.example # Environment template
├── 📄 .eslintrc.js # Code quality rules
├── 📄 .prettierrc # Code formatting config
├── 📄 .gitignore # Git ignore patterns
├── 📄 package.json # Dependencies & scripts
└── 📄 README.md # Project documentation
- Clear Separation: Each folder has a single, clear purpose
- Scalable: Grows naturally as your project expands
- Maintainable: Easy to find and modify code
- Team-Friendly: Consistent structure across developers
- Best Practices: Industry-standard organization
|
Best for: Flexible schemas, rapid prototyping // Pre-configured connection
mongoose.connect(process.env.MONGODB_URI)
// Ready-to-use models
const User = mongoose.model('User', schema)Features:
|
Best for: Type safety, complex relations // Auto-generated client
const prisma = new PrismaClient()
// Full TypeScript support
const users = await prisma.user.findMany()Features:
|
Best for: SQL control, migrations // Query builder ready
const users = await knex('users')
.where('active', true)Features:
|
NEW in v2.7.0 - Production-ready containerization out of the box!
When you enable Docker, create-node-spark automatically generates:
- Dockerfile - Multi-stage production build with Alpine Linux, security best practices, and health checks
- Dockerfile.dev - Development setup with hot-reload support
- .dockerignore - Optimized ignore patterns for minimal image size
- docker-compose.yml - Full-stack orchestration (when database selected)
- npm scripts - Ready-to-use Docker commands in package.json
# Enable Docker during setup
npx create-node-spark --docker
# Or use flags for full automation
npx create-node-spark my-app --lang typescript --framework express --db mongodb --docker --yes{
"docker:build": "Build production image",
"docker:run": "Run production container",
"docker:dev": "Run dev container with hot-reload",
"docker:up": "Start all services (app + database)",
"docker:down": "Stop all services",
"docker:logs": "View container logs"
}- ✅ Multi-stage builds for optimal image size
- ✅ Security: Non-root user, Alpine-based images
- ✅ Database containers with health checks
- ✅ Volume persistence for data
- ✅ Network isolation for security
- ✅ Hot-reload in development mode
Learn more about Docker support →
🎉 All core features delivered
| Feature | Status | Description |
|---|---|---|
| Multi-language Support | ✅ Done | JavaScript & TypeScript |
| Package Managers | ✅ Done | npm & pnpm support |
| Express Framework | ✅ Done | Full Express.js integration |
| MongoDB Integration | ✅ Done | Mongoose ORM setup |
| MySQL Integration | ✅ Done | Knex.js query builder |
| Developer Tools | ✅ Done | ESLint & Prettier |
| File Handling | ✅ Done | Multer configuration |
| Modern Standards | ✅ Done | ESM modules throughout |
| Environment Setup | ✅ Done | Automatic .env generation |
⚡ Current development focus
| Feature | Status | Target | Description |
|---|---|---|---|
| PostgreSQL + Prisma | ✅ Done | Q1 2025 | Modern ORM with type safety |
| Fastify Framework | ✅ Done | Q1 2025 | High-performance alternative |
| Docker Integration | ✅ Done | Q1 2025 | Multi-stage builds & compose |
| Enhanced Customization | 🔄 In Progress | Q1 2025 | Granular project structure control |
| Template System | 🔄 In Progress | Q2 2025 | Pre-built project templates |
| Testing Setup | 📋 Planned | Q2 2025 | Jest/Vitest configuration |
| Authentication Templates | 📋 Planned | Q2 2025 | JWT, OAuth, Passport.js |
| API Documentation | 📋 Planned | Q2 2025 | Swagger/OpenAPI integration |
Timeline: Q1-Q2 2025
🚀 Future vision
| Feature | Description | Impact |
|---|---|---|
| GraphQL Support | Complete GraphQL API scaffolding | High |
| Microservices Templates | Multi-service architecture | High |
| Message Queues | Redis, RabbitMQ integration | Medium |
| Caching Strategies | Redis, Memcached setup | Medium |
| Feature | Description | Impact |
|---|---|---|
| Kubernetes Configs | Production orchestration | High |
| CI/CD Templates | GitHub Actions, GitLab CI | High |
| Cloud Deployment | AWS, GCP, Azure templates | High |
| Advanced Monitoring | Logging & metrics setup | Medium |
| Feature | Description | Impact |
|---|---|---|
| Plugin System | Community plugin architecture | High |
| Custom Templates | User-defined project templates | High |
| Template Marketplace | Share and discover templates | Medium |
| CLI Extensions | Third-party command support | Medium |
Pre-configured templates for common use cases:
- 🛒 E-commerce API - Product catalog, cart, orders, payments
- 📱 Social Media Backend - Posts, likes, comments, followers
- 📚 Content Management - CMS with media handling
- 🏦 Financial Services - Transactions, accounts, compliance
- 🏥 Healthcare - HIPAA-compliant templates
- 🎓 Education Platform - Courses, students, assessments
- 🎮 Gaming Backend - Leaderboards, matchmaking, chat
Timeline: Q3 2025 - Q1 2026
Phase 1: ████████████████████ 100% ✅
Phase 2: ██████████░░░░░░░░░░ 50% 🚧
Phase 3: ░░░░░░░░░░░░░░░░░░░░ 0% 📋
Want to influence our roadmap? Vote on features →
🚀 TypeScript REST API with MongoDB
npx create-node-spark@latest my-api
# Interactive prompts:
# ✓ Language: TypeScript
# ✓ Framework: Express.js
# ✓ Database: MongoDB
# ✓ Features: ESLint + Prettier
cd my-api
npm run devWhat you get:
- ✅ TypeScript with strict mode
- ✅ MongoDB connection ready
- ✅ Express server configured
- ✅ ESLint rules active
- ✅ Auto-reload on changes
⚡ High-Performance API with Fastify + PostgreSQL
npx create-node-spark@latest fast-api
# Interactive prompts:
# ✓ Language: TypeScript
# ✓ Framework: Fastify
# ✓ Database: PostgreSQL
# ✓ Features: Prisma + ESLint
cd fast-api
npm run devWhat you get:
- ✅ Fastify for maximum performance
- ✅ PostgreSQL + Prisma ORM
- ✅ Full TypeScript type safety
- ✅ Auto-generated Prisma client
- ✅ Database migrations ready
🎨 Custom Node.js Server (Minimal Setup)
npx create-node-spark@latest custom-server
# Interactive prompts:
# ✓ Language: JavaScript
# ✓ Framework: None
# ✓ Database: None
# ✓ Features: Skip all
cd custom-server
npm startWhat you get:
- ✅ Clean Node.js HTTP server
- ✅ Professional folder structure
- ✅ Environment variables setup
- ✅ Ready for custom implementation
🛒 E-commerce API with MySQL
npx create-node-spark@latest shop-api
# Interactive prompts:
# ✓ Language: TypeScript
# ✓ Framework: Express.js
# ✓ Database: MySQL
# ✓ Features: ESLint + Multer
cd shop-api
npm run devWhat you get:
- ✅ MySQL + Knex.js query builder
- ✅ File upload handling (Multer)
- ✅ Transaction support ready
- ✅ Migration system configured
Every generated project includes these npm scripts:
# Development
npm run dev # Start development server with auto-reload
npm start # Start production server
# TypeScript (TS projects only)
npm run build # Compile TypeScript to JavaScript
npm run type-check # Check types without building
# Code Quality
npm run lint # Check code with ESLint
npm run lint:fix # Auto-fix ESLint issues
npm run format # Format code with Prettier
npm run format:check # Check formatting without changes
# Database (if applicable)
npm run db:migrate # Run database migrations
npm run db:seed # Seed database with test data
npm run db:studio # Open Prisma Studio (PostgreSQL only)Express.js Projects
Starting your server:
// src/index.js
import express from 'express'
import routes from './routes/index.js'
const app = express()
app.use(express.json())
app.use('/api', routes)
app.listen(3000, () => console.log('Server running on port 3000'))Adding a new route:
// src/routes/users.routes.js
import { Router } from 'express'
import { getUsers, createUser } from '../controllers/users.controller.js'
const router = Router()
router.get('/', getUsers)
router.post('/', createUser)
export default routerFastify Projects
Starting your server:
// src/index.js
import Fastify from 'fastify'
import routes from './routes/index.js'
const fastify = Fastify({ logger: true })
fastify.register(routes, { prefix: '/api' })
await fastify.listen({ port: 3000 })Adding a new route:
// src/routes/users.routes.js
export default async function (fastify, opts) {
fastify.get('/', async (request, reply) => {
return { users: [] }
})
}
|
|
| Feature | create-node-spark | Manual Setup | Express Generator |
|---|---|---|---|
| TypeScript Support | ✅ Built-in | ❌ Manual config | ❌ Not included |
| Modern ESM | ✅ Yes | ❌ Manual setup | ❌ CommonJS |
| Database Integration | ✅ 3 options | ❌ Manual | ❌ None |
| Multiple Frameworks | ✅ Express, Fastify | ❌ DIY | ✅ Express only |
| Developer Tools | ✅ ESLint, Prettier | ❌ Manual | ❌ Basic only |
| File Uploads | ✅ Optional | ❌ Manual | ❌ None |
| Setup Time | ⚡ 30 seconds | 🐌 2-3 hours | ⏱️ 5-10 minutes |
| Production Ready | ✅ Yes | ❓ Depends |
We welcome contributions from developers of all skill levels! Here's how you can help make create-node-spark even better.
|
|
# 1. Fork & clone the repository
git clone https://github.com/YOUR_USERNAME/create-node-spark.git
cd create-node-spark
# 2. Install dependencies
npm install
# 3. Create a feature branch
git checkout -b feature/amazing-feature
# 4. Make your changes and test locally
npm run build
npm link
create-node-spark # Test your changes
# 5. Run tests (when available)
npm test
# 6. Commit with a clear message
git add .
git commit -m "feat: add amazing feature"
# 7. Push and create a pull request
git push origin feature/amazing-feature- Follow Code Style: Use ESLint and Prettier configurations
- Write Clear Commits: Follow Conventional Commits
- Test Thoroughly: Ensure your changes work across different configurations
- Update Documentation: Keep README and docs in sync
- Be Descriptive: Explain why, not just what
- Stay Respectful: Be kind and collaborative
- Don't submit untested code
- Don't ignore linting errors
- Don't make unrelated changes in one PR
- Don't forget to update documentation
- Don't take things personally
Thanks to all our amazing contributors!
|
Complete guides and API reference |
Ask questions, share ideas |
Report bugs, request features |
Creator & Maintainer: Talha Bilal
📧 contact@talhabilal.dev
🐦 @talhabilal_dev
💼 LinkedIn
🌐 talhabilal.dev
This project is built with ❤️ and powered by these amazing technologies:
This project is licensed under the MIT License - see the LICENSE file for details.
If create-node-spark helps you build amazing projects faster, please consider:
- ⭐ Starring the repository
- 🐦 Sharing on social media
- 📝 Writing about your experience
- 🤝 Contributing code or documentation
- 💬 Helping others in discussions
Every contribution, no matter how small, makes a difference!






