Documentation menu

Local development

Run all three parts on your computer to try NiceServe or to change the code. You need the tools from Requirements: PHP 8.4, Composer, MySQL 8.4, Node 24 and Flutter with an Android emulator (or an iOS simulator on a Mac).

1. API

Create an empty MySQL database (for example niceserve), then:

cd backend
cp .env.example .env          # set DB_DATABASE, DB_USERNAME, DB_PASSWORD
composer install
php artisan key:generate
php artisan migrate --seed
php artisan storage:link
php artisan serve             # http://127.0.0.1:8000

In two more terminals:

php artisan queue:work        # emails, thumbnails, notifications
php artisan schedule:work     # expiring requests, reminders, auto-confirm

To fill the app with sample providers, bookings and chats, run php artisan demo:seed (see Demo data and demo mode).

MAIL_MAILER=log in .env writes emails, including sign-up codes, to storage/logs/laravel.log instead of sending them.

2. Admin panel

cd admin
npm ci
npm run dev                   # http://localhost:5173/admin/

Sign in with admin@example.com / password. The dev server forwards /api to http://127.0.0.1:8000; set VITE_API_PROXY to use another address.

3. App

Start an emulator, then:

cd mobile
flutter pub get
dart run build_runner build -d
flutter run --flavor dev -t lib/main_dev.dart

The dev flavor talks to http://10.0.2.2:8000/api/v1 on the Android emulator (that address is your computer) and http://127.0.0.1:8000/api/v1 on the iOS simulator. On a real phone on the same Wi-Fi, pass your computer's address:

flutter run --flavor dev -t lib/main_dev.dart --dart-define=API_BASE_URL=http://192.168.1.10:8000/api/v1

and start the API with php artisan serve --host=0.0.0.0.

The dev app (NiceServe Dev) and the production app can be installed side by side.

Checks

The same checks run in CI. Run them before you commit:

Part Commands
API vendor/bin/pint --test, vendor/bin/phpstan analyse, vendor/bin/pest
Admin npm run lint, npm run typecheck, npm run test -- --run, npm run build
App flutter analyze, flutter test

The API tests use a separate MySQL database, servicemarket_testing (see backend/phpunit.xml). Create it once and give your database user access.

Where to go from here