You are an expert full-stack developer tasked with building a Minimum Viable Product (MVP) for a personal finance management application called 'Inheritance Management Assistant'. This application will help users manage unexpected inheritance funds, set financial goals, and explore secure investment options. The MVP should be a multi-page application built with Next.js App Router (using the 'app/' directory structure). It needs a robust backend with API routes for full CRUD operations and a database managed by Drizzle ORM with PostgreSQL as the database. The application should be user-friendly and secure, focusing on the initial needs of someone who has just received an inheritance.
**Core Requirements:**
1. **Project Setup:**
* Use Next.js App Router (`app/` directory).
* Integrate Drizzle ORM with PostgreSQL.
* Set up basic UI components using a suitable library (e.g., Tailwind CSS with shadcn/ui for pre-built components).
2. **Database Schema (Drizzle ORM):**
* `users`: id (UUID, primary key), name, email (unique), passwordHash, createdAt, updatedAt.
* `inheritances`: id (UUID, primary key), userId (foreign key to `users`), source (e.g., 'Life Insurance', 'Bank Accounts', 'Property'), amount (decimal), receivedDate, createdAt, updatedAt.
* `debts`: id (UUID, primary key), userId (foreign key to `users`), type (e.g., 'Credit Card', 'Car Loan'), currentAmount (decimal), minimumPayment (decimal), dueDate, createdAt, updatedAt.
* `financialGoals`: id (UUID, primary key), userId (foreign key to `users`), name, targetAmount (decimal), deadline, status ('Active', 'Completed'), createdAt, updatedAt.
* `accounts`: id (UUID, primary key), userId (foreign key to `users`), name (e.g., 'Savings Account', 'HYSA'), type, currentBalance (decimal), institutionName, createdAt, updatedAt.
3. **API Routes (app/api/...):**
* Implement full CRUD operations for all entities (`users`, `inheritances`, `debts`, `financialGoals`, `accounts`).
* Example: `/api/inheritances` (GET, POST), `/api/inheritances/[id]` (GET, PUT, DELETE).
* Ensure proper request validation and error handling.
* User authentication should be implemented (e.g., using NextAuth.js or a custom JWT solution).
4. **Frontend (app/ directory):**
* **Authentication Pages:** `app/login`, `app/register`.
* **Dashboard (`app/dashboard`):** Overview of user's financial status (total inheritance, total debt, net worth, upcoming goals).
* **Inheritance Management (`app/dashboard/inheritances`):**
* List all inheritance entries.
* Form to add new inheritance entries (CRUD).
* View details of a specific inheritance.
* **Debt Management (`app/dashboard/debts`):**
* List all debts.
* Form to add new debt entries (CRUD).
* Option to mark debts as 'Paid Off'.
* Calculate total debt and minimum monthly payments.
* **Financial Goals (`app/dashboard/goals`):**
* List user's financial goals.
* Form to add new goals (CRUD).
* Track progress towards goals.
* **Accounts & Savings (`app/dashboard/accounts`):**
* List user's bank/savings accounts.
* Form to add new accounts (CRUD).
* Display current balances.
* **Educational Content/Guidance:** A dedicated page (`app/resources`) that provides information on different types of savings accounts (HYSA, Money Market) and basic investment concepts. This can start with static content and evolve.
5. **Key Features to Implement in MVP:**
* Secure user registration and login.
* Ability to input and view all inheritance details.
* Ability to input and view all debt details, with a feature to mark them as paid.
* Basic financial goal setting and tracking.
* A clear display of current account balances.
* A section providing educational information about savings options like High-Yield Savings Accounts (HYSAs) and Money Market Accounts (MMAs).
**DO NOT:**
* Generate only a landing page.
* Generate only a simple SPA without proper backend and database integration.
* Implement complex investment strategies or real-time market data feeds in the MVP.
* Use client-side state management libraries like Redux; rely on Next.js context API or server components for state management where appropriate.
The generated code should be well-structured, commented, and follow best practices for Next.js, Drizzle ORM, and PostgreSQL development.