Documentation & Wiki

Everything you need to install, configure, and run Menu Factory.

🚀 1. Installation

You can install Menu Factory in two ways: using our pre-built Docker image (recommended) or by building it from source.

Option A: Installation via Docker Hub (Recommended)

This is the fastest way to get Menu Factory running on your server. You can find our official image on Docker Hub.

1. Create a .env file in your project directory to configure the database and security keys:

PORT=3000
DB_HOST=db
DB_NAME=menufactory_db
DB_USER=menufactory
DB_PASSWORD=menufactory

MARIADB_ROOT_PASSWORD=root
MARIADB_DATABASE=menufactory_db
MARIADB_USER=menufactory
MARIADB_PASSWORD=menufactory

# Generate a secure random string for JWT_SECRET
# Example: run 'openssl rand -hex 32' in your terminal
JWT_SECRET=your_super_secret_key_here

2. Create the database initialization file named init.sql next to your .env file:

CREATE DATABASE IF NOT EXISTS menufactory_db;
USE menufactory_db;

CREATE TABLE IF NOT EXISTS users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(50) NOT NULL UNIQUE,
    password_hash VARCHAR(255) NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS restaurant_info (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL DEFAULT 'Menu Factory',
    description TEXT,
    logo_url VARCHAR(255) DEFAULT '',
    theme_color VARCHAR(10) DEFAULT '#E05D36',
    currency VARCHAR(10) DEFAULT '€',
    phone VARCHAR(20) DEFAULT '',
    address VARCHAR(255) DEFAULT ''
);

CREATE TABLE IF NOT EXISTS items (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    description TEXT,
    price DECIMAL(10, 2) NOT NULL,
    category VARCHAR(50) NOT NULL,
    image_url VARCHAR(255) DEFAULT '',
    is_veg BOOLEAN DEFAULT FALSE
);

INSERT INTO users (username, password_hash) VALUES ('menufactory', '$argon2id$v=19$m=65536,t=2,p=1$vyjet36a58wxw0aqcdkQ/bUmSn9EuJDi9tGwScSEUdE$2tcCj4jUaq/MRWTIWsF4QgfPfNn2zfScIXnUQhqkhDs');

3. Create a docker-compose.yml file in the same directory:

services:
  app:
    image: g0lddark/menufactory:latest
    container_name: menufactory_app
    env_file:
      - .env
    ports:
      - "${PORT:-3000}:3000"
    depends_on:
      - db
    restart: unless-stopped

  db:
    image: mariadb:10.11
    container_name: menufactory_db
    env_file:
      - .env
    volumes:
      - mariadb_data:/var/lib/mysql
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql
    restart: unless-stopped

volumes:
  mariadb_data:

4. Start the application:

docker compose up -d

That's it! The app is now running on http://localhost:3000.


Option B: Installation from Source

If you want to modify the code or contribute to the project, install it from source. You will need Bun and Git installed on your system.

# Clone the repository
git clone https://github.com/YOUR_GITHUB_NAME/menufactory.git
cd menufactory

# Create your .env file
cp .env.example .env

# Install dependencies
bun install

# Run the development server
bun run dev

🛠️ 2. Usage & Configuration

Once the server is running, Menu Factory is split into two main areas.

The Admin Panel

To manage your restaurant, go to http://localhost:3000/admin.

Default Credentials:
Username: menufactory
Password: menufactory
⚠️ Please change these credentials immediately in the "Account" section!

The Public Menu

Simply visit the root URL (e.g., http://localhost:3000/). This is the mobile-first interface your customers will see when they scan your QR code. It automatically updates when you make changes in the admin panel.