Corpen can be running locally in minutes. This guide covers two paths: Docker Compose, which bundles the PHP/Apache runtime into a pre-built image and is the fastest way to get a production-like environment on any OS, and Manual setup, which gives you full control over the stack using your local PHP, Composer, and Node.js toolchain. Both paths result in the same working application.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.
Prerequisites
Before starting, make sure you have the following available in your environment:| Requirement | Minimum Version | Notes |
|---|---|---|
| PHP | 8.2 | Extensions required: pdo_mysql, gd, zip, bcmath |
| Composer | 2.x | Dependency manager for PHP |
| Node.js | 18 | Required by Vite for frontend asset compilation |
| MySQL / MariaDB | 8.0 / 10.6 | Application database |
| Redis | any | Optional — used for cache and session drivers if configured |
Installation
- Docker Compose
- Manual Setup
The This executes all migrations in
docker-compose.yml file defines a single app service built from the project’s Dockerfile. It maps container port 80 to host port 83, mounts the entire project directory as a volume, and reads environment variables from your .env file. The Dockerfile is based on php:8.4-apache and installs Composer, Node.js 18 (via NVM), and all required PHP extensions automatically.Create and configure the environment file
Corpen does not ship a committed At minimum, set the following keys in
.env.example. Create your own based on standard Laravel variables and the services Corpen uses:.env:Build and start the container
The The application will be available at http://localhost:83 once the container is healthy.
Dockerfile runs composer install, npm install, and npm run build automatically during the image build. The Apache virtual host is pre-configured to serve from /var/www/html/public.Run database migrations
database/migrations/, creating the full schema including Spatie permission tables (2024_11_05_135024_create_permission_tables.php) and all module-specific tables.Seed roles, users, and geography data
The
DatabaseSeeder calls RoleSeeder (creates roles admin, exequial, creditos, seguros, read), UserSeeder, and GeoColombiaSeeder (populates Colombian department and municipality data used throughout the platform):Open Corpen in your browser
Navigate to http://localhost:83. You will be redirected to the Jetstream login page. Log in with the credentials created by
UserSeeder. After authentication, IndexController reads your assigned role and redirects you to the appropriate module landing page.First Login and Role-Based Access
After logging in, Corpen does not display a generic dashboard. Instead,IndexController@index queries the roles table joined with the actions table for the authenticated user and performs a role-based redirect:
| Role | Lands on |
|---|---|
admin | /users — User management panel |
exequial | /exequiales/asociados — Exequial associates list |
seguros | /seguros/poliza — Insurance policies index |
cinco | /cinco/terceros — Five-percent fund third parties |
soporte | /soportes/soportes — Support tickets list |
| other | welcome view |
Building for Production
When deploying beyond the Docker path (e.g., to a VPS or cloud instance), compile assets and warm the caches:Dockerfile runs npm run build and php artisan view:cache during its build stage. For containerized production deployments, run php artisan config:cache and php artisan route:cache as a post-start step or add them to the container’s entrypoint script, since those commands require a live database connection that is not available at image build time.