Files
bentopdf/SIMPLE_MODE.md

245 lines
5.7 KiB
Markdown
Raw Normal View History

# Simple Mode for BentoPDF
Simple Mode is designed for internal organizational use where you want to hide all branding and marketing content, showing only the essential PDF tools for your users.
## What Simple Mode Does
When enabled, Simple Mode will:
- Hide the navigation bar
- Hide the hero section with marketing content
- Hide the features section
- Hide the security/compliance section
- Hide the FAQ section
- Hide the testimonials section
- Hide the support section
- Hide the footer
- Update the page title to "PDF Tools"
- Make the tools section more prominent
## How to Enable Simple Mode
2025-10-20 18:19:29 -07:00
### Method 1: Using Pre-built Simple Mode Image (Recommended)
2025-10-20 18:19:29 -07:00
Use the pre-built Simple Mode image directly:
2026-03-09 17:02:30 +01:00
**Using GitHub Container Registry (Recommended):**
```bash
2026-03-09 17:02:30 +01:00
# Docker
docker run -p 3000:8080 ghcr.io/alam00000/bentopdf-simple:latest
# Podman
podman run -p 3000:8080 ghcr.io/alam00000/bentopdf-simple:latest
```
2026-03-09 17:02:30 +01:00
**Using Docker Hub:**
2025-10-27 00:31:18 -07:00
```bash
2026-03-09 17:02:30 +01:00
# Docker
docker run -p 3000:8080 bentopdfteam/bentopdf-simple:latest
# Podman
podman run -p 3000:8080 docker.io/bentopdfteam/bentopdf-simple:latest
2025-10-27 00:31:18 -07:00
```
2026-03-09 17:02:30 +01:00
Or with Docker Compose / Podman Compose:
2025-10-20 18:19:29 -07:00
```yaml
services:
bentopdf:
2026-03-09 17:02:30 +01:00
# Using GitHub Container Registry (Recommended)
image: ghcr.io/alam00000/bentopdf-simple:latest
# Or using Docker Hub
# image: bentopdfteam/bentopdf-simple:latest
2025-10-20 18:19:29 -07:00
container_name: bentopdf
restart: unless-stopped
ports:
2025-10-29 16:37:31 +05:30
- '3000:8080'
2025-10-20 18:19:29 -07:00
```
### Method 2: Using Docker Compose with Build
Build the image locally with Simple Mode enabled:
```bash
2025-10-20 18:19:29 -07:00
docker compose -f docker-compose.dev.yml build --build-arg SIMPLE_MODE=true
docker compose -f docker-compose.dev.yml up -d
```
2025-10-20 18:19:29 -07:00
### Method 3: Using Docker Build
2025-10-20 18:19:29 -07:00
Build the image with the SIMPLE_MODE build argument:
```bash
docker build --build-arg SIMPLE_MODE=true -t bentopdf-simple .
2025-10-29 16:37:31 +05:30
docker run -p 3000:8080 bentopdf-simple
```
### Method 4: Using npm Script (Easiest for Local Development)
Use the built-in npm script that handles everything:
```bash
npm run serve:simple
```
This command automatically:
- Sets `SIMPLE_MODE=true`
- Builds the project with Simple Mode enabled
- Serves the built files on `http://localhost:3000`
### Method 5: Using Environment Variables
Set the environment variable before building:
```bash
export SIMPLE_MODE=true
npm run build
2025-10-20 18:19:29 -07:00
npx serve dist -p 3000
```
## 🧪 Testing Simple Mode Locally
### Method 1: Using npm Script (Easiest for Development)
```bash
npm run serve:simple
```
This automatically builds and serves Simple Mode on `http://localhost:3000`.
### Method 2: Using Pre-built Image (Easiest for Production)
2025-10-20 18:19:29 -07:00
```bash
2026-03-09 17:02:30 +01:00
# Docker - Pull and run the Simple Mode image
docker pull ghcr.io/alam00000/bentopdf-simple:latest
docker run -p 3000:8080 ghcr.io/alam00000/bentopdf-simple:latest
# Podman
podman pull ghcr.io/alam00000/bentopdf-simple:latest
podman run -p 3000:8080 ghcr.io/alam00000/bentopdf-simple:latest
2025-10-20 18:19:29 -07:00
```
Open `http://localhost:3000` in your browser.
### Method 3: Build and Test Locally
```bash
# Build with simple mode
SIMPLE_MODE=true npm run build
# Serve the built files
npx serve dist -p 3000
```
2025-10-20 18:19:29 -07:00
Open `http://localhost:3000` in your browser.
### Method 4: Compare Both Modes
2025-10-20 18:19:29 -07:00
```bash
2026-03-09 17:02:30 +01:00
# Test Normal Mode (Docker)
docker run -p 3000:8080 ghcr.io/alam00000/bentopdf:latest
2025-10-20 18:19:29 -07:00
2026-03-09 17:02:30 +01:00
# Test Simple Mode (Docker)
docker run -p 3001:8080 ghcr.io/alam00000/bentopdf-simple:latest
# Podman users: replace 'docker' with 'podman'
2025-10-20 18:19:29 -07:00
```
- Normal Mode: `http://localhost:3000`
- Simple Mode: `http://localhost:3001`
## 🔍 What to Look For
When Simple Mode is working correctly, you should see:
- ✅ Clean "PDF Tools" header (no marketing hero section)
- ✅ "Select a tool to get started" subtitle
- ✅ Search bar for tools
- ✅ All PDF tool cards organized by category
- ❌ No navigation bar
- ❌ No hero section with "The PDF Toolkit built for privacy"
- ❌ No features, FAQ, testimonials, or footer sections
2026-03-09 17:02:30 +01:00
## 📦 Available Container Images
2025-10-20 18:19:29 -07:00
### Normal Mode (Full Branding)
2026-03-09 17:02:30 +01:00
**GitHub Container Registry (Recommended):**
2025-10-27 00:31:18 -07:00
- `ghcr.io/alam00000/bentopdf:latest`
- `ghcr.io/alam00000/bentopdf:v1.0.0` (versioned)
**Docker Hub:**
2026-03-09 17:02:30 +01:00
- `bentopdfteam/bentopdf:latest`
- `bentopdfteam/bentopdf:v1.0.0` (versioned)
### Simple Mode (Clean Interface)
2025-10-20 18:19:29 -07:00
2026-03-09 17:02:30 +01:00
**GitHub Container Registry (Recommended):**
2025-10-27 00:31:18 -07:00
- `ghcr.io/alam00000/bentopdf-simple:latest`
- `ghcr.io/alam00000/bentopdf-simple:v1.0.0` (versioned)
2026-03-09 17:02:30 +01:00
**Docker Hub:**
- `bentopdfteam/bentopdf-simple:latest`
- `bentopdfteam/bentopdf-simple:v1.0.0` (versioned)
2025-10-20 18:19:29 -07:00
## 🚀 Production Deployment Examples
2026-03-09 17:02:30 +01:00
### Docker Compose / Podman Compose
```yaml
services:
bentopdf:
2026-03-09 17:02:30 +01:00
image: ghcr.io/alam00000/bentopdf-simple:latest # Recommended
# image: bentopdfteam/bentopdf-simple:latest # Alternative: Docker Hub
container_name: bentopdf
restart: unless-stopped
ports:
2026-03-09 17:02:30 +01:00
- '80:8080'
environment:
2025-10-20 18:19:29 -07:00
- PUID=1000
- PGID=1000
```
2025-10-20 18:19:29 -07:00
2026-03-09 17:02:30 +01:00
### Podman Quadlet (Linux Systemd)
Create `~/.config/containers/systemd/bentopdf-simple.container`:
```ini
[Unit]
Description=BentoPDF Simple Mode
After=network-online.target
[Container]
Image=ghcr.io/alam00000/bentopdf-simple:latest
ContainerName=bentopdf-simple
PublishPort=80:8080
AutoUpdate=registry
[Service]
Restart=always
[Install]
WantedBy=default.target
```
Enable and start:
```bash
systemctl --user daemon-reload
systemctl --user enable --now bentopdf-simple
```
2025-10-20 18:19:29 -07:00
## ⚠️ Important Notes
2026-03-09 17:02:30 +01:00
- **Pre-built images**: Use `ghcr.io/alam00000/bentopdf-simple:latest` for Simple Mode (recommended)
2025-10-20 18:19:29 -07:00
- **Environment variables**: `SIMPLE_MODE=true` only works during build, not runtime
- **Build-time optimization**: Simple Mode uses dead code elimination for smaller bundles
- **Same functionality**: All PDF tools work identically in both modes