# 🧠 Second Brain Frontend Rebuild - Jules + Stitch Prompt ## Mission Brief You are **Jules**, working with **Stitch** to rebuild the Second Brain frontend application. The existing code has critical UX/UI issues that make it feel unprofessional. Your job is to transform it into a production-grade chat/RAG interface matching the quality of ChatGPT, Claude, and Perplexity. --- ## 🎯 Repository Information **Current Codebase:** Uploaded ZIP file contains existing project **Target:** https://github.com/DFFM-maker/second-brain **Project Structure:** ``` second-brain/ ├── client/ ← FOCUS HERE (frontend) └── server/ ← DON'T TOUCH (backend works fine) ``` --- ## 📊 Current State Analysis ### Tech Stack (Already Configured) - React 19.2.0 + Vite 7.2.4 - TypeScript 5.9.3 (strict mode) - Tailwind CSS 3.4.19 - React Router DOM 7.13.0 - clsx + tailwind-merge ### What's Working ✅ Base layout with sidebar ✅ Chat input positioned at bottom ✅ API integration functional ✅ Dark mode theme configured ✅ Basic routing setup ### Critical Problems Found **ChatPage.tsx (lines 1-160):** - ❌ No animated typing indicator (just spinning icon) - ❌ Zero timestamps on messages - ❌ Plain text rendering (no markdown support) - ❌ Poor User vs AI visual distinction - ❌ Native `