This guide walks you through every step required to get a local PortalHub instance running from a fresh clone. You will configure database credentials, initialise the MySQL schema, choose between the PHP built-in server and Docker, and open the login screen in your browser.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Nieto2020/portalhub/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Make sure the following tools are available on your machine before you begin:- PHP 8.0 or higher — required for the built-in server option and for running backend scripts directly.
- MySQL or MariaDB — a running database server accessible with an admin-level account.
- Docker & Docker Compose (optional) — needed only if you prefer the containerised path; Docker Desktop satisfies both requirements on macOS and Windows.
- A modern browser — any browser with ECMAScript 6+ support (Chrome, Firefox, Edge, Safari).
Setup
Configure Database Credentials
Open For a local (non-Docker) setup, either export environment variables in your shell or edit
backend/config/conexion.php — this file bootstraps a PDO connection using constants defined in backend/config/config.php. The constants are resolved from environment variables with sensible defaults:config.php directly and replace the defaults with your local MySQL credentials.For Docker, supply the same variables in a .env file at the project root — the mysql service reads them automatically via env_file. See the Deployment page for the full .env reference.Initialise the Database
Import the schema to create all tables, indexes, and foreign-key constraints:Optionally, seed the database with test users and sample records for each role:The
seed.sql file creates one account per role — admin, asesor, and cliente — so you can explore every part of the portal without creating data manually.Start the Server
Choose the option that matches your environment:
- Option A — PHP Built-in Server
- Option B — Docker Compose
Point PHP’s built-in web server at the The server starts immediately — no configuration files required. This option is ideal for quick local development but is not suitable for production.
backend directory, which acts as the document root for all API endpoints:Open PortalHub in Your Browser
Navigate to the login page that corresponds to your chosen server option:You should see the PortalHub authentication screen. Use the credentials provided by
- PHP Built-in Server
- Docker Compose
seed.sql to log in with the role you want to explore. Refer to the seed file for the exact email addresses and temporary passwords seeded for the admin, asesor, and cliente accounts.After You Log In
Any account that has the
require_password_change flag set to 1 in the usuarios table — including all accounts created by an administrator — will be redirected to a mandatory password-change screen on first login. You must set a new personal password before accessing the dashboard.