Local Development Setup for Reisetagebuch
This guide will help you set up your own instance of Reisetagebuch.
Prerequisites
The dev-setup of Reisetagebuch uses Laravel Sail for local development. Ensure you have the following installed:
- PHP >= 8.1
- Composer
- Node.js and npm
- Docker
1. Clone the Repository
git clone https://github.com/herrlevin/reisetagebuch.git
cd reisetagebuch2. Install PHP Dependencies
composer install3. Install Node Dependencies
npm install4. Environment Configuration
Copy the environment file and configure it:
cp .env.example .envEdit .env with your database and other settings:
APP_NAME=Reisetagebuch
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost5. Generate Application Key
php artisan key:generate6. Start the Sail Environment
./vendor/bin/sail up -d7. Migrate and Seed the Database (Optional)
For development, you can seed with sample data:
./vendor/bin/sail artisan migrate --seed8. Create Passport Keys
./vendor/bin/sail artisan passport:keys9. Build Assets
npm run buildYou can also run the following for continuous development:
npm run devVisit http://localhost to see the application.
INFO
Laravel Telescope is enabled in local environment for debugging. Configure in config/telescope.php. You can access it at http://localhost/telescope.
Testing
Run the test suite:
./vendor/bin/sail artisan testQueue Workers
Queue jobs are processed by Laravel Horizon, which runs automatically as its own Sail service (horizon) whenever you run sail up -d. The scheduler (schedule:work) also runs as its own Sail service (scheduler), so cron-based jobs run without any extra setup.
You can monitor queues, throughput and failed jobs on the Horizon dashboard at http://localhost/horizon (requires an admin user — there's no CLI command for this yet, so set is_admin to true on your user's row in the users table).
If you need to restart the workers after changing job or queue code, run:
./vendor/bin/sail artisan horizon:terminateMobile Apps (Capacitor)
The iOS and Android apps are built with Capacitor, wrapping a standalone build of the SPA (separate from the Laravel-served web build, via vite.capacitor.config.mts). To build and sync the native projects:
npm ci
npm run build:capacitor
npx cap syncnpm run build:capacitor builds resources/capacitor into dist-capacitor, which is the webDir the native shells load. npm run cap:sync runs both the build and sync steps together.
After syncing, open the native projects with npm run cap:ios or npm run cap:android.
OSM Import (Geofabrik)
If you want to test the Geofabrik import locally, Sail's default PHP image doesn't include the osmium CLI it depends on. Install it once per container via:
docker exec -it reisetagebuch-horizon-1 bash
# inside the container:
apt-get update && apt-get install -y osmium-tool