Talha Bilal — Full-Stack Developer & AI Engineer
Home
Skills
Projects
Blog
About
FAQ
Contact
Github
LinkedIn
Twitter
Resume
View ProjectsContact Me
    1. Home
    2. /
    3. Blog

    Talha Bilal

    Building scalable backend systems and AI-powered applications.

    Available for freelance & remote work
    • Projects
    • Services
    • Blog
    • Contact
    contact@talhabilal.dev

    Follow Me

    © 2026 Talha Bilal. All rights reserved.

    Built with Next.js & TypeScript

    Loading article...

    🧱 Building create-node-spark: A CLI Tool to Scaffold Node.js APIs – Phase 1 Complete!
    🧱 Building create-node-spark: A CLI Tool to Scaffold Node.js APIs – Phase 1 Complete! — article by Talha Bilal
    Open Source

    🧱 Building create-node-spark: A CLI Tool to Scaffold Node.js APIs – Phase 1 Complete!

    Talha Bilal
    Talha Bilal
    May 11, 20255 min
    1. Home
    2. /
    3. Blog
    4. /
    5. 🧱 Building create-node-spark: A CLI Tool to Scaffold Node.js APIs – Phase 1 Complete!
    Share your thoughts:

    create-node-spark is a blazing-fast CLI tool for scaffolding Node.js REST APIs using JavaScript or TypeScript. With support for Express, native HTTP, MongoDB, and MySQL (via Knex.js), it gives you a flexible and minimal setup in seconds. Phase 1 is now complete—here’s everything it offers and what’s next!

    Intro:

    A powerful CLI (Command Line Interface) tool designed to scaffold production-ready Node.js backend projects with ease. Inspired by tools like Create Next App and Vite, this tool removes the boilerplate pain by generating a clean, structured, and configurable Node.js project — so you can focus on building features, not setting up folders and configs.

    The fastest way to scaffold production-ready Node.js backends — no manual setup, no headaches.

    • Why I built this tool : Inspiration from create-next-app, but tailored for Node.js REST APIs
    • Goal : Speed up backend scaffolding with sensible defaults and flexibility

    ⚙️ What is create-node-spark?

    • A CLI tool to scaffold REST API projects in Node.js
    • Supports JavaScript and TypeScript
    • Option to use Express.js or native Node.js http server
    • Pick your preferred database: None, MongoDB, or MySQL
    • Additional Features like Eslint and Multer
    • ESM and Dotenv support out of the box

    🔧 Features So Far (Phase 1)

    • ✅ Language toggle: JavaScript or TypeScript
    • ✅ Framework toggle: Express or None
    • ✅ Linting option with ESLint
    • ✅ MongoDB integration with environment setup
    • ✅ MySQL integration using Knex.js and mysql2 (as of v2.3.0)
    • ✅ Folder structure generation with:
      • src/ structure: controllers/, middlewares/, routes/, models/, utils/, services/, config/
      • public/ folder with subfolders for images/, js/, css/
      • temp/ folder for temp uploads or runtime storage
    • ✅ Smart index.js bootstrapping based on selected DB
    • ✅ Separated .env handling through config/env.js

    📦 Tech Stack

    • Node.js (ESM)
    • Inquirer.js (for CLI prompts)
    • No unnecessary bloat – intentionally lightweight

    🛠 Input Example

    🛠 Output Example

    Project Folder Structure

    It generates a comprehensive folder structure shown below :

    🔄 Version History Summary

    • 1.0.0 : JavaScript only, basic Express scaffold, optional Auth/Multer
    • 1.1.0 : Added ESLint and improved folder structure
    • 2.0.0 : TypeScript support, removed Auth/Multer, added native HTTP option
    • 2.1.0 : MongoDB selection with conditional server start
    • 2.2.0 : Public/temp folders, more structure in output
    • 2.3.0 : MySQL + Knex.js and multer support added, Phase 1 complete ✅
    Check Changelog for more details

    📍 Why Use It?

    • ✅ Time-saving: Skip repetitive setup
    • ✅ Customizable: Choose only what you need
    • ✅ Lightweight: Zero dependencies except Inquirer
    • ✅ Developer-friendly: Clean folder structure, DB-ready, ESM-first

    💭 Roadmap (Phase 2 Ideas)

    • Prisma integration
    • PostgreSQL & SQLite support
    • Optional authentication boilerplate
    • File upload module integration

    🛠 Need Help or Found a Bug?

    If you encounter any issues, have feature suggestions, or just want to say hi — I’d love to hear from you:

    • 💬 GitHub Issues: Report bugs or request features
    • 📦 NPM Package: Check out the tool on NPM
    • 📧 Email: contact@talhabilal.dev
    • 🌐 GitHub Repo: Explore the source code

    Your feedback helps shape the future of this project. Let’s build something great together!

    📢 Final Thoughts

    Phase 1 of create-node-spark is complete, and I’m proud of the flexibility and simplicity it provides. It’s not just another CLI tool—it’s a fast track to starting robust, real-world REST APIs in Node.js.

    Article Tags

    • #

    Join the Discussion

    Comments (0)

    No comments yet. Be the first to share your thoughts!