AutoDevKit

πŸš€ AutoDevKit

One-click setup for professional JavaScript development workflow

License: MIT JavaScript Node.js

🎯 What This Does

Demo

Sets up a professional development environment with automatic code formatting, linting, and commit validation in under 60 seconds!

✨ Features

πŸš€ Quick Start

🌟 Method 1: Single-file Installation (Easiest)

# One command - zero dependencies!
curl -fsSL https://raw.githubusercontent.com/msrajawat298/AutoDevKit/main/setup_project.sh -o setup_project.sh

Method 2: Modular Installation

# Download and run installer (downloads all modular components)
curl -fsSL https://raw.githubusercontent.com/msrajawat298/AutoDevKit/main/install.sh | bash

# Then run the setup
cd autodevkit
./setup.sh

Method 3: Git Clone (For Developers)

# Clone the repository
git clone https://github.com/msrajawat298/AutoDevKit.git
cd AutoDevKit

# Run the setup wizard
chmod +x setup.sh
./setup.sh

Method 4: Download Archive

# Download the latest release archive
curl -L -o autodevkit.tar.gz https://github.com/msrajawat298/AutoDevKit/archive/main.tar.gz
tar -xzf autodevkit.tar.gz
cd AutoDevKit-main

# Run setup
chmod +x setup.sh
./setup.sh

That’s it! Follow the interactive prompts and you’re done! πŸŽ‰

πŸ”„ Installation Methods Comparison

Method Dependencies File Size Best For
Single-file βœ… Zero 22KB End users, quick setup
Modular Requires scripts/ ~15 files Developers, customization
Git Clone Git required Full repo Contributors, development
Archive Manual extraction Full repo Offline usage

πŸ›  Supported Technologies

Technology ESLint Rules Prettier Config Git Ignore npm Scripts
React.js βœ… React/JSX rules βœ… JSX formatting βœ… Next.js builds βœ… Dev server
React Native βœ… RN specific βœ… Mobile formatting βœ… iOS/Android βœ… Platform scripts
Node.js βœ… Server-side rules βœ… Backend formatting βœ… Server ignores βœ… Nodemon
General JS βœ… Universal rules βœ… Standard format βœ… Basic ignores βœ… Standard scripts

πŸ“ Generated Files Overview

After running the setup, you’ll get these files in your project:

πŸ”§ Configuration Files (Auto-Generated)

| File | Purpose | Can I Edit? | Description | |β€”β€”|β€”β€”β€”|β€”β€”β€”β€”-|β€”β€”β€”β€”-| | .eslintrc.json | Linting rules | ⚠️ Carefully | Defines code quality rules | | .prettierrc | Formatting rules | βœ… Yes | Code formatting preferences | | .commitlintrc.json | Commit validation | ⚠️ Carefully | Commit message standards | | .lintstagedrc.json | Pre-commit tasks | ⚠️ Carefully | What runs before commits | | .eslintignore | Files to skip linting | βœ… Yes | Add files to ignore |

πŸͺ Git Hooks (Auto-Generated)

| File | Purpose | Can I Edit? | Description | |β€”β€”|β€”β€”β€”|β€”β€”β€”β€”-|β€”β€”β€”β€”-| | .husky/pre-commit | Before commit validation | ❌ No | Runs linting/formatting | | .husky/commit-msg | Commit message check | ❌ No | Validates commit format |

πŸ“¦ Project Files (Auto-Generated)

| File | Purpose | Can I Edit? | Description | |β€”β€”|β€”β€”β€”|β€”β€”β€”β€”-|β€”β€”β€”β€”-| | .gitignore | Git ignore rules | βœ… Yes | Add more files to ignore | | package.json | Project dependencies | βœ… Yes | Add your own dependencies |

🎨 Customization Guide

βœ… Safe to Modify

1. Prettier Configuration (.prettierrc)

{
  "semi": true,           ← Add/remove semicolons
  "singleQuote": true,    ← Use single or double quotes  
  "tabWidth": 2,          ← Change indentation size
  "printWidth": 80        ← Change line width
}

2. ESLint Ignore (.eslintignore)

# Add your files/folders to ignore
build/
dist/
*.min.js

3. Git Ignore (.gitignore)

# Add your project-specific ignores
.env.local
*.log
coverage/

⚠️ Modify Carefully

1. ESLint Rules (.eslintrc.json)

Only modify the rules section:

{
  "extends": ["..."],  ← Don't change
  "rules": {
    "no-console": "warn",     ← You can modify these
    "no-unused-vars": "error" ← Add your own rules
  }
}

2. Commit Rules (.commitlintrc.json)

You can add more commit types:

{
  "extends": ["@commitlint/config-conventional"],
  "rules": {
    "type-enum": [2, "always", [
      "feat", "fix", "docs",
      "custom-type"  ← Add your types here
    ]]
  }
}

❌ Don’t Touch These

🎬 Demo Mode

When you choose β€œDemo Mode” during setup:

  1. βœ… Creates sample files with intentional issues
  2. βœ… Shows bad commit being rejected
  3. βœ… Demonstrates auto-formatting
  4. βœ… Shows successful commit

Perfect for presentations and learning!

πŸ“ Commit Message Format

After setup, use these commit message formats:

# βœ… Good commits
git commit -m "feat: add user authentication"
git commit -m "fix: resolve login issue"
git commit -m "docs: update README"
git commit -m "style: format code"
git commit -m "refactor: simplify validation"
git commit -m "test: add unit tests"
git commit -m "chore: update dependencies"

# ❌ Bad commits (will be rejected)
git commit -m "fix stuff"
git commit -m "updated files"  
git commit -m "changes"

πŸ›‘οΈ What Happens on Every Commit

  1. Pre-commit Hook Runs:
    • πŸ” Lints only staged files
    • 🎨 Formats code automatically
    • πŸ“ Validates file names
  2. Commit Message Hook Runs:
    • πŸ“ Validates commit message format
    • ❌ Rejects if format is wrong
    • βœ… Allows if format is correct
  3. Result:
    • Clean, formatted code
    • Professional commit history
    • Consistent code style across team

⚑ Available npm Scripts

After setup, use these commands:

# Code quality
npm run lint           # Check for issues
npm run lint:fix       # Fix issues automatically
npm run format         # Format all files
npm run format:check   # Check formatting
npm run validate       # Full validation

# Development (technology-specific)
npm run dev           # Start development server
npm run build         # Build for production
npm run test          # Run tests

πŸ”§ Troubleshooting

Issue: Commit is rejected

βœ– subject may not be empty [subject-empty]

Solution: Use proper commit format: feat: your message

Issue: Linting errors

βœ– 'variable' is assigned a value but never used

Solution: Remove unused variables or add // eslint-disable-next-line

Issue: Permission denied

chmod +x setup.sh
./setup.sh

🎯 Why Each File Exists

Configuration Philosophy:

File Dependencies:

setup.sh
β”œβ”€β”€ Creates β†’ .eslintrc.json (linting rules)
β”œβ”€β”€ Creates β†’ .prettierrc (formatting rules) 
β”œβ”€β”€ Creates β†’ .commitlintrc.json (commit rules)
β”œβ”€β”€ Creates β†’ .lintstagedrc.json (pre-commit tasks)
β”œβ”€β”€ Creates β†’ .husky/pre-commit (git hook)
β”œβ”€β”€ Creates β†’ .husky/commit-msg (git hook)
└── Updates β†’ package.json (scripts & deps)

οΏ½ Development & Build System

AutoDevKit uses a modular architecture with an automated build system that creates both versions:

πŸ—οΈ For Developers

# Development commands
./dev.sh build          # Build single-file version
./dev.sh watch          # Auto-rebuild on changes
./dev.sh test           # Test generated files
./dev.sh dev            # Start development mode
./dev.sh release        # Full release process

# Project status
./dev.sh status         # Show current state
./dev.sh help           # Show all commands

πŸ“ Architecture Overview

AutoDevKit/
β”œβ”€β”€ setup.sh                    # Modular version (for developers)
β”œβ”€β”€ setup_project.sh            # Single-file version (auto-generated)
β”œβ”€β”€ build.sh                    # Builds single file from modules
β”œβ”€β”€ dev.sh                      # Development manager
└── scripts/                    # Modular components
    β”œβ”€β”€ ui/                     # User interface modules
    β”œβ”€β”€ config/                 # Configuration generators
    β”œβ”€β”€ core/                   # Core functionality
    └── demo/                   # Demo features

πŸ”„ Development Workflow

  1. Edit modules in scripts/ directory
  2. Auto-rebuild with ./dev.sh watch OR manual ./dev.sh build
  3. Test changes with ./dev.sh test
  4. Single file updates automatically - ready to share!

✨ Benefits

οΏ½πŸš€ For Maintainers

Adding New Technologies:

  1. Add case in ask_technology() function in scripts/ui/prompts.sh
  2. Create technology-specific configs in scripts/config/*.sh
  3. Add dependencies in scripts/core/dependencies.sh
  4. Run ./dev.sh build to update single file
  5. Update this README

Modifying Configurations:

  1. Edit relevant module in scripts/ directory
  2. Test with ./dev.sh test-modules
  3. Rebuild with ./dev.sh build
  4. Test with sample projects
  5. Ensure no breaking changes

πŸ“„ License

MIT License - feel free to use in your projects!

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test with different technologies
  5. Submit a pull request

⭐ Show Your Support

If this saved you time, please star the repository and share with other developers!


Made with ❀️ for developers who want professional setups without the hassle!