Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/corpentunida-org/corpen/llms.txt

Use this file to discover all available pages before exploring further.

Corpen reads its configuration exclusively from the .env file in the project root. This file is never committed to version control. Start by copying the example template and then editing each group of variables for your environment:
cp .env.example .env
php artisan key:generate
The sections below document every variable group, their accepted values, and the Corpen behaviour they control.
For local development, consider using Laravel Sail (laravel/sail is included as a dev dependency). Sail provides a pre-configured Docker environment with PHP, MySQL, and Redis. Run ./vendor/bin/sail up and set DB_HOST=mysql to match the Sail MySQL service name. All other variables described in this guide apply equally in a Sail environment.

Application Settings

These variables control the core Laravel framework identity and debug behaviour.
VariableExample ValueDescription
APP_NAMECorpenApplication name displayed in UI and notifications.
APP_ENVproductionlocal, staging, or production. Guards debug output.
APP_KEYbase64:...32-byte encryption key. Generated by php artisan key:generate. Must never be empty.
APP_DEBUGfalseSet to true only in local/staging. Never true in production.
APP_URLhttps://app.corpen.com.coFull URL including scheme. Used by storage:link, queue workers, and email links.
APP_KEY
string
required
A base64-encoded 32-character random string. Generated automatically by php artisan key:generate. All encrypted session data and cookies depend on this value — rotating it will invalidate all active sessions.
Setting APP_DEBUG=true in production exposes stack traces, environment variables, and database queries in browser error pages. Always set it to false before going live.

Database

Corpen requires MySQL 8 or MariaDB 10.6+. The default driver is mysql.
VariableDefaultDescription
DB_CONNECTIONmysqlDatabase driver. Corpen is tested with mysql.
DB_HOST127.0.0.1Hostname or IP of the MySQL server. Use mysql when running with Laravel Sail or Docker Compose.
DB_PORT3306MySQL port.
DB_DATABASEcorpenName of the target database. Must exist before running migrations.
DB_USERNAMErootMySQL username.
DB_PASSWORD(empty)MySQL password.
DB_DATABASE
string
required
The database must be created manually before running php artisan migrate. Corpen ships over 60 migrations covering all modules — insurance, credits, archive, reservations, workflows, and more.
# Create the database before migrating
mysql -u root -p -e "CREATE DATABASE corpen CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
php artisan migrate

Cache, Session, and Queue

Corpen defaults all three to the database driver, meaning no external cache server is required out of the box.
VariableDefaultAccepted Values
CACHE_STOREdatabasedatabase, file, redis, memcached, array
SESSION_DRIVERdatabasedatabase, file, cookie, redis, memcached
QUEUE_CONNECTIONdatabasedatabase, sync, redis, sqs, beanstalkd
QUEUE_CONNECTION
string
Corpen uses queues for Excel exports (via maatwebsite/excel) and PDF generation (via barryvdh/laravel-dompdf). In production, use database (requires a running queue worker) or redis for better throughput. sync is only appropriate for local development.
For Redis-backed cache and sessions, add the following to .env:
CACHE_STORE=redis
SESSION_DRIVER=redis
QUEUE_CONNECTION=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

Storage Drivers

Corpen’s config/filesystems.php defines three disks: local, public, and s3. The active disk is selected by FILESYSTEM_DISK.
VariableDefaultDescription
FILESYSTEM_DISKlocalActive storage disk. Set to s3 to use AWS S3 or a compatible endpoint.

Local Storage

The public disk maps storage/app/public to public/storage via the symlink created by php artisan storage:link. This disk is used for uploaded documents, insurance policy attachments, and employee photos.

AWS S3

Corpen includes league/flysystem-aws-s3-v3 (v3.0). Switch to S3 by setting FILESYSTEM_DISK=s3 and providing these credentials:
VariableDescription
AWS_ACCESS_KEY_IDIAM access key with s3:PutObject, s3:GetObject, and s3:DeleteObject on the target bucket.
AWS_SECRET_ACCESS_KEYCorresponding IAM secret key.
AWS_DEFAULT_REGIONAWS region, e.g. us-east-1 or sa-east-1. Also used by the ses mail driver.
AWS_BUCKETName of the S3 bucket.
AWS_URL(optional) Custom CDN URL to prefix public asset URLs.
AWS_ENDPOINT(optional) Override endpoint for S3-compatible services (e.g. MinIO, DigitalOcean Spaces).
AWS_USE_PATH_STYLE_ENDPOINTfalse by default. Set to true for MinIO and other path-style endpoints.
FILESYSTEM_DISK=s3
AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
AWS_DEFAULT_REGION=sa-east-1
AWS_BUCKET=corpen-docs-production

