Docs Contributing to the app
Development setup
Install and run Feedback Pilgrim on your computer for development, load the example data, and learn the commands and the rules for a change.
Requirements
- PHP 8.3 with the
pdo_mysql,redis,gdandexifextensions - Composer
- Node.js 24
- MySQL
- Redis
The tests do not need MySQL or Redis. Read Testing.
Install
-
Clone the repository and go into its folder.
-
Install the dependencies:
composer install npm install -
Create the environment file and the key:
cp .env.example .env php artisan key:generate -
Set these values in
.env:Variable Value APP_ENVlocalAPP_DEBUGtrueAPP_DOMAINlocalhostAPP_URLhttp://localhost:8000SESSION_DOMAINnullSESSION_SECURE_COOKIEfalse -
Create the tables and the example data:
php artisan migrate --seed -
Start Vite:
npm run dev -
In a second terminal, start the app:
php artisan serve -
If your change uses queued jobs, start a worker in a third terminal:
php artisan queue:work
The example data
The seeders create the user test@example.com with the password password.
Browsers send *.localhost to your own computer. Thus the public site of a seeded project is at http://<slug>.localhost:8000.
Commands
| Command | Use |
|---|---|
php artisan test |
Run all the PHP tests. |
php artisan test --filter=SomeTest |
Run one test class or method. |
npm run test:js |
Run the JavaScript tests. |
vendor/bin/pint |
Format the PHP code. |
npm run dev |
Start Vite with hot reload. |
npm run build |
Build the dashboard assets (public/build) and the widget (public/pilgrim.js). |
php artisan migrate |
Run the migrations. |
php artisan db:seed |
Add the example data. |
Rules for a change
The app repository has its own CONTRIBUTING.md. These are the main rules:
- Write the test first when you add behavior.
- Format the PHP code with Laravel Pint.
- Use explicit return types and parameter types.
- Use
env()only inconfig/. Useconfig()everywhere else. - Style the UI with Tailwind CSS classes and the
fp-*theme tokens. - Read
DESIGN_SYSTEM.mdbefore a UI change. - Update
ARCHITECTURE.mdin the same pull request when a change affects the architecture. Examples are the data model, a request surface, the tenancy rules, an auth guard and a build target. - Do not use Vue text interpolation in Blade views. Use props or a
.vuecomponent. The testtests/js/server-template.test.mjschecks this rule.
Security problems
Do not open a public issue for a security problem. Use the security advisory form of the repository.