Get running in ~5 minutes

Setup Guide

Everything you need to install, configure, and deploy TableFlow — from a fresh clone to a live production site on shared hosting.

Overview

TableFlow is a standard Laravel 12 application — there's no custom installer, no build pipeline, and no external services required to get it running beyond a MySQL database. All admin-panel styling (Bootstrap 5, Select2, DataTables, SweetAlert2, Chart.js) loads from CDN, so a plain composer install is all the setup you need on the PHP side.

AI features are optional. You can complete this entire guide and run the full system without an Anthropic API key — you'll just see AI buttons return a friendly "unavailable" message until you add one.

Requirements

1Install Dependencies

From the project root, install all PHP packages with Composer:

composer install --optimize-autoloader

This pulls in Laravel 12, Sanctum (API auth), DomPDF (invoices), Simple QRCode, Maatwebsite Excel (exports), and Intervention Image (image resizing).

2Environment Setup

Copy the example environment file and generate your application key:

cp .env.example .env
php artisan key:generate

Open .env and fill in your database credentials:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=restaurant_management
DB_USERNAME=root
DB_PASSWORD=your_password_here

Set your site URL — this is used to build QR codes, invoice links, and API image URLs:

APP_URL=https://yourdomain.com

3Database & Seeding

Run the migrations and seed demo data in one command:

php artisan migrate --seed

This creates every table and seeds:

Change the seeded passwords immediately after your first login on any environment other than local development.

4Enable AI Features

To turn on the six AI features (menu writer, forecasting, chatbot, upsells, demand prediction, review sentiment), add your Anthropic API key to .env:

ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxx
ANTHROPIC_MODEL=claude-sonnet-4-6

Then log in as an admin and visit Settings → AI Features to confirm the master switch and each individual feature are turned on to your liking.

5Run Locally

php artisan serve

Visit http://localhost:8000/login and sign in with one of the seeded accounts above. That's it — menu, orders, kitchen display, tables, and reports are all live with sample data.

6Deploy to Shared Hosting

TableFlow follows a standard shared-hosting-friendly Laravel structure — uploads go straight to public/uploads/, so no symlinks are needed.

  1. Upload the whole project to a folder outside your public web root if your host allows it (e.g. ~/app/tableflow), then point your domain or subdomain's document root at its public/ folder.
  2. If your host only offers a public_html structure, upload the project into a subfolder and copy the contents of public/ into public_html/ — then edit the two require paths at the top of public_html/index.php to point at your actual bootstrap/app.php and vendor/autoload.php locations.
  3. Run composer install --optimize-autoloader --no-dev on the server via SSH (or upload a pre-built vendor/ folder if Composer isn't available).
  4. Set up .env with your production database credentials and live APP_URL.
  5. Run php artisan migrate --seed once, on first deploy only.
  6. Make sure storage/ and public/uploads/ are writable: chmod -R 775 storage public/uploads.
  7. Set APP_ENV=production and APP_DEBUG=false before going live.

7Post-Deploy Checklist

Troubleshooting

QR codes aren't generating

Confirm the GD or Imagick PHP extension is enabled — simplesoftwareio/simple-qrcode needs one of them. QR generation fails silently and the table still saves, so check your PHP error log if codes are blank.

AI buttons say "unavailable"

This means either the master AI switch is off (Admin → Settings → AI Features), the specific feature's toggle is off, or ANTHROPIC_API_KEY is missing from .env. Check the warning banner on the AI Features settings page — it tells you exactly which one.

Uploaded images return 404

Confirm public/uploads/ exists and is writable. Unlike a typical Laravel app, this project stores uploads directly under the public folder (no storage:link needed) — if the folder was excluded during deployment, recreate it.

500 error immediately after deploy

Almost always a missing APP_KEY or unwritable storage/ folder. Run php artisan key:generate and re-check folder permissions.

Need the deeper reference — database schema, API endpoints, and customization? Head to the full Documentation →