Prerequisites
Before installing OptiFlow, ensure you have the following software installed:PHP 8.3 or higher
OptiFlow requires PHP 8.3+ with common extensions
Node.js 20 or higher
For building frontend assets with Vite
Composer
PHP dependency manager
Laravel Herd (Recommended)
Or any local development environment (Valet, Homestead, Docker)
Required PHP Extensions
Ensure the following PHP extensions are enabled:ext-zip- For handling file archivesext-pdo- For database connectionsext-mbstring- For string manipulationext-xml- For XML processingext-curl- For HTTP requestsext-gdorext-imagick- For image processing
If using Laravel Herd, all required PHP extensions are pre-configured.
Installation Steps
Install PHP Dependencies
Install the required PHP packages using Composer:This will install:
- Laravel 12 framework
- Laravel Tenancy for multi-tenancy
- Filament for admin panel
- Inertia.js Laravel adapter
- Spatie packages (permissions, activity log, media library)
- DomPDF for PDF generation
- And other dependencies
For production, use
composer install --optimize-autoloader --no-dev to exclude development dependencies.Install JavaScript Dependencies
Install the required Node.js packages:This will install:
- React 19
- Inertia.js React adapter
- TypeScript
- Tailwind CSS 4
- Vite and Laravel Vite plugin
- Radix UI components
- And other frontend dependencies
Configure Environment
Copy the example environment file and generate an application key:Edit the
.env file to configure your environment:.env
Create SQLite Database
If using SQLite (default for development), create the database file:For MySQL or PostgreSQL, create the database using your database management tool.
Run Database Migrations
Create all required database tables:This will create:
- Central application tables (users, tenants, domains)
- Permission tables (roles, permissions)
- Cache and session tables
Tenant-specific tables are created automatically when you create a new tenant.
Access the Application
If using Laravel Herd, your application is automatically available at:Or use the development script that starts everything:This runs concurrently:
- Central Admin:
https://optiflow.test/admin - Tenant Portal:
https://{tenant}.optiflow.test
- Laravel development server (
php artisan serve) - Queue worker (
php artisan queue:listen) - Log viewer (
php artisan pail) - Vite dev server (
npm run dev)
Optional: DGII Data Sync
If you’re operating in the Dominican Republic and need to sync RNC (tax ID) data from DGII:This command may take several minutes to complete as it downloads and processes a large dataset.
Production Deployment
For production deployments, follow these additional steps:Environment Configuration
Update your.env file for production:
.env
Optimization Commands
Queue Worker
Set up a queue worker as a system service to process background jobs:Task Scheduler
Add this to your crontab to run Laravel’s task scheduler:Development Tools
OptiFlow includes several development tools:Code Quality
Testing
Troubleshooting
Permission Errors
If you encounter permission errors, ensure proper ownership:Database Connection Issues
Verify your database credentials in.env and ensure the database server is running:
Asset Build Failures
Clear the Node.js cache and reinstall dependencies:Tenant Subdomain Not Working
If using Laravel Herd, ensure your.test domain is properly configured. For other environments, configure your web server (nginx/Apache) to support wildcard subdomains:
Laravel Herd Configuration
Laravel Herd Configuration
Laravel Herd automatically handles subdomain routing for
.test domains. No additional configuration is needed. Just ensure your APP_URL in .env matches your Herd domain.Next Steps
Now that OptiFlow is installed, proceed to the Quickstart Guide to:- Create your first tenant
- Set up your first workspace
- Create users and assign roles
- Start using OptiFlow’s features
Quickstart Guide
Get started with OptiFlow in minutes
Configuration Guide
Learn about multi-tenancy and workspace setup
API Documentation
Integrate OptiFlow with other systems
User Guides
Learn how to use OptiFlow’s features