Skip to content

Configuration

Environment Variables

Fluxor uses a .env file for configuration. Copy .env.example to .env:

bash
cp .env.example .env

Available Options

VariableDescriptionDefault
APP_NAMEApplication name"Fluxor App"
APP_ENVEnvironment (development/production/testing)development
APP_DEBUGDebug modetrue
APP_PORTDevelopment server port8000
APP_TIMEZONETimezoneUTC
APP_KEYApplication key (auto-generated)-

Authentication Configuration (if enabled)

VariableDescriptionDefault
AUTH_SECRET_KEYSecret key for token generationauto-generated
AUTH_SESSION_EXPIRYSession expiry in seconds1800
AUTH_REMEMBER_EXPIRYRemember token expiry2592000

Mailer Configuration (if enabled)

VariableDescription
MAIL_HOSTSMTP server hostname
MAIL_PORTSMTP port (587 for TLS, 465 for SSL)
MAIL_USERNAMESMTP username
MAIL_PASSWORDSMTP password
MAIL_FROM_ADDRESSDefault sender email
MAIL_FROM_NAMEDefault sender name

Uploader Configuration (if enabled)

VariableDescriptionDefault
UPLOAD_MAX_SIZEMaximum file size in bytes5242880 (5MB)
UPLOAD_ALLOWED_TYPESAllowed file extensionsjpg,jpeg,png,gif,webp,pdf,doc,docx

Application Configuration

You can also configure paths programmatically:

php
$app = new Fluxor\App();
$app->setConfig([
    'router_path' => __DIR__ . '/custom/router',
    'views_path' => __DIR__ . '/resources/views',
    'storage_path' => __DIR__ . '/storage',
]);

Auto-detection

Fluxor automatically detects:

  • Base Path: Root directory of your application
  • Base URL: Current URL (protocol, host, subdirectory)

No configuration needed! 🚀

Released under the MIT License.