Fix dependencies: Add flag-icons, tailwind directives, and postcss config

This commit is contained in:
MivoDev
2026-01-18 11:16:21 +07:00
commit 266a4b1296
10758 changed files with 1547435 additions and 0 deletions

View File

@@ -0,0 +1,104 @@
# Deploy on aaPanel (Docker)
aaPanel makes it easiest to manage Docker projects using its native **Docker Manager** module. We recommend following the standard "Quick Install" pattern which uses environment variables for better maintainability.
::: tip PREREQUISITES
Ensure you have the **Docker** module installed from the aaPanel App Store.
:::
## 1. Prepare Configuration
We use a "Native aaPanel Style" setup where configuration is separated from the template.
**Environment File (`.env`)**
Create a new file named `.env` and configure your preferences:
```ini
VERSION=latest
CONTAINER_NAME=mivo
HOST_IP=0.0.0.0
APP_PORT=8085
APP_PATH=/www/dk_project/mivo
APP_ENV=production
APP_DEBUG=false
TZ=Asia/Jakarta
CPUS=1.0
MEMORY_LIMIT=512M
```
**Attribute Explanation:**
- `APP_PATH`: **Crucial**. This must match your project directory in aaPanel (default is `/www/dk_project/<project_name>`).
- `APP_PORT`: The port you want to expose (default `8080`).
- `TZ`: Your timezone (e.g., `Asia/Jakarta`).
## 2. Create Project in aaPanel
1. Login to your aaPanel dashboard.
2. Navigate to **Docker** > **Project**.
3. Click **Add Project**.
4. Fill in the details:
- **Name**: `mivo` (or your preferred name)
- **Path**: This will auto-fill (usually `/www/dk_project/mivo`). **Update `APP_PATH` in your .env to match this!**
- **Compose Template**: Paste the following YAML content:
```yaml
version: '3.8'
services:
mivo:
image: ghcr.io/mivodev/mivo:${VERSION:-latest}
container_name: ${CONTAINER_NAME:-mivo}
restart: unless-stopped
ports:
- "${HOST_IP:-0.0.0.0}:${APP_PORT:-8085}:80"
volumes:
# Database & Sessions
- ${APP_PATH:-.}/mivo_data:/var/www/html/app/Database
# Custom Logos
- ${APP_PATH:-.}/mivo_logos:/var/www/html/public/assets/img/logos
# Environment file (Optional - mapped from host)
# - ${APP_PATH:-.}/.env:/var/www/html/.env
environment:
- APP_ENV=${APP_ENV:-production}
- APP_DEBUG=${APP_DEBUG:-false}
- TZ=${TZ:-Asia/Jakarta}
deploy:
resources:
limits:
cpus: '${CPUS:-1.0}'
memory: ${MEMORY_LIMIT:-512M}
networks:
- mivo_net
networks:
mivo_net:
driver: bridge
```
5. **Wait!** Before clicking "Confirm" or "Add":
- Look for the **.env** config section (usually a tab or sidebar in the Add Project modal).
- Paste your `.env` content there.
6. Click **Confirm** to deploy.
## 3. Verify Deployment
aaPanel will pull the image and start the container. Once running:
- **Database Location**: Your data is safe at `/www/dk_project/mivo/mivo_data`.
- **Logos Location**: Upload custom logos to `/www/dk_project/mivo/mivo_logos`.
## 4. Setup Domain (Reverse Proxy)
To access MIVO via a domain (e.g., `mivo.yourdomain.com`):
1. Go to **Website** > **Add Site**.
2. Enter your domain name.
3. For **PHP Version**, select **Reverse Proxy** (or create as Static and set up proxy later).
4. After creation, open the site settings > **Reverse Proxy** > **Add Reverse Proxy**.
5. **Target URL**: `http://127.0.0.1:8085` (Replace `8085` with your `APP_PORT`).
6. Save and secure with SSL.

78
docs/guide/docker.md Normal file
View File

