Develop a full-stack Next.js 14 application using the App Router (app/ directory), TypeScript, Tailwind CSS for styling, and Drizzle ORM with a PostgreSQL database. This application will serve as an MVP for a vacation rental direct booking engine. The solution must implement a multi-page architecture with comprehensive CRUD functionality via API routes.Database Schema (Drizzle ORM):1. **Users Table:** * `id`: Primary key, UUID. * `email`: String, unique, required. * `passwordHash`: String, required. * `name`: String, required. * `role`: Enum ('owner', 'guest'), default 'owner'. * `createdAt`: Timestamp, default now. * `updatedAt`: Timestamp, default now on update.2. **Rentals Table:** * `id`: Primary key, UUID. * `ownerId`: UUID, foreign key referencing Users.id. * `title`: String, required. * `description`: Text, required. * `address`: String, required. * `pricePerNight`: Numeric, required. * `imageUrls`: JSONB array of strings (for multiple image URLs), required. * `createdAt`: Timestamp, default now. * `updatedAt`: Timestamp, default now on update.3. **Bookings Table:** * `id`: Primary key, UUID. * `rentalId`: UUID, foreign key referencing Rentals.id. * `guestName`: String, required. * `guestEmail`: String, required. * `checkInDate`: Date, required. * `checkOutDate`: Date, required. * `totalPrice`: Numeric, required. * `paymentStatus`: Enum ('pending', 'paid', 'cancelled'), default 'pending'. * `createdAt`: Timestamp, default now. * `updatedAt`: Timestamp, default now on update.Application Pages (App Router):1. `/`: Public homepage with a brief description and a call-to-action to list a property or browse.2. `/login`: User authentication page.3. `/register`: User registration page.4. `/dashboard`: Owner's dashboard. Displays a list of their owned rentals and a list of all bookings for these rentals. Includes links to add new rentals and manage existing ones.5. `/rentals/new`: Form for owners to create a new rental listing.6. `/rentals/[id]/edit`: Form for owners to edit an existing rental listing (pre-populated with current data).7. `/rentals/[id]`: Public detail page for a specific rental. Includes rental description, price, images, and an interactive date picker for guests to select check-in/check-out dates. Below the date picker, a booking form for guest details (name, email) and a 'Book Now' button.8. `/bookings/confirmation/[id]`: Page displaying booking confirmation details after a successful booking, including a placeholder for payment status.API Routes (Next.js API Routes within `app/api`):1. `/api/auth/login` (POST): Handles user login, returns a token (e.g., JWT).2. `/api/auth/register` (POST): Handles user registration, creates a new user.3. `/api/rentals` (GET): Retrieves all rentals (or rentals owned by authenticated user).4. `/api/rentals` (POST): Creates a new rental (authenticated owner only).5. `/api/rentals/[id]` (GET): Retrieves a single rental by ID.6. `/api/rentals/[id]` (PUT/PATCH): Updates an existing rental by ID (authenticated owner only).7. `/api/rentals/[id]` (DELETE): Deletes a rental by ID (authenticated owner only).8. `/api/bookings` (POST): Creates a new booking for a specific rental. Must check for date availability.9. `/api/bookings/owner` (GET): Retrieves all bookings for rentals owned by the authenticated user.10. `/api/bookings/[id]/status` (PATCH): Updates the paymentStatus of a specific booking (authenticated owner only).Key Functionality Details:* **Authentication:** Implement basic JWT-based authentication for owner-specific routes. Store token in HTTP-only cookies.* **Rental Availability:** The booking form on `/rentals/[id]` must dynamically show available dates and prevent selection of already booked periods. Implement a server-side check for this when processing booking requests.* **Image Upload (Mock):** For `imageUrls`, provide a simple text input for URLs, or a mock upload component that simply stores a URL string. No actual file upload handling needed for MVP.* **Payment Simulation:** The 'Book Now' button on `/rentals/[id]` will trigger a booking creation. Upon successful creation, the `paymentStatus` in the database should be set to 'paid' for MVP purposes, simulating a successful payment gateway interaction.* **Error Handling:** Implement basic error handling for API responses and display user-friendly messages.* **Styling:** Use Tailwind CSS for a clean, modern, and mobile-responsive UI across all pages.* **Environment Variables:** Use `.env` for database connection string and JWT secret.The AI should generate the complete project structure, Drizzle schema, API route handlers, page components, and utility functions to make this MVP fully functional. Focus on robust backend logic and clear separation of concerns.