Owner: Dev Team | Last Updated: 2026-02-21 | Status: Current
Prerequisites: Make sure all tools from Prerequisites are installed.
Step-by-step instructions for setting up a local development environment for Booking.
| Requirement | Value |
|---|---|
| PHP | 8.2+ |
| Node.js | 18.17.0+ |
| MySQL | 8.0+ |
| Redis | Latest stable |
| Disk Space | ~500 MB (without vendor/node_modules) |
| Estimated Time | 15-30 minutes |
git clone git@github.com:bikerentnyc/booking.git
cd booking
composer install
Expected output:
Installing dependencies from lock file
...
Package operations: ~120 installs
...
Generating optimized autoload files
> @php artisan package:discover --ansi
npm install
Expected output:
added ~800 packages in 30s
Copy the example file and generate the application key:
cp .env.example .env
php artisan key:generate
Open .env and configure the required variables:
# Application
APP_NAME=Booking
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost:8000
APP_TIMEZONE=UTC
CLIENT_TIMEZONE=America/New_York
# Database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=booking
DB_USERNAME=root
DB_PASSWORD=your_password
# Redis
CACHE_STORE=redis
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
# Queue (for local development)
QUEUE_CONNECTION=database
# Stripe (test keys)
STRIPE_KEY=pk_test_...
STRIPE_SECRET=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Tax
TAX_RATE=8.875
Note: For the full list of environment variables, see Environment Variables.
mysql -u root -p -e "CREATE DATABASE booking CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
Or via Docker:
docker-compose up -d db
Note: Docker-compose creates MySQL on port 3307 (not the standard 3306). Update
DB_PORT=3307in.envwhen using Docker.
php artisan migrate --seed
Expected output:
Migration table created successfully.
Running migrations...
...
Database seeding completed successfully.
Warning: The seeder creates initial users. Make sure the database is empty before the first run.
Option A -- Single command (recommended):
composer run dev
This command starts the following in parallel via concurrently:
php artisan serve -- Laravel dev server (port 8000)php artisan queue:listen --tries=1 -- Queue workerphp artisan pail --timeout=0 -- Live log viewernpm run dev -- Vite dev server (port 5173)Option B -- Separately (in different terminals):
# Terminal 1: Laravel server
php artisan serve
# Terminal 2: Vite frontend
npm run dev
# Terminal 3: Queue worker
php artisan queue:listen --tries=1
curl http://localhost:8000/api/v1/health-check
# Expected: {"status":"ok"} or a similar response
Open a browser and navigate to:
http://localhost:8000
You should see the login page.
php artisan test
# or
./vendor/bin/phpunit
| Problem | Cause | Solution |
|---|---|---|
SQLSTATE[HY000] [2002] |
MySQL is not running | Start MySQL: sudo systemctl start mysql |
ECONNREFUSED Redis |
Redis is not running | Start Redis: sudo systemctl start redis |
Port 8000 in use |
Port is occupied | Use php artisan serve --port=8001 |
Vite manifest not found |
Frontend is not built | Run npm run dev or npm run build |
Class not found |
Autoload is outdated | Run composer dump-autoload |
Permission denied on storage |
File permissions | chmod -R 775 storage bootstrap/cache |
Migration failed |
Missing DATABASE_URL | Check the .env file |
| Date | Author | Change |
|---|---|---|
| 2026-02-21 | Documentation Team | Initial creation |
Prev: Prerequisites | Next: Quickstart | Up: Getting Started