SimplyBiz Environment Variables
This document describes the required SimplyBiz environment variables for the Flowcode application.
Security Tokens (REQUIRED)
The following environment variables are mandatory and must be set with secure, randomly generated values:
JWT_SECRET
- Purpose: Used for JWT token signing and verification
- Required: No
- Security: Must be a strong, random string (minimum 32 characters)
- Example:
JWT_SECRET=your-super-secure-random-jwt-secret-here
SIMPLYBIZ_LANDLORD_TOKEN
- Purpose: Authentication token for SimplyBiz landlord access
- Used in: Tenant login URL generation, token middleware validation
- Required: Yes
- Security: Must be a unique, unguessable string
- Example:
SIMPLYBIZ_LANDLORD_TOKEN=your-unique-landlord-token-here
FLOWCODER_REFERER_TOKEN
- Purpose: Validation token for Flowcoder referer integration
- Used in:
getTenantLoginUrl()for flowcoder parameter, referer middleware - Required: Yes (when using flowcoder integration)
- Security: Must be a unique, unguessable string
- Example:
FLOWCODER_REFERER_TOKEN=your-unique-flowcoder-token-here
Security Best Practices
⚠️ IMPORTANT: Never commit actual token values to version control.
-
Generate Strong Tokens: Use cryptographically secure random strings
# Generate secure random strings openssl rand -base64 32 # Or use Laravel's built-in helper php -r "echo bin2hex(random_bytes(32)) . PHP_EOL;" -
Environment-Specific Values: Use different tokens for each environment (development, staging, production)
-
Regular Rotation: Consider rotating these tokens periodically for enhanced security
Setup Instructions
-
Copy
.env.exampleto.env:cp .env.example .env -
Generate and set the required security tokens:
# Example - replace with your own secure values JWT_SECRET=$(openssl rand -base64 32) SIMPLYBIZ_LANDLORD_TOKEN=$(openssl rand -base64 32) FLOWCODER_REFERER_TOKEN=$(openssl rand -base64 32) -
Update your
.envfile with the generated values -
Clear configuration cache after changes:
php artisan config:clear
Related Files
config/flowcode.php- Configuration definitionsapp/Http/Traits/FilamentHelperTrait.php- Uses landlord and flowcoder tokensapp/Http/Middleware/TokenMiddleware.php- Validates landlord tokenapp/Http/Middleware/RefererMiddleware.php- Validates flowcoder token