Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/scooller/Leben-site/llms.txt

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

This guide walks you through every step needed to get iLeben running on your local machine or a cPanel shared-hosting environment. By the end you will have the Laravel backend serving the Filament admin panel, the React frontend compiled and linked, and an admin user ready to log in. Plan for roughly 10–15 minutes on a machine with all prerequisites already installed.

Prerequisites

Before you start, make sure the following are available in your environment:
  • PHP 8.2+php -v
  • Composer 2.xcomposer --version
  • Node.js 18+node -v
  • MySQL 8+mysql --version

Installation

1

Clone the repository

git clone <repo-url> sale-ileben
cd sale-ileben
2

Install backend dependencies

composer install
3

Create and key your .env file

cp .env.example .env
php artisan key:generate
The .env.example already contains every variable the application expects. Open .env and review the values — at minimum you will need to fill in your database credentials and Salesforce OAuth settings before the next steps.
4

Configure the database connection

Open .env and set the MySQL connection details:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=ileben_ddbb
DB_USERNAME=root
DB_PASSWORD=
Create the database in MySQL if it does not already exist:
mysql -u root -p -e "CREATE DATABASE ileben_ddbb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
5

Run database migrations

php artisan migrate
To also seed initial data:
php artisan db:seed
6

Install frontend dependencies

cd frontend
npm install
Web Awesome Pro (@web.awesome.me/webawesome-pro) requires an npm token. Set the WEBAWESOME_NPM_TOKEN environment variable before running npm install. The frontend/.npmrc file resolves the @web.awesome.me scope automatically once the variable is present.
7

Build the frontend and return to project root

npm run build
cd ..
The build script compiles React/Vite assets into frontend/dist/, then runs pre-render and SEO validation scripts automatically.
8

Create the storage symlink

php artisan storage:link
This links storage/app/public to public/storage so uploaded media files are web-accessible.
9

Create an admin user via Tinker

php artisan tinker
Inside the Tinker REPL, run:
User::create([
    'name'     => 'Admin',
    'email'    => 'admin@ileben.com',
    'password' => Hash::make('password'),
]);
Exit Tinker with Ctrl+D or exit.
10

cPanel — create the public_html symlink

On cPanel shared hosting, the Laravel public/ directory must be served as public_html. Make sure public_html does not already exist before creating the symlink:
rm -rf /home/devleben/public_html
ln -s /home/devleben/laravel/public /home/devleben/public_html
Replace devleben and laravel with your actual cPanel username and project directory name.
11

Set directory permissions

Apache must be able to traverse the directory tree to reach public/. Apply these permissions:
# Home directory — traversable by Apache
chmod 711 /home/devleben

# Project root — readable and traversable
chmod 755 /home/devleben/laravel

# Public directory — readable and traversable
chmod 755 /home/devleben/laravel/public

# Writable by the web server
chmod -R 775 /home/devleben/laravel/storage
chmod -R 775 /home/devleben/laravel/bootstrap/cache

Verify the Installation

Local development server

Start the Laravel development server:
php artisan serve
In a separate terminal, start the Vite dev server for the React frontend:
cd frontend
npm run dev
URLWhat you should see
http://localhost:8000React frontend (production build)
http://localhost:5173React frontend (Vite dev server with HMR)
http://localhost:8000/adminFilament admin panel login
http://localhost:8000/api/v1API discovery endpoint

Useful diagnostic commands

# General application status
php artisan about

# Check migration state
php artisan migrate:status

# Clear all caches
php artisan optimize:clear
cPanel 403 errors after creating the symlink are almost always a permissions problem, not an .htaccess problem. Apache must be able to traverse every directory in the path from the server root to public/. The home directory needs at least 711, the project root needs 755, and public/ needs 755. Setting these five chmod commands in Step 11 resolves the issue in the vast majority of cases.

Configure Salesforce (Optional)

If you need Salesforce synchronisation, add these variables to .env:
SF_AUTH_METHOD=WebServer
SF_CONSUMER_KEY=
SF_CONSUMER_SECRET=
SF_CALLBACK_URI=http://localhost/salesforce/callback
SF_LOGIN_URL=https://login.salesforce.com
SF_INSTANCE_URL=https://your-domain.my.salesforce.com
SF_API_VERSION=57.0

# For persistent refresh tokens
SF_OAUTH_SCOPE="api refresh_token offline_access"
SF_OAUTH_PROMPT="consent"
Then authenticate once from the admin panel at Settings → Site Settings → Salesforce → Connect with Salesforce. After the first OAuth callback, tokens are persisted encrypted in the database and restored automatically after cache clears.

Configure Payment Gateways (Optional)

Add gateway credentials to .env as needed:
# Transbank
TRANSBANK_ENVIRONMENT=integration
TRANSBANK_COMMERCE_CODE=
TRANSBANK_API_KEY=

# Transbank Mall (multiple commerce codes)
TRANSBANK_MALL_MODE=false
TRANSBANK_STORE_CODES='{"leben":"597035563628"}'

# Mercado Pago
MERCADOPAGO_PUBLIC_KEY=
MERCADOPAGO_ACCESS_TOKEN=
MERCADOPAGO_WEBHOOK_SECRET=
For a full reference of every API endpoint, authentication flow, webhook payload, and cURL example, see the API Reference. For detailed payment gateway configuration and webhook setup, see Payments & Gateways.

Build docs developers (and LLMs) love