Analyze, score, and fix your project's deployment readiness β before it hits production.
A zero-config CLI tool that detects missing deployment configurations, Docker setup issues, security vulnerabilities, and platform-specific requirements β all before you push to production.
Installation Β· Usage Β· Features Β· Project Structure Β· Contributing
mayur-deploy-ready is a comprehensive deployment readiness analyzer that helps developers catch deployment issues early. It performs automated checks across multiple categories including package configuration, Docker setup, security, framework-specific requirements, and platform deployment configs.
- β Catch issues before deployment - Identify missing files and misconfigurations locally
- β Save debugging time - Avoid broken deployments and production incidents
- β Learn best practices - Get actionable suggestions for every issue found
- β Automate fixes - Generate missing files with sensible defaults
- β CI/CD integration - Use in GitHub Actions, Jenkins, GitLab CI, and more
- β Framework-aware - Detects Express, React, Vite and validates accordingly
npm install -g mayur-deploy-readynpm install --save-dev mayur-deploy-readyRequirements: Node.js >= 18
Run from your project root directory:
mayur-deploy-readyThis performs a comprehensive analysis of your project and provides:
- β Deployment readiness score (0-100)
- π Detailed check results with pass/warning/error status
- π‘ Actionable suggestions for fixing issues
- π¨ Color-coded output for easy scanning
The standard mode provides a comprehensive deployment readiness report with colored output, showing all checks performed, issues found, and a final deployment score.
mayur-deploy-ready fixAutomatically generates missing deployment files with production-ready defaults:
| File Generated | Purpose |
|---|---|
.gitignore |
Prevents committing node_modules, .env, build artifacts |
.dockerignore |
Keeps Docker images lean by excluding dev dependencies |
Dockerfile |
Production-ready Node.js container configuration |
.env.example |
Documents required environment variables for your team |
routes/ |
Creates Express routes folder structure |
vercel.json |
Vercel deployment configuration |
railway.json |
Railway deployment configuration |
| package.json | Adds missing start, build, and test scripts |
Note: Fix mode only creates files that don't exist. Existing files are never overwritten to preserve your custom configurations.
Fix mode automatically scaffolds missing deployment files and configurations, showing exactly what was created to make your project deployment-ready.
mayur-deploy-ready --jsonReturns structured JSON output ideal for:
- π€ CI/CD pipelines - Parse results programmatically
- π Dashboards - Build deployment readiness metrics
- π Tool integration - Pipe into other automation tools
- π Logging - Store historical deployment readiness data
{
"score": 85,
"stats": {
"passed": 6,
"warnings": 2,
"errors": 0
},
"results": [
{
"type": "success",
"message": "package.json found"
},
{
"type": "warning",
"message": "Dockerfile missing"
}
]
}JSON mode provides machine-readable output perfect for CI/CD integration, automation scripts, and building deployment dashboards.
mayur-deploy-ready --ciSilent validation mode with meaningful exit codes:
| Exit Code | Status | Description |
|---|---|---|
0 |
β Pass | Deployment ready (score >= 85) |
1 |
β Fail | Deployment unsafe (score < 85) |
name: Deployment Readiness Check
on: [push, pull_request]
jobs:
deploy-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install mayur-deploy-ready
run: npm install -g mayur-deploy-ready
- name: Run deployment checks
run: mayur-deploy-ready --cideploy-check:
stage: test
image: node:18
script:
- npm install -g mayur-deploy-ready
- mayur-deploy-ready --ci
only:
- merge_requests
- mainpipeline {
agent any
stages {
stage('Deployment Check') {
steps {
sh 'npm install -g mayur-deploy-ready'
sh 'mayur-deploy-ready --ci'
}
}
}
}| Check | Description | Score Impact |
|---|---|---|
| package.json exists | Validates presence of package.json | -25 points if missing |
| Build script | Checks for build script in package.json |
-10 points if missing |
| Start script | Validates start script for Express apps |
-5 points if missing |
| Dependencies | Ensures required dependencies are listed | Variable impact |
| Check | Description | Score Impact |
|---|---|---|
| .gitignore exists | Validates .gitignore file presence | -15 points if missing |
| node_modules ignored | Ensures node_modules is in .gitignore | -5 points if not ignored |
| .env ignored | Ensures .env is in .gitignore | -10 points if not ignored |
| Build artifacts ignored | Checks for dist/, build/ in .gitignore | -5 points if missing |
| Check | Description | Score Impact |
|---|---|---|
| .env file | Validates environment variables setup | -20 points if missing |
| Weak secrets | Detects hardcoded or weak secrets | -20 points if found |
| .env.example | Checks for environment variables documentation | -5 points if missing |
| Check | Description | Score Impact |
|---|---|---|
| Dockerfile | Validates Dockerfile presence | -5 points if missing |
| .dockerignore | Checks for .dockerignore file | -5 points if missing |
| Multi-stage builds | Recommends optimization patterns | Informational |
- β
Start script validation (
node server.jsornode index.js) - β
Routes folder structure (
routes/directory) - β
Server file detection (
server.js,index.js,app.js) - β Middleware configuration validation
- β
Vite configuration (
vite.config.js) - β
Source folder structure (
src/directory) - β Build script validation
- β
Public assets folder (
public/)
| Platform | Configuration File | Validation |
|---|---|---|
| Vercel | vercel.json |
Checks for version and build config |
| Railway | railway.json |
Validates Railway schema |
| Docker | Dockerfile |
Ensures container setup |
mayur-deploy-ready/
β
βββ bin/
β βββ index.js # CLI entry point and command orchestration
β
βββ checks/ # Validation modules
β βββ buildCheck.js # Validates build script in package.json
β βββ dockerCheck.js # Checks Dockerfile and .dockerignore
β βββ envCheck.js # Environment variables validation
β βββ frameworkCheck.js # Detects Express, React, Vite
β βββ frameworks/ # Framework-specific validators
β β βββ expressChecks.js # Express.js specific checks
β β βββ reactChecks.js # React specific checks
β βββ gitignoreCheck.js # .gitignore validation and content checks
β βββ packageCheck.js # package.json presence validation
β βββ platformCheck.js # Vercel/Railway config checks
β βββ securityCheck.js # Security vulnerability detection
β
βββ fixes/ # Auto-fix modules
β βββ fixDockerfile.js # Generates production-ready Dockerfile
β βββ fixDockerignore.js # Creates .dockerignore with best practices
β βββ fixEnvExample.js # Generates .env.example template
β βββ fixGitignore.js # Creates .gitignore with common patterns
β βββ fixPackageScripts.js # Adds missing npm scripts
β βββ fixRailwayConfig.js # Generates railway.json
β βββ fixRoutes.js # Creates Express routes folder
β βββ fixVercelConfig.js # Generates vercel.json
β
βββ utils/ # Utility modules
β βββ logger.js # Colored console output (success/warning/error)
β βββ scoreManager.js # Deployment score calculation (0-100)
β βββ statsManager.js # Statistics tracking (passed/warnings/errors)
β βββ suggestions.js # Formats actionable suggestions
β
βββ assets/ # Documentation images
β βββ demo.png # Standard analysis mode screenshot
β βββ fix-mode.png # Fix mode screenshot
β βββ json-mode.png # JSON output mode screenshot
β
βββ routes/ # Example Express routes folder
β
βββ .dockerignore # Docker ignore patterns
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore patterns
βββ Dockerfile # Docker container configuration
βββ railway.json # Railway deployment config
βββ vercel.json # Vercel deployment config
βββ package.json # Project metadata and dependencies
βββ package-lock.json # Locked dependency versions
βββ LICENSE # MIT License
βββ README.md # This file
- index.js: Main CLI orchestrator that handles command parsing, runs all checks, calculates scores, and formats output
- Each module performs specific validation checks
- Returns boolean results or arrays of warnings
- Framework-specific checks are isolated in
/frameworkssubfolder
- Each module generates a specific missing file
- Uses sensible defaults and best practices
- Never overwrites existing files
- logger: Provides colored console output using chalk
- scoreManager: Manages deployment score (starts at 100, deducts points for issues)
- statsManager: Tracks passed/warning/error counts
- suggestions: Formats helpful suggestions for fixing issues
The tool starts with a perfect score of 100 and deducts points based on issues found:
| Issue Type | Points Deducted | Severity |
|---|---|---|
| package.json missing | -25 | π΄ Critical |
| Security issues | -20 | π΄ Critical |
| .gitignore missing | -15 | π΄ Critical |
| Build script missing | -10 | π‘ Warning |
| .env not ignored | -10 | π‘ Warning |
| Framework not detected | -10 | π‘ Warning |
| Docker files missing | -5 each | π‘ Warning |
| Platform configs missing | -5 each | π‘ Warning |
| node_modules not ignored | -5 | π‘ Warning |
| Score Range | Status | Badge | Description |
|---|---|---|---|
| 85-100 | π’ Production Ready | β | Safe to deploy - all critical checks passed |
| 60-84 | π‘ Needs Attention | Minor issues present - fix before deploying | |
| 0-59 | π΄ Unsafe Deployment | β | Critical issues detected - do not deploy |
| Framework | Detection Method | Specific Checks |
|---|---|---|
| Node.js | package.json presence | Runtime validation |
| Express.js | express in dependencies |
Start script, routes folder, server file |
| React | react in dependencies |
Vite config, src folder, build script |
| Vite | vite in devDependencies |
Build configuration |
| Platform | Config File | Validation |
|---|---|---|
| Docker | Dockerfile, .dockerignore |
Container setup, image optimization |
| Vercel | vercel.json |
Version, build configuration |
| Railway | railway.json |
Schema validation |
ββββββββββββββββββββββ
π DEPLOY READY
ββββββββββββββββββββββ
Running Deploy Ready Checks...
β package.json found
β Build script exists
β .gitignore found
β No weak secrets detected
β Framework Detected: Express
β Dockerfile found
β .dockerignore found
ββββββββββββββββββββββ
π Deployment Score: 100/100
ββββββββββββββββββββββ
β Passed: 7
β Warnings: 0
β Errors: 0
π’ Production Ready
ββββββββββββββββββββββ
π DEPLOY READY
ββββββββββββββββββββββ
Running Deploy Ready Checks...
β package.json found
β Build script exists
β .gitignore found
β .env not ignored
π‘ Add this to .gitignore:
.env
β No weak secrets detected
β Framework Detected: Express + React
β Dockerfile missing
π‘ Create Dockerfile:
FROM node:18
β .dockerignore missing
π‘ Create .dockerignore:
node_modules
.env
ββββββββββββββββββββββ
π Deployment Score: 75/100
ββββββββββββββββββββββ
β Passed: 5
β Warnings: 3
β Errors: 0
π‘ Needs Attention
ββββββββββββββββββββββ
π DEPLOY READY
ββββββββββββββββββββββ
Running Deploy Ready Checks...
β package.json missing
π‘ Create package.json:
npm init -y
β .gitignore missing
π‘ Create .gitignore file with:
node_modules
.env
dist
β No framework detected
ββββββββββββββββββββββ
π Deployment Score: 50/100
ββββββββββββββββββββββ
β Passed: 0
β Warnings: 1
β Errors: 2
π΄ Unsafe Deployment
Contributions are welcome! Here's how you can help:
Found a bug or have a feature request? Open an issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Your environment (OS, Node version)
-
Fork the repository
git clone https://github.com/mayurCoder2004/mayur-deploy-ready.git
-
Create a feature branch
git checkout -b feature/my-new-feature
-
Make your changes
- Add new checks in
/checks - Add corresponding fixes in
/fixes - Update documentation
- Add new checks in
-
Test your changes
npm link mayur-deploy-ready
-
Commit and push
git commit -m "Add: new feature description" git push origin feature/my-new-feature -
Open a Pull Request
- Follow existing code style and patterns
- Add comments for complex logic
- Keep functions small and focused
- Test with multiple project types (Express, React, etc.)
This project is licensed under the MIT License - see the LICENSE file for details.
- β Commercial use
- β Modification
- β Distribution
- β Private use
Mayur Pawar
- GitHub: @mayurCoder2004
- Repository: mayur-deploy-ready
- Issues: Report a bug
Built with:
Made with β€οΈ by Mayur Pawar
β Star on GitHub Β· π Report Bug Β· π‘ Request Feature


