Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 40 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,26 @@
<img src="img/zampp-logo.png" alt="ZAMPP Logo" width="230">
</p>

<h1 align="center">ZAMPP</h1>
<h1 align="center">ZAMPP for Windows</h1>
<p align="center">
<img alt="platform" src="https://img.shields.io/badge/platform-macOS-lightgrey">
<img alt="macos" src="https://img.shields.io/badge/macOS-Catalina%2010.15%2B-blue">
<img alt="platform" src="https://img.shields.io/badge/platform-Windows-blue">
<img alt="windows" src="https://img.shields.io/badge/Windows-10%20%2F%2011-0078D6">
</p>

<p align="center">Zero-config Apache MySQL PHP Platform</p>
<p align="center">Zero-config Apache MySQL PHP Platform (Windows Edition)</p>

ZAMPP is a Native Desktop application for macOS that serves as a Local Web Development Environment. It is designed to be a much lighter, faster, and fully *Zero-Configuration* alternative to MAMP/XAMPP.
ZAMPP for Windows adalah aplikasi desktop native yang berfungsi sebagai Lingkungan Pengembangan Web Lokal (*Local Web Development Environment*). Ini merupakan hasil porting khusus untuk sistem operasi Windows, dirancang agar jauh lebih ringan, cepat, dan sepenuhnya *Zero-Configuration* dibandingkan alternatif seperti XAMPP atau WampServer.

No more dealing with complex port setups or memory-heavy applications. Just one click, and your local server is up and running.
Konfigurasi port default telah disesuaikan secara khusus agar tidak bentrok (*conflict-free*) dan sangat bersahabat saat berjalan berdampingan dengan lingkungan WSL (Windows Subsystem for Linux), Docker, maupun service database lokal lainnya.

## Key Features
- **Zero-config:** Just click "Start" and start coding. No configuration file headaches.
- **Native macOS UI:** Built with Golang and Wails, delivering a clean, lightweight interface that blends perfectly with the macOS environment.
- **Modular Architecture:** The main installer is incredibly small! Additional PHP versions (7.4 - 8.5) can be downloaded directly from within the app only when you need them (*On-Demand Download*).
- **Multi PHP Version** ZAMPP can switch multi php Version
- **Fast Startup:** Nginx/Apache, MySQL, and PHP engines run independently in the background at maximum speed.
- **Terminal Smart** Auto switch php and composer direct to terminal

---

## Installation Guide