Google Cloud Storage

Corpen includes google/cloud-storage (^1.48) as a Composer dependency. Google Cloud Storage can be used as an alternative object store for document uploads and employee file management.
The google/cloud-storage SDK authenticates via a service account JSON key file. Download the key from the GCP Console (IAM & Admin → Service Accounts → Keys), place it on your server outside the web root (e.g. /etc/corpen/gcs-credentials.json), and set GOOGLE_APPLICATION_CREDENTIALS to that absolute path. Never commit the JSON file to version control.
VariableDescription
GOOGLE_CLOUD_PROJECT_IDYour GCP project ID, found in the GCP Console dashboard.
GOOGLE_CLOUD_STORAGE_BUCKETName of the GCS bucket to use for file storage.
GOOGLE_APPLICATION_CREDENTIALSAbsolute path to the service account JSON key file on the server.
GOOGLE_CLOUD_PROJECT_ID=corpen-production
GOOGLE_CLOUD_STORAGE_BUCKET=corpen-files
GOOGLE_APPLICATION_CREDENTIALS=/etc/corpen/gcs-credentials.json

Mail

Corpen uses Laravel’s standard mail stack. The default mailer is log, which writes emails to storage/logs/laravel.log — safe for development, but must be changed for production.
VariableDefaultDescription
MAIL_MAILERlogTransport driver: smtp, sendmail, ses, resend, postmark, log, array.
MAIL_HOST127.0.0.1SMTP server hostname.
MAIL_PORT2525SMTP port. Common values: 587 (STARTTLS), 465 (SSL), 25.
MAIL_USERNAME(empty)SMTP authentication username.
MAIL_PASSWORD(empty)SMTP authentication password.
MAIL_ENCRYPTIONtlstls, ssl, or null.
MAIL_FROM_ADDRESS(empty)Sender email address for all outgoing mail.
MAIL_FROM_NAME${APP_NAME}Sender display name. Defaults to the value of APP_NAME.
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=noreply@corpen.com.co
MAIL_PASSWORD=your-app-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@corpen.com.co
MAIL_FROM_NAME="Corpen"

Google API (Drive / Sheets)

Corpen includes google/apiclient (2.15) as a Composer dependency, which is used for Google Drive integration and Sheets data sync. This SDK also uses GOOGLE_APPLICATION_CREDENTIALS for server-to-server (service account) authentication.
VariableDescription
GOOGLE_APPLICATION_CREDENTIALSPath to the service account JSON key file. Shared with the GCS configuration above.
For OAuth2 flows (user-delegated access), you would also configure a client ID and secret through the GCP Console OAuth Credentials screen. These are typically stored as custom .env variables matching your application’s OAuth redirect URIs.

Full .env Template

# Application
APP_NAME=Corpen
APP_ENV=production
APP_KEY=
APP_DEBUG=false
APP_URL=https://app.corpen.com.co

# Database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=corpen
DB_USERNAME=corpen_user
DB_PASSWORD=

# Cache / Session / Queue
CACHE_STORE=database
SESSION_DRIVER=database
QUEUE_CONNECTION=database

# Storage
FILESYSTEM_DISK=local

# AWS S3 (set FILESYSTEM_DISK=s3 to activate)
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=sa-east-1
AWS_BUCKET=
AWS_URL=
AWS_ENDPOINT=
AWS_USE_PATH_STYLE_ENDPOINT=false

# Google Cloud (Storage + Drive/Sheets API)
GOOGLE_CLOUD_PROJECT_ID=
GOOGLE_CLOUD_STORAGE_BUCKET=
GOOGLE_APPLICATION_CREDENTIALS=

# Mail
MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@corpen.com.co
MAIL_FROM_NAME="${APP_NAME}"

Build docs developers (and LLMs) love