npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aayush-dev/dockerizer

v1.0.10

Published

Dockerizer is an intelligent, zero-config utility that automatically analyzes your Node.js projects, detects frameworks, databases, and capabilities, and generates optimized, production-ready `Dockerfile` and `.dockerignore` files customized for your proj

Readme

🐳 Dockerizer

Dockerizer is an intelligent, zero-config utility that automatically analyzes your Node.js projects, detects frameworks, databases, and capabilities, and generates optimized, production-ready Dockerfile and .dockerignore files customized for your project.


🔄 Interactive Flow of the Application

Below is an interactive and visual overview of how Dockerizer processes your application. Expand each step to see the underlying code files and operations!

📊 Pipeline Architecture

graph TD
    Start([index.js]) -->|Calls| Orchestrator[analyze.js]
    Orchestrator -->|1. Walk Dir| Scanner[walkDirectory.js]
    Orchestrator -->|2. Parse Dependencies| Analyzer[packageAnalyzer.js]
    Orchestrator -->|3. Match Tech Stack| Detector[frameworkDetector.js]
    Orchestrator -->|4. Get User Preferences| Questions[askQuestions / CLI Prompts]
    Orchestrator -->|5. Build & Cmd Config| Configurator[Auto-resolve CMD & Build Steps]
    Configurator -->|6. Generate Files| Generator[dockerfileGenerator.js]
    Generator -->|Writes| Dockerfile[Dockerfile]
    Generator -->|Writes| Dockerignore[.dockerignore]

    classDef stage fill:#2b3a4a,stroke:#3b82f6,stroke-width:2px,color:#fff;
    classDef files fill:#1e293b,stroke:#10b981,stroke-width:2px,color:#fff;
    class Scanner,Analyzer,Detector,Generator,Questions files;
    class Orchestrator stage;

🛠️ Step-by-Step Breakdown (Click to Expand)

  • File: index.js
  • Role: Serves as the CLI entry point. It bootstraps the entire analyzer command.
  • Orchestration File: src/commands/analyze.js
    • Coordinates all components by feeding output from the scanner and analyzer into the detector, verifying configurations with the user, and invoking the generator.
  • File: src/scanner/walkDirectory.js
  • Role: Recursively crawls the current working directory (process.cwd()).
  • Details:
    • Ignores large/system folders like node_modules and .git.
    • Normalizes file paths cross-platform to forward slashes (/).
    • Identifies if critical configuration files (e.g. package.json, package-lock.json) exist.
  • File: src/analyzer/packageAnalyzer.js
  • Role: Inspects project-specific metadata.
  • Details:
    • Reads the root-level package.json.
    • Extracts lists of dependencies and devDependencies.
    • Checks if a main entry point (main) or executable start/dev scripts are defined.
  • File: src/detectors/frameworkDetector.js
  • Role: Matches project dependencies against known tech-stack blueprints.
  • Detections:
    • Frameworks: express, next, nest, fastify, koa, react, react-vite, vue, nuxt, angular, svelte, or default node.
    • Databases: mongodb, postgresql, mysql, sqlite, or sequelize.
    • Support Features: Realtime connections (socket.io, ws), File Uploads (multer, formidable), and Caching (redis, ioredis).
  • Function: askQuestions in src/commands/analyze.js
  • Role: Interactive user confirmation.
  • Details:
    • Displays the auto-detected configuration.
    • If some features were not detected, allows the user to manually override and set databases, realtime, caching, or file uploads.
    • Asks for the port to expose in the container, suggesting sensible framework defaults (e.g., 8000 for Express, 80 for React, 3000 for general node).
  • Function: inside src/commands/analyze.js
  • Role: Computes Docker build steps.
  • Details:
    • Resolves standard run commands: npm start, npm run dev, or node <file>.js based on scripts and entrypoints.
    • Appends Vite host flags (-- --host) if necessary so the dev server binds correctly inside the container.
    • Determines if a build step (RUN npm run build) is required for front-end and SPA architectures.
  • File: src/generators/dockerfileGenerator.js
  • Role: Writes the final production files.
  • Details:
    • Dynamically selects one of the templates from templates/ (e.g. node, express, next, react).
    • Injects variables:
      • {{NODE_VERSION}}: Inherited directly from your local machine's running Node.js version.
      • {{PORT}}: User-confirmed port.
      • {{BUILD_STEP}}: E.g. RUN npm run build.
      • {{CMD}}: Start command formatted as a JSON array (e.g. ["npm", "start"]).
    • Generates .dockerignore to keep your Docker context clean, excluding build logs, local node modules, and credentials/environment files (.env).

🚀 Getting Started

Run the tool in your project root:

npx @aayush-dev/dockerizer

The terminal will guide you through confirmation, and output your configured Dockerfile and .dockerignore!