Common Commands

Quick reference for the most-used commands during development.

Backend (Laravel)

# Start everything (API + queue + logs + Vite)
composer dev

# Start API server only
php artisan serve

# Run migrations
php artisan migrate

# Run migrations + seeders
php artisan migrate --seed

# Reset database (drop all, re-migrate, re-seed)
php artisan migrate:fresh --seed

# Run queue worker
php artisan queue:listen

# Clear all caches
php artisan config:clear && php artisan cache:clear && php artisan route:clear

# Run tests
php artisan test

# Generate OpenAPI spec
php artisan openapi:generate

Frontend (React)

# Start dev server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Type check
npx tsc --noEmit

Marketing Site

# Start local server
cd marketing/public && php -S localhost:8000 router.php

Docker

# Start services (MySQL, Redis, Mailpit)
docker compose up -d

# Stop services
docker compose down

# View logs
docker compose logs -f

# Reset database (destroy volume)
docker compose down -v && docker compose up -d

Production

# Cache config/routes/views for performance
php artisan config:cache
php artisan route:cache
php artisan view:cache

# Run migrations in production
php artisan migrate --force

# Build frontend
cd frontend && npm run build