# ST Trip Development Baseline

## Runtime baseline
- PHP: 8.2.x (project constraint: ^8.2)
- Laravel: 12.x
- MySQL: 8.4 LTS target
- Next.js: 16.x
- React: 19.x
- TypeScript: current Next.js-compatible 5.x
- Node.js: 22 LTS recommended

## Architecture
Next.js frontend -> Laravel REST API -> MySQL.

## Phase 1 started
1. Laravel 12 dependency baseline.
2. Next.js 16 dependency baseline.
3. Hotel listing/detail pages now prefer Laravel API with temporary static-data fallback.
4. API base URL is configured with NEXT_PUBLIC_API_URL.
5. Booking-engine schema added: room inventory, hotel bookings, booking rooms and polymorphic payments.

## Local setup
Backend:
1. Use PHP 8.2 CLI/FPM.
2. `composer update --with-all-dependencies`
3. Configure MySQL in `.env`.
4. `php artisan migrate`
5. `php artisan serve`

Frontend:
1. Use Node.js 22 LTS.
2. Copy `.env.example` to `.env.local` and set the Laravel API URL.
3. Remove old install artifacts if upgrading: `rm -rf node_modules .next`.
4. `npm install` (or standardize on pnpm and regenerate one lockfile).
5. `npm run build`
6. `npm run dev`

## Next development step
Implement server-side hotel search/filters and date-based room availability, then checkout/booking transaction APIs.
