You are tasked with building a full-stack MVP for a product authenticity verification application called 'Product Detective'. The goal is to help users identify if products, particularly from marketplaces like Etsy, are dropshipped from cheaper platforms like Temu or AliExpress. The application should be built using Next.js 14 with the App Router, Drizzle ORM for PostgreSQL, and styled with Tailwind CSS.
**Core Functionality:**
1. **User Authentication:** Allow users to register and log in via email and password.
2. **Product Submission:** Authenticated users can submit a product for verification. This involves either uploading an image file or providing a direct URL to a product image/page.
3. **Product Comparison (Mock):** The backend should process the submitted image/URL. For this MVP, instead of actual image recognition and web scraping of external sites, implement a mock service call that simulates finding similar products on platforms like Temu/AliExpress. This mock service should return a plausible (fake) similarity score, a potential source URL, and a lower price if 'found'.
4. **Verification Results Display:** Users should see the status of their submitted product (e.g., 'pending', 'verified', 'suspicious') and the comparison results, including any potential matches found by the mock service.
5. **User History:** A dashboard where users can view all their submitted products and their respective verification results.
6. **Reporting System:** Users should be able to report a product as suspicious, either from their own checks or from a public feed (if implemented).
**Technical Requirements & Architecture:**
* **Next.js 14 App Router:** All pages and API routes should be within the `app/` directory structure.
* **Database:** PostgreSQL, managed with Drizzle ORM. Define the schema in `drizzle/schema.ts`.
* `users` table: `id (uuid)`, `email (unique)`, `password_hash`, `created_at`, `updated_at`.
* `products_to_check` table: `id (uuid)`, `user_id (fk to users)`, `submitted_url (text, nullable)`, `submitted_image_url (text, nullable)`, `status (enum: 'pending', 'verified', 'suspicious')`, `created_at`, `updated_at`.
* `comparison_results` table: `id (uuid)`, `product_to_check_id (fk to products_to_check)`, `found_item_url (text)`, `found_item_price (numeric)`, `found_item_shop (text)`, `similarity_score (numeric)`, `created_at`.
* `reports` table: `id (uuid)`, `reported_product_id (fk to products_to_check)`, `reporting_user_id (fk to users)`, `reason (text)`, `status (enum: 'pending', 'reviewed')`, `created_at`.
* **API Routes:**
* `POST /api/auth/register`: Handles user registration.
* `POST /api/auth/login`: Handles user login and session management (e.g., using `next-auth` or a simple cookie-based approach).
* `POST /api/products/submit`: Accepts image file uploads (e.g., using `multer` or a serverless function compatible approach like `form-data` with streaming) or a URL, creates a `products_to_check` entry, and triggers the mock comparison service.
* `GET /api/products/[id]`: Retrieves details and comparison results for a specific product check.
* `GET /api/user/products`: Retrieves all products submitted by the authenticated user.
* `POST /api/reports`: Allows users to submit reports about suspicious products.
* **Pages:**
* `/`: A welcoming landing page with call-to-actions for login/signup and a brief explanation of the service.
* `/auth/login`: Login form.
* `/auth/register`: Registration form.
* `/dashboard`: The main user dashboard for submitting products and viewing their history.
* `/product/[id]`: A dynamic page to display detailed verification results for a specific product.
* **Styling:** Use Tailwind CSS for a clean, modern, and responsive UI.
* **Error Handling:** Implement robust error handling for API calls, form submissions, and data fetching.
* **Form Validations:** Client-side and server-side validation for all forms (e.g., using Zod).
* **Database Interactions:** All database operations must use Drizzle ORM.
* **Mock Comparison Service:** Create a simple internal utility function or API route that, when called, simulates a product comparison. It should return a hardcoded or randomly generated `comparison_results` entry after a short delay to mimic processing time.
* **Image Upload (Placeholder):** For MVP, if actual image storage (S3, Cloudinary) is too complex, use a simple base64 encoding for small images or store file paths that point to a public folder (for local development only). Clearly state this limitation if chosen.
**Instructions for AI:**
Develop the full project structure including all necessary files (`layout.tsx`, `page.tsx`, `api routes`, `drizzle schema`, `db config`, `components`). Provide example code for one complete flow (e.g., user registers, logs in, submits a product image, and views a mock result). Ensure all Drizzle ORM queries are correctly defined and used. Implement basic session management for authentication. Focus on a fully functional, end-to-end MVP, not just a UI or a single page application.