Develop a full-stack Next.js 14+ application, named 'Auto Resolution Hub', using the App Router. The application must support multi-page navigation, user authentication with NextAuth.js, and database interaction via Drizzle ORM with PostgreSQL. Design the UI using Tailwind CSS for responsiveness.
**Core Functionality Requirements:**
1. **User Authentication**: Implement sign-up, sign-in, and session management using NextAuth.js. Users should be able to create and manage their profiles.
2. **Case Management**: Allow authenticated users to perform full CRUD operations on their vehicle cases. Each case should include details about the vehicle (make, model, year, VIN), a detailed problem description, current status (e.g., 'open', 'diagnosing', 'resolved', 'disputed'), associated dealership/shop information, and the date the problem started.
3. **Document & Media Upload**: Users must be able to upload multiple files (invoices, diagnostic reports, photos, videos) relevant to each case. Implement a file upload mechanism that simulates storage (e.g., storing file URLs/names in DB) and associates them with specific cases.
4. **Communication Logs**: For each case, users should be able to add and view communication logs (e.g., type of communication: phone, email, in-person; date; content of discussion) with service providers or other parties.
5. **Expert Network**: Display a list of independent automotive experts (mechanics, legal advisors). Provide a simple form for users to request consultation, capturing user contact info and a brief description of their need.
6. **Quote Request & Comparison**: Users can post a 'repair request' for a specific case, detailing the issue. Independent shops (or simulated shops) can submit quotes for these requests. Users should be able to view and compare received quotes within their case details.
7. **Resource Library**: Implement static pages offering comprehensive information on consumer rights, guides for resolving automotive disputes, and FAQs.
**Technical Implementation Details:**
* **Next.js App Router**: Organize pages, components, and API routes within the `app/` directory.
* **Database Schema (Drizzle ORM for PostgreSQL)**:
* `users`: `id`, `email` (unique), `password_hash`, `name`, `createdAt`, `updatedAt`.
* `vehicles`: `id`, `user_id` (FK to `users`), `make`, `model`, `year`, `vin` (unique), `license_plate`, `createdAt`, `updatedAt`.
* `cases`: `id`, `user_id` (FK to `users`), `vehicle_id` (FK to `vehicles`), `title`, `description`, `status` (`ENUM: 'open', 'diagnosing', 'resolved', 'disputed'`), `current_shop`, `problem_start_date`, `createdAt`, `updatedAt`.
* `documents`: `id`, `case_id` (FK to `cases`), `file_url`, `file_name`, `file_type`, `uploaded_at`.
* `communications`: `id`, `case_id` (FK to `cases`), `type` (`ENUM: 'phone', 'email', 'in-person'`), `date`, `content`.
* `experts`: `id`, `name`, `specialty`, `contact_info`, `description`.
* `quotes`: `id`, `case_id` (FK to `cases`), `shop_name`, `quote_amount` (decimal), `description`, `submitted_at`.
* **API Routes**: Create dedicated API routes for:
* `/api/auth/[...nextauth]`: Handled by NextAuth.js.
* `/api/cases`: GET (fetch all/user's cases), POST (create a new case).
* `/api/cases/[id]`: GET (fetch single case), PUT (update case), DELETE (delete case).
* `/api/documents`: POST (upload document and link to case).
* `/api/communications`: POST (add new communication log to case).
* `/api/experts`: GET (list all experts).
* `/api/quotes`: POST (submit a quote for a case), GET (fetch quotes for a specific case).
* **User Interface**: Implement the following pages and components, ensuring a clean and intuitive user experience with Tailwind CSS:
* `/`: Landing page with a call to action.
* `/dashboard`: User's personalized dashboard showing an overview of active cases and recent activities.
* `/cases`: A list page displaying all of the user's cases.
* `/cases/new`: A form for creating a new vehicle case.
* `/cases/[id]`: A detailed view page for a single case, including all associated documents, communication logs, and received quotes. Enable editing case details here.
* `/experts`: A page listing available independent experts.
* `/resources`: Static pages for the resource library content.
* `/profile`: User profile management page.
Ensure all CRUD operations are fully functional end-to-end, from the UI through the API routes to the database. The application should handle user authentication for protected routes and provide clear error messages.