Skip to content

thirawat27/CHAMP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CHAMP Logo

CHAMP By Thirawat27

A modern, cross-platform local web development stack

Caddy + HTTP(S) + Adminer / phpmyAdmin + MySQL + PHP

Features β€’ Installation β€’ Usage β€’ Keyboard Shortcuts β€’ Developer Experience β€’ Development β€’ Configuration


πŸ“– Overview

CHAMP is a self-contained desktop application that provides a complete local web development environment. Unlike traditional solutions like XAMPP, CHAMP is designed to run without administrator privileges by keeping all runtime binaries, configurations, logs, and data in the user's writable app data folder.

Note: This project is a fork of CAMPP by KarnYong, with enhancements and modifications by Thirawat27.

Key Highlights:

  • πŸš€ No Admin Required - Runs entirely in user space with non-default ports
  • πŸ“¦ Self-Contained - All binaries bundled, no external dependencies
  • 🎯 Cross-Platform - Windows, macOS, and Linux support
  • πŸ”„ Version Management - Switch between multiple PHP, MySQL, and PostgreSQL versions, plus optional Node.js, Python, Go, and Ruby runtimes
  • 🎨 Modern UI - Built with React and Tauri for a native experience
  • ⚑ Fast & Lightweight - Rust-powered backend for optimal performance

πŸ› οΈ Tech Stack

Current Versions

Component Version Description
Caddy 2.11.4 Modern web server with HTTPS
PHP 8.5.7 Latest PHP runtime (switchable)
MySQL 9.7.1 LTS database server
PostgreSQL 18.4 Stable database server
phpMyAdmin 5.2.3 Database management interface
Adminer 5.4.2 Lightweight database interface

Alternative Options

  • PHP: 7.4.33 (EOL), 8.5.7 (Latest)
  • Database UI: phpMyAdmin 5.2.3 or Adminer 5.4.2
  • Databases: MySQL 9.7.1 or PostgreSQL 18.4

✨ Features

Core Functionality

  • βœ… One-Click Service Management - Start/stop/restart all services with a single click
  • βœ… System Tray Integration - Minimize to tray and control services from the system tray
  • βœ… Auto-Start Services - Optionally start services automatically on app launch
  • βœ… Real-Time Status Monitoring - Live service status updates and system metrics
  • βœ… Port Configuration - Customize ports to avoid conflicts
  • βœ… Project Management - Organize and access your web projects easily

Advanced Features

  • πŸ”„ Multi-Version Support - Install and switch between different PHP, MySQL, and PostgreSQL versions
  • πŸ“¦ Package Selection - Choose which components and optional runtimes to install during first run
  • πŸ”’ Secure by Default - Isolated user environment, no system-wide changes
  • πŸ“Š System Metrics - Monitor CPU, memory, and disk usage
  • πŸ—‚οΈ Custom Configuration - Advanced users can customize runtime configs
  • πŸ› Debug Mode - Developer menu with runtime folder access and reset options
  • ⌨️ Keyboard Shortcuts - Control the app without touching the mouse

🌐 Default URLs

Service URL
Web Server http://localhost:8080
Database Tool http://localhost:8080/phpmyadmin or http://localhost:8080/adminer
MySQL 127.0.0.1:3306
PostgreSQL 127.0.0.1:5432
PHP-FPM 127.0.0.1:9000 (internal)

Note: All ports can be customized in the Settings panel to avoid conflicts with other services.


πŸ“₯ Installation

Download Pre-Built Binaries

Download the latest release for your platform from the Releases page:

  • Windows: CHAMP_x.x.x_x64_en-US.msi or .exe
  • macOS: CHAMP_x.x.x_aarch64.dmg (Apple Silicon) or CHAMP_x.x.x_x64.dmg (Intel)
  • Linux: CHAMP_x.x.x_amd64.AppImage or .deb

First Run Setup

  1. Launch CHAMP
  2. The First-Run Wizard will guide you through:
    • System dependency checks
    • Package selection (choose which components to install)
    • Runtime binary downloads
    • Initial configuration
  3. Once complete, you're ready to start developing!

πŸš€ Usage

Starting Services

  1. Open CHAMP
  2. Click Start All to launch all services
  3. Access your projects at http://localhost:8080
  4. Manage your database at http://localhost:8080/phpmyadmin or http://localhost:8080/adminer, depending on the selected tool

Managing Services

  • Individual Control: Start/stop/restart each service independently
  • Bulk Operations: Use "Start All" or "Stop All" for convenience
  • Auto-Start: Enable in Settings to start services on app launch

Keyboard Shortcuts

CHAMP provides comprehensive keyboard shortcuts for efficient workflow:

Service Control

Shortcut Action
Ctrl / Cmd + S Start all services
Ctrl / Cmd + R Restart all services
Ctrl / Cmd + X Stop all services

Quick Access

Shortcut Action
Ctrl / Cmd + W Open website (localhost)
Ctrl / Cmd + D Open database tool (phpMyAdmin/Adminer)
Ctrl / Cmd + O Open projects folder
Ctrl / Cmd + L Open logs folder
Ctrl / Cmd + T Open a terminal with CHAMP runtimes on PATH

UI Navigation

Shortcut Action
Ctrl / Cmd + , Toggle Settings panel
? Show keyboard shortcuts help
Esc Dismiss notification or close Settings

Language-Independent: All shortcuts use physical key positions (e.code) so they work regardless of keyboard language (Thai, English, etc.).

πŸ“– View Complete Keyboard Shortcuts Documentation

