# StackLab v1

A modular post-install development lab builder for Ubuntu MATE / Ubuntu 24.04 style systems.

## What it does

- Splits install logic into modules
- Enforces sane install order
- Supports profiles
- Supports dry-run mode
- Provides a simple Python Tkinter GUI to generate and launch the installer

## Profiles

- `minimal` — core tools only
- `dev` — core + PHP + Apache/SQLite + MySQL/phpMyAdmin
- `full` — core + networking + PHP + web/db + privacy + media
- `network` — core + networking
- `web` — core + PHP + Apache/SQLite + MySQL/phpMyAdmin
- `privacy` — core + privacy stack

## Important notes

- The GUI defaults to **dry-run ON**
- The GUI generates a shell command and can save a launch script
- Review generated commands before running on a fresh machine
- phpMyAdmin remains interactive by design
- Current PHP target is **8.5** from the Ondřej Surý PPA

## Quick start

### CLI
```bash
chmod +x stacklab.sh modules/*.sh
./stacklab.sh --dry-run --profile dev
sudo ./stacklab.sh --profile dev
```

### GUI
```bash
python3 StackLab.py
```

## Typical fresh-install order

The installer enforces this order when relevant:

1. core
2. networking
3. php_stack
4. web_stack
5. mysql_phpmyadmin
6. privacy
7. media

## Files

- `stacklab.sh` — main orchestrator
- `StackLab.py` — Tkinter GUI
- `modules/*.sh` — install modules
- `generated/` — GUI output directory for generated scripts

## Theme of the project

Built to avoid:
- version roulette
- package order chaos
- phpMyAdmin before MySQL/PHP readiness
- giant all-or-nothing bash blobs


---

## ⚙️ StackLab v1.0 — Install Inventory (Hardcoded)

### 🧱 Core Module
build-essential, curl, wget, ftp, neofetch, finger, whois, traceroute, net-tools,
iputils-ping, ca-certificates, software-properties-common, usbutils, pciutils,
libpcap-dev, nodejs, npm, python3, python3-pip, python3-venv, golang

### 🌐 Networking Module
nmap, tcpdump, wireshark, netcat, dnsutils

### 🧬 PHP Stack
php8.5, php8.5-cli, php8.5-curl, php8.5-mbstring, php8.5-xml, php8.5-zip,
php8.5-mysql, libapache2-mod-php8.5

### 🌍 Web Stack
apache2, sqlite3, libsqlite3-dev, sqlitebrowser

### 🗄️ Database Stack
mysql-server, php-mysql, phpmyadmin

### 🕶️ Privacy
tor, torsocks

### 🎨 Media
ffmpeg, imagemagick, gimp

### 🧠 System Actions
apt update  
apt upgrade -y  
add-apt-repository ppa:ondrej/php  
phpenmod mysqli pdo_mysql mbstring  
systemctl enable apache2  
systemctl start apache2  
systemctl enable mysql  
systemctl start mysql  

### 🧪 Runtime Behavior
- Dry-run supported (--dry-run)
- Launcher generated in /generated/run-stacklab.sh
- Requires sudo
- Module order enforced
- phpMyAdmin remains interactive

---

## 🧾 Summary

StackLab installs a modular development environment including:

• Core system utilities and compilers  
• Networking and diagnostic tools  
• PHP 8.5 via Ondřej Surý PPA  
• Apache + SQLite  
• MySQL + phpMyAdmin  
• Optional privacy tooling  
• Optional media utilities  

