Introduction
Foodlay is a modern single-vendor restaurant management system built on top of the DayOneFood stack, combining a robust Laravel 12 backend with a dynamic Vue 3 frontend via Inertia.js.
- Backend: Laravel 12
- Frontend: Vue 3 (Composition API) with Inertia.js
- Styling: Tailwind CSS 4
- Build tool: Vite 7
- Database: MySQL 8+/MariaDB 10.5+
System Architecture
- Monolithic Laravel application with two decoupled frontend modules:
- Admin Panel: dashboard for managing orders, items, users, and settings
- Storefront: customer-facing web app for browsing menus and placing orders
Folder Structure
/app
/Http
/Controllers
/Api (REST API V1)
/Payment (Gateways: Stripe, PayPal, etc.)
/Web (Inertia controllers: Admin, StoreFront)
/Middleware
/Requests
/Resources
/config
/database
/public (POINT DOMAIN HERE)
/resources
/js
/AdminPanel (Admin Vue app)
/StoreFront (Customer Vue app)
/components (Shared UI)
/lib (Utilities)
/css (Tailwind entries)
/views (Blade entry points)
/routes
/api (Versioned API routes)
/web (Admin, Storefront, Installer)
/storage
.env
System Features
Dashboard & Analytics
- Real-time overview of orders, revenue, and active users
- Reports: sales & revenue, category & item performance, user activity, hourly trends
Order Management
- Full lifecycle tracking: Pending, Confirm, Processing, Handover, Picked Up, Delivered
- Delivery assignment (manual/automatic), invoice generation, refund workflows
Food & Menu Management
- Advanced item setup (description, images, pricing)
- Variations & addons; categories & sub-categories; labels & cuisines
- Bulk import/export via CSV/Excel
Marketing & Promotions
- Coupons with limits/expiry; BOGO; Happy Hour scheduling
- Loyalty points redeemable to wallet; push notifications via Firebase
- Sales popups for FOMO on storefront
User Management
- Employee roles & granular permissions
- Deliveryman management with shift tracking and earnings
- Customer wallet and CRM (orders, points, balance)
Website & Content
- Page builder for About/Privacy/Terms
- Blogs and FAQ modules
- Social links configuration
Settings & Configuration
- Payment gateways: Stripe, PayPal, Razorpay, Flutterwave
- SMS gateways: Twilio, Nexmo
- Firebase setup for notifications/auth; Mail via SMTP (Gmail, SES, Mailgun)
- Business info: currency, time zone, logo, branding
Communication
- Live chat between customers and Admin/Support
- Order-specific support channels
System Maintenance
- Database backups, system health view (PHP version, extensions)
- Activity logs for auditing
Security
- Role-based access control
- Secure login protections
Prerequisites
Server Requirements
- PHP ≥ 8.2
- Composer ≥ 2.5
- Node.js ≥ 18.x
- MySQL 8.0+ or MariaDB 10.5+
PHP Extensions
BCMath Ctype Fileinfo JSON Mbstring OpenSSL PDO (pdo_mysql) Tokenizer XML curl gd exif intl zip
Quick Start Guide
Pre-flight Checklist
- Domain and hosting meeting prerequisites.
- Purchase code available.
- Empty MySQL/MariaDB database created.
4-Step Installation
- Upload and unzip install.zip.
- Point domain document root to /public.
- Run installer wizard in browser.
- Configure DB credentials and purchase code.
Post-Installation
- Configure business settings.
- Set up mail (SMTP).
- Configure cron job.
- Create zone and add first food item.
Installation Process
Database Creation
- Step A: Create database via cPanel wizard.
- Step B: Create DB user and password.
- Step C: Assign ALL PRIVILEGES to the user.
Extraction & Setup
- Upload and unzip install.zip to server root.
- Point domain/subdomain to /public.
- Ensure writable: /storage, /bootstrap/cache, .env.
Automated Wizard
- Visit site to start installer.
- Enter DB credentials and purchase code.
- Finish and log in to Admin Panel.
Configuration
Core
- Business details, currency, time zone, branding.
- Enable/disable modules as needed.
Integrations
- Payment gateways: Stripe, PayPal, Razorpay, Flutterwave, etc.
- SMS gateways: Twilio, Nexmo, others for OTP.
- Firebase: push notifications and auth.
- Mail: SMTP (Gmail, AWS SES, Mailgun).
Environment
.env contains sensitive credentials. Do not commit it. Ensure APP_URL matches your domain.
APP_NAME= APP_ENV= APP_KEY= APP_URL= DB_HOST= DB_PORT= DB_DATABASE= DB_USERNAME= DB_PASSWORD= MAIL_MAILER= QUEUE_CONNECTION= BROADCAST_DRIVER= CACHE_DRIVER=
Server Configuration
Local Development
- php artisan serve (local dev only)
- Access: http://127.0.0.1:8000
Nginx
server {
listen 80;
server_name example.com;
root /var/www/foodlay/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
Apache
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/foodlay/public
<Directory /var/www/foodlay/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
LiteSpeed / OpenLiteSpeed
- Enterprise: point document root to /public; uses .htaccess
- OpenLiteSpeed: enable Rewrite and auto-load .htaccess in Virtual Host
SSL & Security
sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d example.com
cPanel Alternative (if /public not possible)
- Upload project to /public_html/foodlay_core/
- Move all files from /foodlay_core/public/ to /public_html/
- Edit public_html/index.php paths:
require __DIR__.'/foodlay_core/vendor/autoload.php'; $app = require_once __DIR__.'/foodlay_core/bootstrap/app.php';
Permissions
- Ensure writable: /storage, /bootstrap/cache, .env
Cron Job
* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1
Queue Workers
- Use Supervisor/systemd when QUEUE_CONNECTION=database
Deployment
- Point domain document root to /public
- Upload built assets (public/build) after npm run build
- Optimize configuration and routes
- Run migrations and seeders
- Start queue workers (Supervisor/Horizon)
npm install npm run build php artisan config:cache php artisan route:cache php artisan migrate --force
Troubleshooting
500 Server Error
- Check storage/logs/laravel.log
- Fix permissions:
chmod -R 775 storage chmod -R 775 bootstrap/cache
Vite manifest not found
- Ensure public/build exists and was uploaded correctly
Images not loading
- Link storage:
php artisan storage:link
404 Not Found (except homepage)
- Nginx: include try_files $uri $uri/ /index.php?$query_string;
- Apache: ensure .htaccess exists and mod_rewrite is enabled
Emails not sending
- Verify SMTP config; test connection
- Use QUEUE_CONNECTION=sync for testing or run workers
Class/Target not found
composer dump-autoload php artisan optimize:clear
Changes not reflecting
php artisan optimize:clear php artisan config:clear php artisan cache:clear
419 Page Expired (CSRF)
- Check SESSION_DOMAIN; ensure sessions path is writable; set SESSION_SECURE_COOKIE when HTTPS
Mixed Content (HTTP/HTTPS)
APP_URL=https://yourdomain.com
Composer platform issues
composer install --ignore-platform-reqs
SQL strict mode errors
- Set 'strict' => false in config/database.php and clear config cache
Large file uploads fail
upload_max_filesize = 64M post_max_size = 64M memory_limit = 512M
Node/Vue build issues
rm -rf node_modules package-lock.json npm install --legacy-peer-deps export NODE_OPTIONS=--max_old_space_size=4096 npm run build
Customization
Controllers & Services
- Controllers in app/Http/Controllers handle requests
- Services in app/Services encapsulate business logic
Models
- Use migrations for schema changes; update model $fillable
php artisan make:migration add_column_to_items_table
Frontend (Vue 3 + Inertia)
- Pages in resources/js/Pages
- Components in resources/js/Components
- Run npm run dev for HMR; npm run build for production
Styling & Themes
- Tailwind CSS entries in resources/css
- Rebuild assets after changes
Translations
- Manage languages via Admin Panel; developer seeds in database/seeders
Email Templates
- Blade templates at resources/views/emails
Routes
Route::get('/', fn () => Inertia::render('StoreFront/Home'));
Route::get('/admin', fn () => Inertia::render('AdminPanel/Dashboard'));
Included: feature questions, bug assistance, help with bundled assets
Not included: customization services, installation, hosting/server issues
Before Contacting
- Read this documentation thoroughly
- Check Troubleshooting section
- Search marketplace comments for similar issues