1. Visit the [**Releases**](https://github.com/semutdev/zampp/releases/latest) page.
2. Download For Mac the [**ZAMPP-macOS.dmg**](https://github.com/semutdev/zampp/releases/download/v1.0.0/ZAMPP-macOS.dmg) file (Do not download the engine zip files manually).
3. Open the downloaded `.dmg` file and drag **`ZAMPP.app`** into your `Applications` folder.
4. Launch the ZAMPP app. *(On the first run, the app will automatically download the base server engines in the background).*

> **⚠️ Note for Mac Users:**
> Since this application does not yet have an Apple Developer certificate (Unsigned), macOS Gatekeeper might block it on the first launch.
> **Solution:** Right-click (or Control-click) on the ZAMPP app in your Applications folder -> Select **Open** -> Click **Open** again on the warning prompt.
- **Zero-config:** Cukup klik "Start" dan mulai coding tanpa perlu repot konfigurasi file manual.
- **Native Windows Integration:** Dibangun dengan Golang dan Wails, menggunakan native Windows process management, File Explorer, dan PowerShell terminal session.
- **WSL & Docker Friendly Ports:** Konfigurasi port default diatur pada range port 9000 & 3309 agar terhindar dari konflik port standar (seperti port 80, 8080, 8000, 3306).
- **Modular Architecture:** Installer utama berukuran sangat ringkas. Versi PHP tambahan (7.4 - 8.5) dapat diunduh langsung dari aplikasi sesuai kebutuhan (*On-Demand Download*).
- **Multi PHP Version:** Mendukung perpindahan versi PHP secara instan.
- **Fast Startup:** Engine Nginx/Apache, MySQL, dan PHP berjalan independen di background dengan performa maksimal.
- **Smart PowerShell Terminal:** Membuka sesi PowerShell baru dengan `$env:Path` PHP aktif dan alias fungsi `composer` yang langsung siap digunakan di direktori `htdocs`.

---

Expand All @@ -47,65 +35,65 @@ No more dealing with complex port setups or memory-heavy applications. Just one

## Directory Structure (htdocs)

All your website project files (HTML/PHP/WordPress) should be placed inside the *Document Root* folder. You can open this directory directly by clicking the **"📁 Open htdocs"** button in the ZAMPP app, or access it manually at:
Semua file proyek website (HTML/PHP/WordPress) diletakkan di dalam folder *Document Root*. Anda dapat membuka direktori ini secara langsung dengan mengklik tombol **"📁 Open htdocs"** di aplikasi ZAMPP, atau mengaksesnya di:

```
~/.zampp/
├── bin/ binaries (php, mysql, nginx, apache)
├── conf/ generated configs (nginx.conf, httpd.conf)
├── data/mysql/ MySQL data + socket
├── logs/ per-engine logs
└── htdocs/ document root
C:\Users\<username>\.zampp\
├── bin\ binaries (php, mysql, nginx, apache)
├── conf\ generated configs (nginx.conf, httpd.conf)
├── data\mysql\ MySQL data + socket
├── logs\ per-engine logs
└── htdocs\ document root
```

---

## Ports & Defaults

| Service | Port | Notes |
|----------------|------|--------------------------------------------|
| Web Server | 8000 | Nginx or Apache (user-selectable) |
| MySQL | 3307 | Avoids clashing with XAMPP's 3306 |
| PHP (internal) | 8001 | Proxied through the chosen web server |

Zero manual configuration — config is regenerated on each start.
| Service | Port | Deskripsi |
| :--- | :--- | :--- |
| **Web Server** | `9000` | Nginx atau Apache (dapat dipilih via dropdown) |
| **PHP FastCGI (internal)** | `9001` | Diproyeksikan melalui Web Server aktif |
| **MySQL Database** | `3309` | Menghindari bentrok dengan default MySQL (3306) & WSL/Docker |

---

## First-Run Engine Bundle & Modular PHP

On first launch, ZAMPP downloads the base engine bundle (which ships **PHP 7.4**) from GitHub Releases and extracts it into `~/.zampp`:
Saat pertama kali dijalankan, ZAMPP akan mengunduh bundel engine dasar untuk Windows dari GitHub Releases dan mengekstraknya ke direktori `%USERPROFILE%\.zampp`:

```
https://github.com/semutdev/zampp/releases/download/v1.0.0/zampp-mac-x64-v1.zip
https://github.com/semutdev/zampp/releases/download/v1.0.0/zampp-win-x64-v1.zip
```

Additional PHP versions (7.4 - 8.5) are **modular** — downloaded on-demand directly from the app when you select a version that isn't installed yet:
Versi PHP tambahan bersifat modular dan diunduh on-demand saat versi dipilih:

```
https://github.com/semutdev/zampp/releases/download/v1.0.0/php-{version}.zip
https://github.com/semutdev/zampp/releases/download/v1.0.0/php-{version}-win.zip
```

Progress for both flows is reported to the frontend via events emitted from Go:

- `download-progress` / `php-download-progress` — payload `0`–`100`
- `download-complete` / `php-download-complete` — emitted after extraction and cleanup
Progress pengunduhan dilaporkan ke frontend secara real-time melalui event:
- `download-progress` / `php-download-progress` (0–100%)
- `download-complete` / `php-download-complete`

---

## Live Development

To run in live development mode, run `wails dev` in the project directory. This will run a Vite development server that will provide very fast hot reload of your frontend changes. If you want to develop in a browser and have access to your Go methods, there is also a dev server that runs on http://localhost:34115. Connect to this in your browser, and you can call your Go code from devtools.
Untuk menjalankan aplikasi dalam mode live development:

## Building
```bash
wails dev
```

To build a redistributable, production mode package, use `wails build`.
Untuk melakukan build installer aplikasi produksi:

You can configure the project by editing `wails.json`. More information about the project settings can be found here: https://wails.io/docs/reference/project-config
```bash
wails build
```

---

<p align="center">
Built with ❤️ by <a href="https://semut.dev">semut.dev</a>
</p>

2 changes: 2 additions & 0 deletions app.go → app_darwin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build darwin

package main

import (
Expand Down
Loading