Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/lerichardv/patolab-platform/llms.txt

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

PatoLab ships with a single-command dev launcher that orchestrates all the processes you need — the Laravel HTTP server, the database queue worker, the log watcher, and the Vite HMR server — so you can go from a fresh clone to a fully working local environment in a matter of minutes. This guide walks through every step, from installing dependencies to logging in with a seeded administrator account.

Prerequisites

Before you begin, make sure the following are available on your system:
  • PHP 8.3 or higher with the gd, pdo_mysql, mbstring, bcmath, zip, and opcache extensions
  • Composer (dependency manager for PHP)
  • Node.js & npm (Node 20+ recommended)
  • A database — MySQL, PostgreSQL, or SQLite (SQLite requires no additional setup)
  • Chromium or Google Chrome — required for PDF generation via Spatie Browsershot
SQLite is the default database in .env.example (DB_CONNECTION=sqlite). Laravel will automatically create the database/database.sqlite file when you run migrations, so you can skip all database server setup for local development and get running immediately.

Setup Steps

1

Clone the repository

Clone the project to your local machine and navigate into the directory:
git clone <repository_url> && cd patolab
2

Install Composer dependencies

Install all PHP packages defined in composer.json:
composer install
3

Install npm packages

Install all frontend dependencies defined in package.json:
npm install
Note: The project’s .npmrc sets ignore-scripts=true, so npm lifecycle scripts will not run automatically. This is intentional and expected.
4

Configure your environment

Copy the example environment file and open it in your editor:
cp .env.example .env
For a SQLite setup (default, no server needed), no changes are required — the relevant block already reads:
.env
DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
# DB_USERNAME=root
# DB_PASSWORD=
For a MySQL or PostgreSQL setup, uncomment and fill in the database keys:
.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=patolab
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password
APP_URL=http://localhost:8000
5

Generate the application key

Generate a unique encryption key for your local installation:
php artisan key:generate
6

Link storage

Create a symbolic link from public/storage to storage/app/public so uploaded files are web-accessible:
php artisan storage:link
7

Generate Wayfinder JS routes

PatoLab uses Laravel Wayfinder to generate type-safe TypeScript route and form helpers from your Laravel routes. Run this once after setup (and again after any route changes):
php artisan wayfinder:generate --with-form
This writes the generated files to resources/js/actions/, resources/js/routes/, and resources/js/wayfinder/. These directories are git-ignored and must be regenerated in each environment.
8

Run migrations and seed the database

Create all database tables and populate them with roles, priorities, specimen types, referrers, and test users:
php artisan migrate:fresh --seed
9

Start the development servers

Launch all development processes concurrently with a single command:
composer dev
This runs the following four processes in parallel via concurrently:
ProcessCommandPurpose
serverphp artisan serveLaravel HTTP server on http://localhost:8000
queuephp artisan queue:listen --tries=1 --timeout=0Processes queued jobs (invoice generation, notifications)
logsphp artisan pail --timeout=0Streams application logs to the terminal
vitenpm run devVite HMR server for React/TypeScript hot-reloading
Open http://localhost:8000 in your browser once all processes have started.

Seeded Test Credentials

After running php artisan migrate:fresh --seed, the following accounts are available:
NameEmailPasswordNotes
Ricardo Valladaresricardo.valladares.triminio@gmail.com12345678Primary administrator
Ana Urbinaana.urbina@patolab.org12345678Administrator
Pedro Castropedro.castro@patolab.org12345678Administrator
Rolando Urbinadavidursal23@gmail.com12345678Administrator
All accounts have full administrator access and can be used to explore every area of the application.
Remember to re-run php artisan wayfinder:generate --with-form any time you add, rename, or remove a Laravel route. The generated TypeScript helpers in resources/js/routes/ and resources/js/actions/ are derived entirely from your route definitions and will become stale otherwise, causing TypeScript type errors on the frontend.

Build docs developers (and LLMs) love