You are an expert full-stack developer. Your task is to build a comprehensive MVP for a web application called 'Divorce Decision Assistant' using Next.js 14+ with the App Router, Drizzle ORM for PostgreSQL, and Tailwind CSS for styling. The application will help users compare financial scenarios post-divorce, specifically focusing on housing decisions (keeping the house vs. getting an apartment).Core Functionality:1. User Authentication: Implement secure user registration and login using NextAuth.js or a simple email/password system.2. Financial Profile Management: Users should be able to create and manage their financial profiles, including income sources, recurring expenses, assets (house, car, savings), and debts (mortgage, loans).3. Scenario Creation & Comparison: * Allow users to define at least two distinct scenarios: 'Keep the House' and 'Get an Apartment'. * For 'Keep the House' scenario: input current house value, remaining mortgage, potential equity buyout loan details, estimated maintenance costs (DIY vs. professional), property taxes, and home insurance. * For 'Get an Apartment' scenario: input estimated rent, utility costs, moving expenses, and potential proceeds from selling the house (if applicable in a sub-scenario). * The system should calculate and display key financial metrics for each scenario: monthly disposable income, projected net worth over 1, 3, and 5 years, and a breakdown of major expenses. * Implement a 'What If' analysis for unexpected house repairs, allowing users to input a potential large expense and see its impact on the 'Keep the House' scenario's disposable income and net worth.4. Reporting & Visualization: Present the comparison results clearly, ideally with simple charts or side-by-side tables.Technical Requirements:1. Next.js 14+ App Router: Structure the application entirely within the `app/` directory. * `app/page.tsx`: Landing page. * `app/dashboard/page.tsx`: User's main dashboard after login. * `app/profile/page.tsx`: User profile and financial profile management. * `app/scenarios/create/page.tsx`: Form for creating a new scenario. * `app/scenarios/[id]/page.tsx`: Detailed view and comparison for a specific scenario. * `app/api/auth/[...nextauth]/route.ts`: For authentication. * `app/api/financial-profile/route.ts`: API routes for managing financial profiles. * `app/api/scenarios/route.ts`: API routes for managing scenarios. * `app/api/scenarios/[id]/route.ts`: Specific API route for individual scenario CRUD. * Use Server Components where appropriate for data fetching and rendering, and Client Components for interactivity (forms, charts).2. Drizzle ORM & PostgreSQL: * Define a `schema.ts` file for Drizzle. * Database Schema: * `users`: `id` (uuid), `email` (string, unique), `passwordHash` (string), `createdAt` (timestamp), `updatedAt` (timestamp). * `financial_profiles`: `id` (uuid), `userId` (uuid, foreign key to users.id), `name` (string, e.g., 'My Current Finances'), `income` (numeric), `monthlyExpenses` (numeric), `createdAt` (timestamp), `updatedAt` (timestamp). * `assets`: `id` (uuid), `profileId` (uuid, foreign key to financial_profiles.id), `name` (string, e.g., 'Main House', 'Savings Account'), `type` (enum 'real_estate', 'liquid', 'vehicle', etc.), `value` (numeric), `mortgageBalance` (numeric, nullable), `createdAt` (timestamp), `updatedAt` (timestamp). * `debts`: `id` (uuid), `profileId` (uuid, foreign key to financial_profiles.id), `name` (string), `type` (enum 'mortgage', 'loan', 'credit_card', etc.), `balance` (numeric), `monthlyPayment` (numeric), `interestRate` (numeric), `createdAt` (timestamp), `updatedAt` (timestamp). * `scenarios`: `id` (uuid), `userId` (uuid, foreign key to users.id), `name` (string, e.g., 'Keep House', 'Get Apartment'), `description` (text, nullable), `type` (enum 'house', 'apartment'), `rentOrMortgagePayment` (numeric), `estimatedMaintenance` (numeric), `otherMonthlyCosts` (numeric), `equityLoanAmount` (numeric, nullable), `potentialSellProceeds` (numeric, nullable), `createdAt` (timestamp), `updatedAt` (timestamp). * `scenario_details`: `id` (uuid), `scenarioId` (uuid, foreign key to scenarios.id), `key` (string, e.g., 'unexpected_repair_cost', 'move_in_cost'), `value` (string), `createdAt` (timestamp), `updatedAt` (timestamp). * Implement Drizzle migrations. * Establish relationships between tables (e.g., `users` to `financial_profiles`, `financial_profiles` to `assets`/`debts`, `users` to `scenarios`).3. API Routes (CRUD): * Implement full CRUD operations for `financial_profiles`, `assets`, `debts`, and `scenarios` using Next.js API routes (e.g., `GET`, `POST`, `PUT`, `DELETE`). * Ensure proper data validation and error handling for all API endpoints. * Protect API routes with authentication checks.4. UI & Styling: * Use Tailwind CSS for all styling. * Create responsive layouts. * Design clear and user-friendly forms for data input. * For scenario comparison, use a dual-column layout to show metrics side-by-side. Include basic visual elements like progress bars or simple bar charts for key comparisons (e.g., disposable income).5. Project Structure: * `src/lib/db.ts`: Drizzle client initialization. * `src/lib/schema.ts`: Drizzle schema definitions. * `src/components/`: Reusable React components (e.g., `FinancialInputForm`, `ScenarioCard`, `ComparisonTable`). * `src/utils/calculations.ts`: Logic for financial calculations (disposable income, net worth projections).Deliverables:Provide all necessary code files, including `package.json` with dependencies, Drizzle configuration, database schema, API route handlers, page components, and client-side components. Assume a basic `.env` file for database connection string and authentication secrets. Focus on making the MVP fully functional with core features rather than exhaustive styling, but ensure usability. The generated code sh