# Local development

Run Open Core HR on your own computer for development and testing.

Install compatible PHP, Composer, MySQL and Node.js. Use a separate local database with demonstration data only.

Follow [preparation](https://czappstudio.com/ar/docs/installation/prepare), using `composer install` with development dependencies instead of `--no-dev`. Set `APP_ENV=local`, configure a new local database, and follow [configuration](https://czappstudio.com/ar/docs/installation/configuration).

```bash
# Terminal 1, from backend
php artisan serve --no-reload --host=127.0.0.1 --port=8000

# Terminal 2, from backend
npm run dev
```

The `--no-reload` option preserves the environment needed by the PDF subprocess on Windows. Restart the server after changing `.env`.

Set `APP_URL=http://localhost:8000`. Run additional services when testing asynchronous or real-time features. Use local mail capture instead of customer email accounts.

Use a real web server and compiled assets for customer hosting. Keep local configuration and uploads out of source packages.