@@ -0,0 +1,78 @@
---
title: Docker Guide
---
# Docker Guide
This Docker image is built on **Alpine Linux** and **Nginx**, optimized for high performance and low resource usage.
## <Icon name="Zap" color="warning" /> Quick Start
Run MIVO in a single command:
```bash
docker run -d \
--name mivo \
-p 8080:80 \
-e APP_KEY=base64:YOUR_GENERATED_KEY \
-e APP_ENV=production \
-v mivo_data:/var/www/html/app/Database \
-v mivo_config:/var/www/html/.env \
ghcr.io/mivodev/mivo:latest
```
Open your browser and navigate to `http://localhost:8080`.
**Initial Setup:**
If this is your first run, you will be redirected to the **Web Installer**. Follow the on-screen instructions to create the database and admin account.
## <Icon name="Wrench" color="primary" /> Docker Compose
For a more permanent setup, use `docker-compose.yml`:
```yaml
services:
mivo:
image: ghcr.io/mivodev/mivo:latest
container_name: mivo
restart: unless-stopped
ports:
- "8080:80"
environment:
- APP_ENV=production
- TZ=Asia/Jakarta
volumes:
- ./mivo-data:/var/www/html/app/Database
```
## <Icon name="Tags" color="info" /> Tags
- `latest`: Stable release (recommended).
- `edge`: Bleeding edge build from the `main` branch.
- `v1.x.x`: Specific released versions.
## <Icon name="Sliders" color="success" /> Environment Variables
| Variable | Description | Default |
| :--- | :--- | :--- |
| `APP_ENV` | Application environment (`production` or `local`). | `production` |
| `APP_DEBUG` | Enable debug mode (`true` or `false`). | `false` |
| `APP_KEY` | 32-character random string (base64). Auto-generated on first install if not provided. | |
| `TZ` | Timezone for the container. | `UTC` |
## <Icon name="Folder" color="primary" /> Volumes
Persist your data by mounting these paths:
- `/var/www/html/app/Database`: Stores the SQLite database and session files. **(Critical)**
- `/var/www/html/public/assets/img/logos`: Stores uploaded custom logos.
## <Icon name="Heart" color="danger" /> Support the Project
If you find MIVO useful, please consider supporting its development. Your contribution helps keep the project alive!
[![SociaBuzz Tribe](https://img.shields.io/badge/SociaBuzz-Tribe-green?style=for-the-badge&logo=sociabuzz&logoColor=white)](https://sociabuzz.com/dyzulkdev/tribe)
---
*Created with <Icon name="Heart" color="danger" /> by MivoDev*

23
docs/guide/index.md Normal file
View File

@@ -0,0 +1,23 @@
---
title: Introduction
---
# Introduction
Welcome to the MIVO Guide. This section will help you understand what MIVO is and how to get it running on your system.
## <Icon name="Zap" color="warning" /> What is MIVO?
MIVO is a modern, lightweight Mikrotik Voucher Management system. It is designed to be efficient, fast, and user-friendly, providing a seamless experience for Hotspot management.
## <Icon name="BookOpen" color="primary" /> Navigation
Explore the following sections to get started:
- **[Installation Guide](/guide/installation)**: Learn how to install MIVO on various platforms.
- **[Docker Guide](/guide/docker)**: The recommended way to run MIVO using containers.
- **[Manual](/manual/)**: Detailed instructions on how to use MIVO features.
## <Icon name="Heart" color="danger" /> Support
MIVO is an open-source project. If you find it useful, please consider supporting the development through [donations](https://sociabuzz.com/dyzulkdev/tribe) or [contributing](https://github.com/dyzulk/mivo) to the codebase.

137
docs/guide/installation.md Normal file
View File

@@ -0,0 +1,137 @@
---
title: Installation Guide
---
# Installation Guide
This guide covers installation on various platforms. MIVO is designed to be lightweight and runs on almost any PHP-capable server.
## <Icon name="ClipboardList" color="primary" /> General Requirements {#requirements}
* **PHP**: 8.0 or higher
* **Extensions**: `sqlite3`, `openssl`, `mbstring`, `json`
* **Database**: SQLite (File based, no server needed)
---
## <Icon name="Container" color="info" /> Docker (Recommended)
The easiest way to run MIVO.
1. **Build & Run**
```bash
docker-compose up -d --build
```
Go to `http://localhost:8080`
2. **Manual Pull (Alternative)**
If you prefer to pull the image manually:
```bash
docker pull ghcr.io/mivodev/mivo:latest # Stable
docker pull ghcr.io/mivodev/mivo:v1.0.0 # Specific Version
docker pull ghcr.io/mivodev/mivo:edge # Bleeding Edge
```
*Note: The database is persisted in `app/Database` via volumes.*
---
## <Icon name="Server" color="success" /> Web Servers {#web-servers}
### Apache / OpenLiteSpeed
1. **Document Root**: Set your web server's document root to the `public/` folder.
2. **Rewrite Rules**: Ensure `mod_rewrite` is enabled. MIVO includes a `.htaccess` file in `public/` that handles URL routing automatically.
3. **Permissions**: Ensure the web server user (e.g., `www-data`) has **write** access to:
* `app/Database/` (directory and file)
* `app/Config/` (if using installer)
* `.env` file
### Nginx
Nginx does not read `.htaccess`. Use this configuration block in your `server` block:
```nginx
server {
listen 80;
server_name your-domain.com;
root /path/to/mivo/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.2-fpm.sock; # Adjust version
}
location ~ /\.ht {
deny all;
}
}
```
### IIS (Windows)
1. **Document Root**: Point the site to the `public/` folder.
2. **Web Config**: A `web.config` file has been provided in `public/` to handle URL Rewriting.
3. **Requirements**: Ensure **URL Rewrite Module 2.0** is installed on IIS.
---
## <Icon name="Smartphone" color="warning" /> Mobile / STB {#mobile-stb}
### Awebserver
1. Copy the MIVO files to `/htdocs`.
2. Point the document root to `public` if supported, or access via `http://localhost:8080/public`.
3. Ensure PHP version is compatible.
### Termux
1. Install PHP: `pkg install php`
2. Navigate to MIVO directory: `cd mivo`
3. Use the built-in server:
```bash
php mivo serve --host=0.0.0.0 --port=8080
```
4. Access via browser.
---
## <Icon name="Globe" color="info" /> Shared Hosting {#shared-hosting}
Most shared hosting uses Apache or OpenLiteSpeed, which is fully compatible.
1. **Upload Files**: Upload the MIVO files to `public_html/mivo` (or a subdomain folder).
2. **Point Domain**:
* **Recommended**: Go to "Domains" or "Subdomains" in cPanel and set the **Document Root** to point strictly to the `public/` folder (e.g., `public_html/mivo/public`).
* **Alternative**: If you cannot change Document Root, you can move contents of `public/` to the root `public_html` and move `app/`, `routes/`, etc. one level up (not recommended for security).
3. **PHP Version**: Select PHP 8.0+ in "Select PHP Version" menu.
4. **Extensions**: Ensure `sqlite3` and `fileinfo` are checked.
---
## <Icon name="Cloud" color="primary" /> VPS & Cloud {#vps-cloud}
### aaPanel
1. **Create Website**: Add site -> PHP-8.x.
2. **Site Directory**:
* Set **Running Directory** (bukan Site Directory) to `/public`.
* Uncheck "Anti-XSS" (sometimes blocks config saving).
3. **URL Rewrite**: Select `thinkphp` or `laravel` template (compatible) OR just use the Nginx config provided above.
4. **Permissions**: Chown `www` user to the site directory.
### PaaS Cloud (Railway / Render / Heroku)
> [!WARNING]
> MIVO uses SQLite (File Database). Most PaaS cloud have **Ephemeral Filesytem** (Reset on restart).
* **Requirement**: You MUST mount a **Persistent Volume/Disk**.
* **Mount Path**: Mount your volume to `/var/www/html/app/Database` (or wherever you put MIVO).
* **Docker**: Use the Docker deployment method, it works natively on these platforms.
---
## <Icon name="Settings" color="success" /> Post-Installation {#post-installation}
After setting up the server:
1. Copy `.env.example` to `.env` (if not already done).
2. **Install Application**
* **Option A: CLI**
Run `php mivo install` in your terminal.
* **Option B: Web Installer**
Open `http://your-domain.com/install` in your browser.