System Tray

  • Minimize to Tray: Close the window to minimize to system tray
  • Quick Access: Right-click the tray icon for quick actions
  • Background Operation: Services continue running when minimized

Switching PHP Versions

  1. Open Settings panel
  2. Navigate to PHP Version section
  3. Select desired version from dropdown
  4. Click Switch Version (downloads if not installed)
  5. Restart PHP-FPM service

πŸ’» Development

Prerequisites

  • Node.js 18+ and pnpm 11+
  • Rust 1.70+ (for Tauri backend)
  • Platform-specific requirements:
    • Windows: WebView2 Runtime
    • macOS: Xcode Command Line Tools
    • Linux: webkit2gtk, libssl-dev

Setup

# Clone the repository
git clone https://github.com/thirawat27/CHAMP.git
cd CHAMP

# Install dependencies
pnpm install

# Run in development mode
pnpm tauri dev

Available Scripts

Frontend (React + Vite)

pnpm dev          # Start Vite dev server (http://localhost:1420)
pnpm build        # Build frontend for production
pnpm preview      # Preview production build
pnpm test         # Run tests with Vitest
pnpm test:ui      # Run tests with UI
pnpm lint         # Lint TypeScript files
pnpm lint:fix     # Fix linting issues
pnpm format       # Format code with Prettier

Backend (Rust + Tauri)

cd src-tauri

cargo build       # Build Rust backend
cargo test        # Run Rust tests
cargo clippy      # Lint Rust code
cargo fmt         # Format Rust code

Full Application

pnpm tauri dev    # Run full app in dev mode
pnpm tauri build  # Build production app with installers

Project Structure

CHAMP/
β”œβ”€β”€ src/                      # React frontend
β”‚   β”œβ”€β”€ components/           # UI components
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx     # Main dashboard
β”‚   β”‚   β”œβ”€β”€ ServiceCard.tsx   # Service control cards
β”‚   β”‚   β”œβ”€β”€ FirstRunWizard.tsx # Setup wizard
β”‚   β”‚   └── SettingsPanel.tsx # Settings UI
β”‚   β”œβ”€β”€ hooks/                # Custom React hooks
β”‚   β”œβ”€β”€ types/                # TypeScript definitions
β”‚   └── App.tsx               # Main app component
β”œβ”€β”€ src-tauri/                # Rust backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ commands.rs       # Tauri IPC commands
β”‚   β”‚   β”œβ”€β”€ process/          # Service process management
β”‚   β”‚   β”œβ”€β”€ config/           # Configuration generation
β”‚   β”‚   β”œβ”€β”€ runtime/          # Binary download & locator
β”‚   β”‚   └── lib.rs            # Main library entry
β”‚   β”œβ”€β”€ runtime-config.json   # Runtime binary definitions
β”‚   └── tauri.conf.json       # Tauri app configuration
└── package.json              # Node.js dependencies

Architecture

Frontend (React + TypeScript)

  • Modern React 19 with TypeScript
  • Tailwind CSS for styling
  • Lucide React for icons
  • Tauri IPC for backend communication

Backend (Rust + Tauri)

  • Modular architecture with clear separation of concerns
  • Process management for service lifecycle
  • Configuration generation with Mustache templates
  • Runtime binary download and verification
  • Cross-platform path handling

βš™οΈ Configuration

User Data Directory

CHAMP stores all data in platform-specific user directories:

Windows:

%LOCALAPPDATA%\CHAMP\
β”œβ”€β”€ config\           # Generated service configs
β”œβ”€β”€ logs\             # Service logs
β”œβ”€β”€ mysql\data\       # MySQL database files
β”œβ”€β”€ projects\         # Your web projects
└── runtime\          # Downloaded binaries

macOS/Linux:

~/.campp/
β”œβ”€β”€ config/
β”œβ”€β”€ logs/
β”œβ”€β”€ mysql/data/
β”œβ”€β”€ projects/
└── runtime/

Runtime Configuration

Advanced users can customize binary versions and download URLs by editing:

  • runtime-config.json - Default configuration (bundled with app)
  • runtime-config.user.json - User overrides (optional)

See runtime-config.schema.json for the full configuration schema.

Settings

Accessible via the Settings panel in the app (or press Ctrl/Cmd + ,):

  • Ports: Customize service ports
  • Auto-Start: Enable/disable automatic service startup
  • Project Folder: Set default project directory
  • PHP Version: Switch between installed PHP versions
  • MySQL Version: Switch between installed MySQL versions
  • PostgreSQL Version: Switch between installed PostgreSQL versions
  • Additional Runtimes: Install and manage Node.js, Python, Go, and Ruby versions

πŸ› Troubleshooting

Services Won't Start

  1. Check if ports are already in use
  2. Review service logs in logs/ directory
  3. Verify runtime binaries are installed
  4. Try "Reset Installation" from Debug menu (dev mode)

Port Conflicts

  1. Open Settings panel
  2. Change conflicting ports
  3. Restart affected services

Reset Installation

In development mode:

  1. Open Debug menu
  2. Select "Reset Installation"
  3. Re-run First-Run Wizard

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

License Holder: Thirawat Sinlapasomsak


πŸ™ Acknowledgments

  • Original Project: CAMPP by KarnYong - The foundation and inspiration for this project
  • Tauri - Desktop app framework
  • Caddy - Modern web server
  • PHP - Server-side scripting
  • MySQL - Database server
  • phpMyAdmin - Database management
  • React - UI framework

πŸ“ž Support


Made with ❀️ by Thirawat27

About

CHAMP is a self-contained desktop application that provides a complete local web development environment.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors