1.0.0 โ€ข Published 11 months ago

@dev-sandip/pest-js v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

PEST.js - Progressive Express Starter Template

The Progressive Node.js Template Engine

PEST.js is an advanced template engine that generates production-ready Node.js applications with enterprise-grade architecture and modern development practices. It focuses on progressive enhancement, allowing your application to grow seamlessly from a simple API to a full-scale enterprise system.

Core Features

  • ๐Ÿ—๏ธ Progressive Architecture: Scale from simple to complex without restructuring
  • ๐Ÿ”’ Enterprise Security: Industry-standard security practices built-in
  • ๐Ÿ“ฆ Intelligent Defaults: Smart configurations that adapt to your needs
  • ๐Ÿ” TypeScript-First: Built for type safety and modern development
  • ๐Ÿงช Testing Framework: Comprehensive testing suite included
  • ๐Ÿ“š Self-Documenting: Automated API documentation generation
  • ๐Ÿณ Container-Ready: Containerization support from day one
  • ๐Ÿ“ Observable: Logging and monitoring built-in

Why PEST.js?

  • ๐Ÿš€ Start Small, Grow Big: Perfect for both MVPs and enterprise applications
  • ๐ŸŽฏ Production-First: No need to restructure for production
  • ๐Ÿ“ฆ Zero-Config: Works out of the box with smart defaults
  • ๐Ÿ”’ Type-Safe: Catch errors before they happen
  • ๐Ÿ—๏ธ Feature-Based: Organized for maintainability
  • ๐Ÿงช Test-Driven: Testing infrastructure ready to go
  • ๐Ÿ“š Well Documented: Clear, automated documentation
  • ๐Ÿณ Cloud-Native: Ready for modern deployment

Overview

This script creates a complete project structure with all necessary configuration files for a modern Node.js application. It sets up a feature-based architecture that follows best practices and includes essential tools and configurations.

Features

  • ๐Ÿš€ Automated project scaffolding
  • ๐Ÿ“ Feature-based folder structure
  • โš™๏ธ Pre-configured TypeScript setup
  • ๐Ÿ”’ Environment configuration with validation
  • ๐Ÿ—ƒ๏ธ MongoDB/Mongoose integration
  • ๐Ÿ”‘ Authentication boilerplate
  • ๐Ÿ“ Logging setup
  • ๐Ÿงช Testing infrastructure
  • ๐Ÿณ Docker configuration
  • ๐Ÿ’… Code formatting and linting setup

Prerequisites

  • Bash shell
  • Basic command line knowledge

Here's the updated version of your instructions in a clean, professional format for a repository README:


Usage

1. Download the Setup Script

Windows (PowerShell)

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/nabinkhair42/mern-stater-kit/main/setup.sh" -OutFile "setup.sh"

Or, if curl is installed:

curl.exe -O https://raw.githubusercontent.com/nabinkhair42/mern-stater-kit/main/setup.sh

macOS & Linux (Terminal)

curl -O https://raw.githubusercontent.com/nabinkhair42/mern-stater-kit/main/setup.sh

2. Make the Script Executable

macOS & Linux

chmod +x setup.sh

Windows (Git Bash, WSL, or PowerShell with Ubuntu Subsystem)

chmod +x setup.sh

(PowerShell does not require this step.)

3. Run the Script

macOS & Linux

./setup.sh

Windows (PowerShell)

bash setup.sh

(Requires WSL, Git Bash, or a compatible shell.)

4. Enter the Project Name

When prompted, enter your project name or press Enter to use the default name.


Generated Structure

The script creates the following structure:

project-root/
โ”œโ”€โ”€โ”€docs
โ”‚   โ””โ”€โ”€โ”€api
โ”œโ”€โ”€โ”€scripts
โ”œโ”€โ”€โ”€src
โ”‚   โ”œโ”€โ”€โ”€config
โ”‚   โ”œโ”€โ”€โ”€features
โ”‚   โ”‚   โ”œโ”€โ”€โ”€auth
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€โ”€controllers
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€โ”€models
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€โ”€routes
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€โ”€schemas
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€โ”€services
โ”‚   โ”‚   โ””โ”€โ”€โ”€users
โ”‚   โ”‚       โ”œโ”€โ”€โ”€controllers
โ”‚   โ”‚       โ”œโ”€โ”€โ”€models
โ”‚   โ”‚       โ”œโ”€โ”€โ”€routes
โ”‚   โ”‚       โ”œโ”€โ”€โ”€schemas
โ”‚   โ”‚       โ””โ”€โ”€โ”€services
โ”‚   โ”œโ”€โ”€โ”€middleware
โ”‚   โ”œโ”€โ”€โ”€types
โ”‚   โ””โ”€โ”€โ”€utils
โ””โ”€โ”€โ”€tests
    โ”œโ”€โ”€โ”€fixtures
    โ”œโ”€โ”€โ”€integration
    โ””โ”€โ”€โ”€unit

Generated Files

The script creates and configures the following files:

Core Configuration

  • package.json - Project dependencies and scripts
  • tsconfig.json - TypeScript configuration
  • .env, .env.example, .env.test - Environment configurations
  • Dockerfile and docker-compose.yml - Docker setup

Development Tools

  • .eslintrc.js - ESLint configuration
  • .prettierrc - Prettier configuration
  • .gitignore - Git ignore rules
  • jest.config.js - Jest testing configuration

Application Files

  • src/app.ts - Application entry point
  • src/config/ - Configuration files for database, environment, etc.
  • Feature modules with MVC structure
  • Utility scripts for database seeding and documentation generation

Post-Setup Steps

After running the script:

  1. Navigate to your project directory:

    cd your-project-name
  2. Install dependencies:

    npm install
  3. Update the .env file with your configuration

  4. Start development:

    npm run dev

Available Scripts

The generated project includes several npm scripts:

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Start production server
  • npm run lint - Run ESLint
  • npm run format - Run Prettier
  • npm test - Run tests
  • npm run seed - Run database seeding
  • npm run docs - Generate API documentation

Contributing

Feel free to submit issues and enhancement requests to our GitHub repository!