You are an expert full-stack developer. Your task is to build a comprehensive MVP for a 'Side Project Launchpad' application using Next.js 14 with the App Router, React, Tailwind CSS for styling, and Drizzle ORM with a PostgreSQL database (or SQLite for local development). The application should be a multi-page, full-stack solution, not a simple landing page or SPA. It must implement full CRUD (Create, Read, Update, Delete) functionality for two main entities: 'Projects' and 'Tasks'.
**Application Goal:** To provide solo developers with a focused platform to manage their side projects, track tasks, and monitor progress without the overhead of enterprise tools.
**Tech Stack:**
* **Framework:** Next.js 14 (App Router)
* **Frontend:** React
* **Styling:** Tailwind CSS
* **Database:** PostgreSQL (for production, use SQLite for local development via DrizzleKit)
* **ORM:** Drizzle ORM
**Database Schema:**
1. **`projects` table:**
* `id`: UUID (Primary Key, auto-generated)
* `title`: VARCHAR(255), NOT NULL
* `description`: TEXT, NULLABLE
* `techStack`: TEXT, NULLABLE (e.g., 'Next.js, Tailwind CSS, Drizzle')
* `createdAt`: TIMESTAMP, DEFAULT CURRENT_TIMESTAMP
* `updatedAt`: TIMESTAMP, DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
2. **`tasks` table:**
* `id`: UUID (Primary Key, auto-generated)
* `projectId`: UUID, NOT NULL (Foreign Key referencing `projects.id`)
* `title`: VARCHAR(255), NOT NULL
* `description`: TEXT, NULLABLE
* `status`: ENUM('Todo', 'In Progress', 'Done'), NOT NULL, DEFAULT 'Todo'
* `createdAt`: TIMESTAMP, DEFAULT CURRENT_TIMESTAMP
* `updatedAt`: TIMESTAMP, DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
**Core Functionality & Pages (App Router):**
1. **Homepage (`/`):**
* Displays a list of all existing projects.
* Each project card should show its title, a short description, and a link to its detail page.
* A button/link to create a new project.
2. **New Project Page (`/projects/new`):**
* A form to create a new project (title, description, techStack).
* On successful creation, redirect to the project's detail page.
3. **Project Detail Page (`/projects/[id]`):**
* Displays all details of a specific project (title, description, techStack, createdAt, updatedAt).
* Displays a list of tasks associated with this project, grouped by status (Todo, In Progress, Done).
* Each task item should show its title, status, and have buttons to edit or delete the task.
* A button/link to add a new task to this project.
* Buttons/links to edit or delete the project itself.
4. **Edit Project Page (`/projects/[id]/edit`):**
* A form pre-filled with the existing project data.
* Allows updating project title, description, and techStack.
* On successful update, redirect to the project's detail page.
5. **New Task Page (`/projects/[id]/tasks/new`):**
* A form to create a new task for the specific project (title, description, status).
* On successful creation, redirect to the project's detail page.
6. **Edit Task Page (`/tasks/[taskId]/edit`):**
* A form pre-filled with the existing task data.
* Allows updating task title, description, and status.
* On successful update, redirect to the parent project's detail page.
**API Routes (`app/api` directory):**
1. **Project API (`/api/projects` and `/api/projects/[id]`):**
* `GET /api/projects`: Get all projects.
* `POST /api/projects`: Create a new project.
* `GET /api/projects/[id]`: Get a single project along with its associated tasks.
* `PUT /api/projects/[id]`: Update an existing project.
* `DELETE /api/projects/[id]`: Delete a project and all its associated tasks (cascade delete).
2. **Task API (`/api/tasks` and `/api/tasks/[taskId]`):**
* `POST /api/projects/[projectId]/tasks`: Create a new task for a specific project.
* `PUT /api/tasks/[taskId]`: Update an existing task.
* `DELETE /api/tasks/[taskId]`: Delete a specific task.
**Implementation Details:**
* Set up Drizzle ORM for database interactions. Ensure `drizzle.config.ts` and `db/schema.ts` are correctly configured.
* Implement database connection and queries using Drizzle.
* Use server components and client components appropriately. Forms should likely be client components, while data fetching can occur in server components or server actions.
* Implement basic form validation for `title` fields (e.g., cannot be empty).
* Provide clear loading states and error handling where applicable.
* Ensure all necessary environmental variables for database connection are mentioned (e.g., `DATABASE_URL`).
* Include a `package.json` with all required dependencies.
* Use a consistent, clean file structure within the `app/` directory.
**Output Requirements:**
Provide the full, executable code for this MVP. This includes:
* `package.json`
* `.env.example`
* `tailwind.config.ts`
* `drizzle.config.ts`
* `db/schema.ts`
* `db/index.ts` (Drizzle client)
* All necessary Next.js pages and API routes (`app/**/page.tsx`, `app/api/**/route.ts`)
* Any necessary shared components or utility files.
The code should be well-commented and structured for readability and maintainability. Focus on functional correctness over elaborate styling, but use Tailwind CSS for basic layout and visual distinction.