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 is a Laravel 11 + Livewire 3 enterprise management platform built for cooperative organizations in Colombia. This guide walks you through installing Corpen from scratch — whether you are setting up a production server, a staging environment, or a local development machine.

System Requirements

Before you begin, confirm your environment meets the following minimums:

PHP 8.2+

Required extensions: pdo_mysql, gd, zip, bcmath, openssl. The Docker image uses php:8.4-apache with all extensions pre-installed.

Composer 2

Corpen’s dependency tree includes Laravel 11, Livewire 3, Spatie Permission, Maatwebsite Excel, and Google Cloud Storage SDK.

Node.js 18+

Required to compile front-end assets with Vite. The Dockerfile pins Node 18 via nvm.

MySQL 8 / MariaDB 10.6+

Corpen uses over 60 migration files covering insurance, credits, archive management, reservations, and more.
Redis is optional but recommended for production cache and session drivers. The default CACHE_STORE and SESSION_DRIVER are both database, so Corpen works out of the box without Redis.

Installation

1
Clone the repository
2
git clone https://github.com/corpentunida-org/corpen.git
cd corpen
3
Copy the environment file and generate the application key
4
cp .env.example .env
php artisan key:generate
5
Edit .env with your database credentials and application URL before continuing. See Environment Configuration for all variables.
6
Install PHP dependencies (optimized for production)
7
composer install --no-dev --optimize-autoloader
8
The --no-dev flag excludes packages like laravel/sail, laravel/pint, and phpunit/phpunit that are not needed in production.
9
Install and build front-end assets
10
npm install
npm run build
11
This compiles and fingerprints all Vite/Tailwind assets into public/build/.
12
Run database migrations
13
php artisan migrate
14
Corpen ships 60+ migration files that create all domain tables — insurance policies (seg_polizas), credits (cre_creditos), archive management (gdo_empleados), reservations (res_reservas), workflows, and more.
16
php artisan storage:link
17
This links public/storagestorage/app/public, which is required for uploaded documents and profile photos to be publicly accessible.
19
php artisan db:seed --class=RoleSeeder
20
This creates the five default roles: admin, exequial, creditos, seguros, and read.
21
Cache configuration for production
22
php artisan optimize
php artisan view:cache
Always run php artisan optimize after changing any .env values or editing config files in production. Stale config cache is the most common source of unexpected behavior after deployments.

Queue Worker

Corpen uses Laravel queues for background jobs including Excel exports (maatwebsite/excel) and PDF generation (barryvdh/laravel-dompdf). The default QUEUE_CONNECTION is database, which uses the jobs table created by the 0001_01_01_000002_create_jobs_table.php migration. Start a persistent queue worker with:
php artisan queue:work --tries=3
For production, use a process supervisor such as Supervisor or systemd to keep the worker running across restarts:
[program:corpen-worker]
command=php /var/www/html/artisan queue:work --tries=3
autostart=true
autorestart=true
user=www-data
redirect_stderr=true
stdout_logfile=/var/log/corpen-worker.log
If QUEUE_CONNECTION=sync, all jobs run synchronously in the request cycle. This is convenient for local development but will cause timeouts on large Excel exports in production.

Post-Installation Checklist

StepCommandRequired
Generate app keyphp artisan key:generate✅ Always
Run migrationsphp artisan migrate✅ Always
Create storage linkphp artisan storage:link✅ Always
Seed rolesphp artisan db:seed --class=RoleSeederRecommended
Build assetsnpm run build✅ Production
Cache configphp artisan optimize✅ Production
Cache viewsphp artisan view:cache✅ Production
Start queue workerphp artisan queue:work✅ Production

Build docs developers (and LLMs) love