The fastest way to create production-ready PERN Stack applications
PERN Setup is a powerful, cross-platform boilerplate generator that creates modern PostgreSQL + Express.js + React + Node.js applications in minutes. Choose from 5 professional templates, get security best practices built-in, and start coding with confidence.
π― Perfect for: Full-stack developers, startups, students, and teams building modern web applications with the PERN stack (PostgreSQL, Express.js, React, Node.js).
β‘ One Command Setup β’ π Security First β’ π± Cross-Platform β’ π³ Docker Ready β’ π§ͺ Testing Included
- π Lightning Fast: Create a complete PERN Stack app in under 2 minutes
- π Production Ready: Security best practices, JWT auth, rate limiting built-in
- π± Cross-Platform: Works on Linux, macOS, Windows (PowerShell & WSL2)
- π― 5 Professional Templates: From simple APIs to microservices architectures
- π οΈ Modern Dev Tools: TypeScript, ESLint, Prettier, Jest, Docker, CI/CD ready
- π Zero Learning Curve: Comprehensive docs and examples included
- π§ Customizable: Choose your own stack components and configurations
# Clone the repository
git clone https://github.com/rosettascript/pern-setup.git
cd pern-setup
# Make the script executable
chmod +x run.sh
# Run the setup
./run.sh# Clone the repository
git clone https://github.com/rosettascript/pern-setup.git
cd pern-setup
# Run the PowerShell script
.\run.ps1| Operating System | Shell Script | PowerShell Script | Recommended |
|---|---|---|---|
| Linux | β Fully Supported | β Not Available | Bash Script |
| macOS | β Fully Supported | β Not Available | Bash Script |
| Windows (WSL2) | β Fully Supported | β Not Available | Bash Script |
| Windows (Git Bash) | β Mostly Supported | β Not Available | Bash Script |
| Windows (PowerShell) | β Not Supported | β Fully Supported | PowerShell Script |
| Windows (Command Prompt) | β Not Supported | β Not Supported | Use WSL2 or PowerShell |
- Node.js 16+ (recommended: 18 LTS)
- npm 8+ or yarn 1.22+
- Git 2.20+
- PostgreSQL 12+ (optional, can be installed via script)
- PowerShell 5.1+ or PowerShell Core 6+
- Windows 10/11 (recommended)
- WSL2 (for Bash script compatibility)
- Ubuntu 18.04+, Debian 10+, CentOS 7+, RHEL 7+, Fedora 30+
- Package manager:
apt,yum, ordnf
- macOS 10.15+ (Catalina or later)
- Homebrew (recommended for package management)
# Linux/macOS
./run.sh
# Windows PowerShell
.\run.ps1Choose specific versions and configurations for your project.
Get guided through each step of the setup process.
- Modern React + Express with TypeScript
- Basic authentication
- File upload support
- Modern UI components
- Express.js backend with comprehensive setup
- Database integration
- Authentication middleware
- API documentation
- Complete application with frontend and backend
- Authentication system
- File upload functionality
- Modern UI with Tailwind CSS
- Multi-service architecture
- API Gateway
- Service discovery
- Docker containerization
- Interactive folder creation
- Choose your own components
- Flexible configuration
- Code Quality: ESLint, Prettier, EditorConfig
- Testing: Jest, Supertest, React Testing Library
- Git Hooks: Husky, lint-staged
- Docker: Dockerfile, docker-compose.yml
- CI/CD: GitHub Actions, GitLab CI templates
- PostgreSQL with automatic setup
- Redis for caching and sessions
- Database migrations
- Connection pooling
- Environment-based configuration
- JWT authentication
- Password hashing
- CORS configuration
- Rate limiting
- Security headers
- SSL/TLS certificates
# Run the script
./run.sh
# Choose option 3 (Full-stack template)
# Follow the prompts to configure your project# Run the PowerShell script
.\run.ps1
# Choose your template and follow the setup wizard# Set environment variables before running
export PROJECT_NAME="my-pern-app"
export DB_PASSWORD="secure-password"
# Run with custom settings
./run.sh# Fix script permissions
chmod +x run.sh
chmod +x lib/*.sh# Set execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Or run with bypass
.\run.ps1 -ExecutionPolicy Bypass# Install Node.js via package manager
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# macOS (with Homebrew)
brew install node
# Windows (with Chocolatey)
choco install nodejs# Check PostgreSQL status
sudo systemctl status postgresql
# Start PostgreSQL
sudo systemctl start postgresql
# Check connection
psql -h localhost -U postgres- WSL2: Best compatibility with Bash script
- PowerShell: Use
run.ps1for native Windows experience - Git Bash: Limited compatibility, some features may not work
- Ubuntu/Debian: Full support with
aptpackage manager - CentOS/RHEL: Full support with
yum/dnfpackage manager - Arch Linux: Manual installation may be required
- Homebrew: Recommended for package management
- Xcode Command Line Tools: Required for some dependencies
pern-setup/
βββ run.sh # Main setup script (Linux/macOS)
βββ run.ps1 # PowerShell script (Windows)
βββ lib/ # Library functions
β βββ utils.sh # Utility functions
β βββ detect.sh # System detection
β βββ install.sh # Installation functions
β βββ database.sh # Database setup
β βββ security.sh # Security configuration
β βββ devtools.sh # Development tools
β βββ validator.sh # Validation functions
βββ templates/ # Project templates
β βββ starter/ # Starter template
β βββ fullstack/ # Full-stack template
β βββ api-only/ # API-only template
β βββ microservices/ # Microservices template
βββ docs/ # Documentation
# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=myapp
DB_USER=myuser
DB_PASSWORD=mypassword
# Application Configuration
NODE_ENV=development
PORT=5000
JWT_SECRET=your-secret-key
CORS_ORIGIN=http://localhost:3000PERN Stack is a popular full-stack development combination using:
- PostgreSQL - Robust relational database
- Express.js - Fast, unopinionated web framework for Node.js
- React - JavaScript library for building user interfaces
- Node.js - JavaScript runtime for server-side development
- β‘ Speed: 2-minute setup vs hours of manual configuration
- π Security: Production-ready security features built-in
- π± Cross-platform: Works on Linux, macOS, and Windows
- π― Templates: 5 specialized templates for different use cases
- π οΈ Modern Tools: Latest TypeScript, testing, and development tools
No! PERN Setup is designed for both beginners and experienced developers. The comprehensive documentation and examples make it easy to get started.
Absolutely! All templates are fully customizable. You can modify any component, add new features, or remove what you don't need.
- Fork the repository
- Create a feature branch
- Make your changes
- Test on multiple platforms
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Kim Galicia
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
- Added PowerShell support for Windows users
- Enhanced cross-platform compatibility
- Improved template structure
- Added comprehensive documentation
- Fixed fullstack template file inclusion issues
- Initial release
- Bash script for Linux/macOS
- Basic project templates
- Database setup automation
Made with β€οΈ for the PERN Stack community