version 1.0.0
Welcome to DayOneFood, the ultimate Single Vendor food delivery solution. Built with Laravel 12 and Vue 3, it offers a high-performance, scalable, and secure platform for your business.
DayOneFood follows the Monolith with Modern Frontend architecture using Inertia.js. This allows us to build a classic server-driven web app but with the modern, single-page application (SPA) feel of Vue.js.
Understanding the structure is key to customization:
/app
/Console # Custom Artisan commands
/Enums # Enumerations (OrderStatus, PaymentMethod, etc.)
/Events # Event classes
/Http
/Controllers # Application Logic
/Api # API Controllers (V1, Customer, DeliveryMan)
/Payment # Payment Gateway Controllers
/Web # Web Controllers (Admin, StoreFront)
/Middleware # HTTP Middleware
/Requests # Validation Logic (Form Requests)
/Resources # API Resources (Data transformation)
/Models # Eloquent Models
/Services # Business Logic Services
/Traits # Reusable Traits
/bootstrap # Framework bootstrap files
/config # App configuration files (database, mail, services)
/database # Migrations and Seeders
/public # Web root (images, build assets) - POINT DOMAIN HERE
/resources
/css # Tailwind CSS entry points
/js # Vue components and Inertia pages
/AdminPanel # Admin Panel Vue Components
/StoreFront # StoreFront Vue Components
/components # Shared Vue components
/lib # Library utilities
/views # Blade templates (entry points)
/routes # Web and API routes
/api # API routes
/web # Web routes
/storage # Logs, compiled templates, file uploads
.env # Environment variables (DB, API Keys)
DayOneFood is a comprehensive food delivery solution packed with advanced features for Admins, Customers, and Deliverymen.
Ensure your hosting environment meets these requirements to avoid runtime errors.
These core extensions must be enabled in your php.ini for Laravel to run correctly:
BCMath PHP Extension
Ctype PHP Extension
Fileinfo PHP Extension
JSON PHP Extension
Mbstring PHP Extension
OpenSSL PHP Extension
PDO PHP Extension (pdo_mysql for MySQL/MariaDB)
Tokenizer PHP Extension
XML PHP Extension
For DayOneFood features (image upload, processing, APIs, updates), you should also enable:
cURL PHP Extension
GD PHP Extension
Exif PHP Extension
Intl PHP Extension
Zip PHP Extension
php -v and php -m in your terminal.
Get your food delivery business running in 5 minutes. Follow this high-level overview to go from zero to hero.
We use an automated wizard, so no coding is required.
install.zip to your server./public folder.Once logged into the Admin Panel, complete these essential tasks:
install.zip file. This package includes all dependencies (vendor, node_modules) and built assets.
Before installing the software, you must create a database. Most hostings use cPanel. Here is how to do it:
Step A: Create Database
dayonefood_db) and click Next Step.Step B: Create User
dayonefood_user).Step C: Assign Privileges
/public folder. This is critical for security and functionality./storage/bootstrap/cache.env (The file itself should be writable by the web server user)Once extracted and permissions are set, open your browser and visit your domain (e.g., http://yourdomain.com). You will be redirected to the installation wizard.
Step-by-Step Wizard:
All system configurations can be managed directly from the Admin Panel. You do not need to edit the .env file manually.
Go to Settings > 3rd Party Setup > Mail Config.
smtpsmtp.mailtrap.iosmtp587tls or sslno-reply@yourdomain.comGo to Settings > 3rd Party Setup > Payment Methods.
Here you can activate/deactivate gateways and switch between Test (Sandbox) and Live modes. Supported gateways include:
Go to Settings > 3rd Party Setup > SMS Config.
Configure your preferred SMS provider for OTPs and notifications. Supported providers:
Go to Settings > Firebase Setup.
You need to configure your Firebase project credentials here for Push Notifications and OTPs.
service-account.json file generated from Firebase (Project Settings > Service Accounts).Go to Settings > 3rd Party Setup > Social Media.
Enable One-Click Login for customers using their existing accounts.
Go to Settings > 3rd Party Setup > OpenAI.
Enable AI features to automatically generate food descriptions and names.
Go to Settings > 3rd Party Setup > Other Configurations.
For a production environment, you must configure the following system processes.
To ensure smooth operation, especially for image uploads and processing, update your php.ini with these values:
max_execution_time = 300
max_input_time = 300
memory_limit = 512M
post_max_size = 100M
upload_max_filesize = 100M
The scheduler is responsible for running background tasks. Add the following entry to your server's Crontab:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
To ensure emails and notifications are sent instantly without freezing the user interface, you must use a Queue Worker. We recommend Supervisor to keep this worker running in the background.
.env file has QUEUE_CONNECTION=database.
1. Install Supervisor:
sudo apt-get install supervisor
2. Create Configuration File:
Create a new configuration file at /etc/supervisor/conf.d/dayonefood-worker.conf:
[program:dayonefood-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /path/to/your/project/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/path/to/your/project/storage/logs/worker.log
stopwaitsecs=3600
/path/to/your/project/ with the actual path to your project (e.g., /var/www/dayonefood).
3. Start & Manage Supervisor:
Run the following commands to load the config and start the process:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start dayonefood-worker:*
Useful Commands:
sudo supervisorctl statussudo supervisorctl restart dayonefood-worker:*sudo supervisorctl stop dayonefood-worker:*Ensure your storage folder is linked to public. If images are missing, run:
php artisan storage:link
Once your application is live, run these commands to optimize performance:
# Cache Configuration
php artisan config:cache
# Cache Routes
php artisan route:cache
# Cache Views
php artisan view:cache
.env value or add new routes, you MUST run php artisan optimize:clear followed by these commands again.
To run the application locally without using the command line:
http://localhost/folder_name/public.Alternatively, you can run the project using Laravel's built-in development server:
artisan file exists).php artisan serve (optionally php artisan serve --host=127.0.0.1 --port=8000).http://127.0.0.1:8000 in your browser.php artisan serve is recommended for local development only. For production, always use a proper web server (Nginx/Apache) pointing to the /public folder.
For production, we recommend Nginx. Ensure the root directive points to the /public folder:
server {
listen 80;
server_name example.com;
# CRITICAL: Point to public directory
root /var/www/dayonefood/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;
}
}
If you prefer Apache, use the following Virtual Host configuration. Ensure mod_rewrite is enabled.
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/dayonefood/public
<Directory /var/www/dayonefood/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>
sudo a2enmod rewrite and restart Apache.
LiteSpeed Enterprise is fully compatible with Apache .htaccess files. OpenLiteSpeed requires some additional setup.
/public. It reads the .htaccess file automatically./path/to/project/public.Yes, and Auto Load from .htaccess to Yes.Always run your production site over HTTPS. You can use Certbot (Let's Encrypt):
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d example.com
If you cannot change the document root to the public folder, follow this alternative method:
/public_html/dayonefood_core/)./public_html/dayonefood_core/public/ and select all files (including hidden files like .htaccess). Move or copy them to your main domain folder (e.g., /public_html/).index.php file you just moved to public_html and update the paths to point to your project folder:
// Find these lines:
require __DIR__.'/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
// Replace them with (adjust 'dayonefood_core' to your folder name):
require __DIR__.'/dayonefood_core/vendor/autoload.php';
$app = require_once __DIR__.'/dayonefood_core/bootstrap/app.php';
.htaccess file from the public folder. In cPanel File Manager, click "Settings" (top right) and check "Show Hidden Files" to see it.
DayOneFood is designed to be easily customizable. Below are the guides for modifying the key components of the system.
The backend logic is separated into Controllers (handling requests) and Services (business logic).
app/Http/Controllers.
ItemController.php handles item management requests.
app/Services.
ItemService.php contains the logic for creating or updating items.
How to customize: Ideally, you should modify the Service class to change business rules. If you need to add new endpoints, create a new method in the Controller and define a route in routes/web.php or routes/api.php.
Eloquent Models are located in the app/Models directory.
If you add a new column to a database table, remember to:
php artisan make:migration add_column_to_items_table$fillable array in app/Models/Item.php.The frontend is built with Vue 3 and Inertia.js. The files are located in resources/js.
resources/js/Pages - These are the main views.resources/js/Components - Reusable UI elements.Workflow for Frontend Changes:
npm install in the project root.npm run dev for hot-reloading while developing.npm run build. This compiles the assets into the `public/build` directory.After running `npm run build`, upload the public/build folder to your live server.
We use Tailwind CSS 4 for styling. You can customize the look and feel by editing the CSS files in resources/css/.
resources/css/app.css - Contains Tailwind imports and global variables.resources/css/admin.css - Specific styles for the backend.resources/css/storefront.css - Specific styles for the customer-facing website.npm run build to compile the changes.
Translations are managed dynamically through the database to allow easy editing from the Admin Panel.
app/Models/Translation.phpdatabase/seeders/DatabaseSeeder.php (checks for translation seeds)Email templates are built using Laravel Blade and can be customized in the resources/views/emails directory.
resources/views/emails/admin/resources/views/emails/customer/ (e.g., invoice, welcome email, OTP).Some email configurations (like subjects) might be stored in the database. Check database/json/email-templates.json for the default seed data.
If you need to add new pages or API endpoints, define them in the routes files:
routes/web.php - Handles browser requests and Inertia page rendering.routes/api.php - Handles mobile app and external API requests.Common issues and how to fix them.
This is the most common error. It usually means a permission issue or a fatal PHP error.
storage/logs/laravel.log to see the exact error message.
chmod -R 775 storage
chmod -R 775 bootstrap/cache
This error occurs when the frontend assets are missing or the build path is incorrect.
If uploaded images are broken, the symbolic link between `public/storage` and `storage/app/public` is missing.
php artisan storage:link.
Route::get('/link-storage', function () {
Artisan::call('storage:link');
return 'Storage Linked!';
});
Visit yourdomain.com/link-storage once, then remove the code.
This happens when your web server (Nginx/Apache) is not configured to handle "pretty URLs".
try_files directive:
try_files $uri $uri/ /index.php?$query_string;
.htaccess file exists in the public directory and `mod_rewrite` is enabled.If emails (OTPs, Invoices) are failing:
QUEUE_CONNECTION=database in `.env`, you MUST run the queue worker (Supervisor). Try changing it to QUEUE_CONNECTION=sync for testing (sends email immediately but slows down the app).This usually happens after an update or moving files.
composer dump-autoload
php artisan optimize:clear
If you changed `.env` or code but don't see the result:
php artisan optimize:clear
php artisan config:clear
php artisan cache:clear
This error occurs when the session expires or cookies are blocked.
SESSION_DOMAIN in `.env` is set correctly (or set to `null`).storage/framework/sessions is writable.SESSION_SECURE_COOKIE=true.If your site looks broken or shows "Not Secure", check your `.env` file:
APP_URL=https://yourdomain.com
You may also need to force HTTPS in `app/Providers/AppServiceProvider.php` if you are behind a load balancer:
if($this->app->environment('production')) {
\URL::forceScheme('https');
}
This error means your PHP version or extensions don't match the project requirements.
composer install --ignore-platform-reqs
If you see SQL strict mode errors (e.g., 'GROUP BY' issues), disable strict mode in config/database.php:
'mysql' => [
'strict' => false, // Change from true to false
// ...
],
Then run php artisan config:clear.
If you cannot upload large images or files, increase the limits in your php.ini file:
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 512M
Restart PHP-FPM or Apache after changes.
If you encounter errors while compiling the frontend:
npm install fails, try running:
rm -rf node_modules package-lock.json npm install --legacy-peer-deps
export NODE_OPTIONS=--max_old_space_size=4096 npm run build
5173 is allowed in your firewall or Docker container.Thank you for purchasing DayOneFood. We are dedicated to providing you with the best support experience.
If you have any questions or need help with installation/configuration, feel free to reach out to us directly.
Email Support:
thedayonesoft@gmail.com
WhatsApp Support:
+880 1601-666058
As per Envato's Item Support Policy, we provide support for the following:
To speed up your support request, please check the following: