Skip to main content
This guide will help you quickly set up OptiFlow, create your first tenant, and start managing your optical store operations.
Before starting, ensure you’ve completed the installation steps.

Quick Setup

1

Start the Development Environment

Start all OptiFlow services with a single command:
composer run dev
This starts:
  • Laravel development server at http://optiflow.test
  • Queue worker for background jobs
  • Log viewer (Pail)
  • Vite dev server for hot module replacement
Using Laravel Herd? Your application is already served at https://optiflow.test without running any server.
2

Create Your First Tenant

Access the central admin panel to create a tenant:
  1. Open https://optiflow.test/admin in your browser
  2. Create an admin user account (first-time setup)
  3. Navigate to Tenants in the admin panel
  4. Click Create Tenant
  5. Fill in the tenant details:
    • Name: Your business name (e.g., “Optica Vision”)
    • Domain: Subdomain for this tenant (e.g., “vision”)
    • Email: Admin email for this tenant
// Tenant model structure
[
  'name' => 'Optica Vision',
  'domain' => 'vision', // Will be accessible at vision.optiflow.test
  'data' => [
    'email' => '[email protected]',
  ]
]
The tenant will be accessible at https://{domain}.optiflow.test (e.g., https://vision.optiflow.test)
3

Access Your Tenant Portal

Visit your tenant’s subdomain:
https://vision.optiflow.test
On first access, you’ll be prompted to:
  1. Create your tenant admin account
  2. Set up your first workspace
  3. Configure basic settings
4

Create Your First Workspace

A workspace represents a physical location or department:
  1. After logging into your tenant portal
  2. Navigate to SettingsWorkspaces
  3. Click Create Workspace
  4. Enter workspace details:
    • Name: Store location name (e.g., “Downtown Store”)
    • Code: Short identifier (e.g., “DT01”)
    • Description: Optional description
// Workspace model structure
[
  'name' => 'Downtown Store',
  'code' => 'DT01',
  'description' => 'Main downtown location',
]
You can create multiple workspaces for different store locations and switch between them using the workspace selector in the navigation.
5

Configure Company Details

Set up your company information for invoices and documents:
  1. Go to SettingsCompany Details
  2. Fill in your business information:
    • Company name
    • Tax ID (RNC for Dominican Republic)
    • Address and contact information
    • Upload your company logo
This information will appear on all invoices and quotations.
6

Create Your First Product

Add a product to your catalog:
  1. Navigate to Products
  2. Click Create Product
  3. Enter product details:
    • Name: Product name (e.g., “Ray-Ban Aviator”)
    • SKU: Stock keeping unit (e.g., “RB-3025”)
    • Price: Selling price
    • Cost: Purchase cost (for profit calculations)
    • Stock Tracking: Enable to track inventory
// Quick product creation example
[
  'name' => 'Ray-Ban Aviator',
  'sku' => 'RB-3025',
  'price' => 150.00,
  'cost' => 90.00,
  'track_stock' => true,
  'type' => 'physical',
]
7

Create Your First Invoice

Generate your first invoice:
  1. Go to InvoicesCreate Invoice
  2. Select or create a customer
  3. Choose a document subtype (invoice type)
  4. Add line items by searching for products
  5. Set quantities and prices
  6. Add payment (optional - can be paid later)
  7. Click Create Invoice
The invoice will:
  • Automatically calculate subtotal, taxes, and total
  • Deduct stock if inventory tracking is enabled
  • Generate a PDF for printing or emailing
  • Update the customer’s account balance
Stock is automatically deducted when an invoice is created. You can view stock movements in InventoryStock Movements.

What You’ve Accomplished

After completing this quickstart, you have:
  • ✅ Created a tenant with its own isolated database
  • ✅ Set up a workspace for your store location
  • ✅ Configured company details for invoicing
  • ✅ Added your first product to the catalog
  • ✅ Generated your first invoice with automatic stock deduction

Next Steps

Now that you have OptiFlow running, explore these features:

Create Quotations

Learn how to create quotations and convert them to invoices

Manage Inventory

Track stock levels, movements, and transfers between workspaces

Configure Taxes

Set up tax rates and types for your jurisdiction

Import Contacts

Bulk import customers and suppliers from Excel/CSV

Common Tasks

Adding Team Members

  1. Go to SettingsUsers
  2. Click Invite User
  3. Enter email and select a role:
    • Owner: Full access to everything
    • Admin: Manage settings and users
    • Member: Regular user access
  4. User receives invitation email
  5. They accept and set their password

Setting Up Stock Transfers

Transfer inventory between workspaces:
  1. Navigate to InventoryStock Transfers
  2. Click Create Transfer
  3. Select source and destination workspaces
  4. Add products and quantities
  5. Submit transfer
  6. Stock automatically updates in both locations
See the Stock Transfers Guide for detailed instructions.

Creating Workflow Automations

Automate repetitive tasks:
  1. Go to Automations
  2. Click Create Automation
  3. Use the visual builder to:
    • Set up triggers (e.g., invoice created)
    • Add actions (e.g., send WhatsApp notification)
  4. Test and activate your automation
Learn more in the Automations Guide.

Troubleshooting

Solution: Ensure your APP_URL in .env is set correctly and matches your Herd domain. For Laravel Herd, subdomains are automatically handled.
.env
APP_URL=http://optiflow.test
Restart your development server after changing .env:
composer run dev
Solution: Verify that:
  1. Product has “Track Stock” enabled
  2. Initial stock was set for the product in the current workspace
  3. You’re viewing the correct workspace (check workspace selector)
View stock movements to debug: InventoryStock Movements
Solution: Ensure the DomPDF package is installed and the storage/ directory is writable:
composer require barryvdh/laravel-dompdf
chmod -R 775 storage
Solution: Ensure the queue worker is running. If using composer run dev, it starts automatically. Otherwise:
php artisan queue:work --tries=3

Advanced Features

Once you’re comfortable with the basics, explore these advanced capabilities:
  • Multi-Currency: Handle transactions in different currencies with exchange rates
  • NCF Compliance: Configure Dominican tax receipt numbers (Números de Comprobante Fiscal)
  • Workflow Stages: Track jobs through custom workflow stages
  • Prescription Management: Manage optical prescriptions with clinical data
  • Telegram/WhatsApp Notifications: Set up automated customer notifications
  • API Integration: Build custom integrations using the REST API

Multi-Currency Setup

Configure multiple currencies and exchange rates

API Documentation

Integrate OptiFlow with other systems

Workflow Automation

Build custom workflows for your business

User Roles & Permissions

Set up fine-grained access control
Need help? Check out our comprehensive guides or explore the API reference.

Build docs developers (and LLMs) love