diff --git a/web/README.md b/web/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..01b1cd2d6adbf7aea13c1c69e7ab1208fc2b15ad
--- /dev/null
+++ b/web/README.md
@@ -0,0 +1,11 @@
+
+ # Clare AI Tutor UI Redesign (Copy)
+
+ This is a code bundle for Clare AI Tutor UI Redesign (Copy). The original project is available at https://www.figma.com/design/yC1iBsNtBGpBH8sXO43uah/Clare-AI-Tutor-UI-Redesign--Copy-.
+
+ ## Running the code
+
+ Run `npm i` to install the dependencies.
+
+ Run `npm run dev` to start the development server.
+
\ No newline at end of file
diff --git a/web/index.html b/web/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..603ccaf3717df1d5a4b76ec20d1d9709c23124cf
--- /dev/null
+++ b/web/index.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ Clare AI Tutor UI Redesign (Copy)
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/web/package.json b/web/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..a759f777c5b701895d46305523224b0b3e3110cf
--- /dev/null
+++ b/web/package.json
@@ -0,0 +1,59 @@
+
+ {
+ "name": "Clare AI Tutor UI Redesign (Copy)",
+ "version": "0.1.0",
+ "private": true,
+ "dependencies": {
+ "@radix-ui/react-accordion": "^1.2.3",
+ "@radix-ui/react-alert-dialog": "^1.1.6",
+ "@radix-ui/react-aspect-ratio": "^1.1.2",
+ "@radix-ui/react-avatar": "^1.1.3",
+ "@radix-ui/react-checkbox": "^1.1.4",
+ "@radix-ui/react-collapsible": "^1.1.3",
+ "@radix-ui/react-context-menu": "^2.2.6",
+ "@radix-ui/react-dialog": "^1.1.6",
+ "@radix-ui/react-dropdown-menu": "^2.1.6",
+ "@radix-ui/react-hover-card": "^1.1.6",
+ "@radix-ui/react-label": "^2.1.2",
+ "@radix-ui/react-menubar": "^1.1.6",
+ "@radix-ui/react-navigation-menu": "^1.2.5",
+ "@radix-ui/react-popover": "^1.1.6",
+ "@radix-ui/react-progress": "^1.1.2",
+ "@radix-ui/react-radio-group": "^1.2.3",
+ "@radix-ui/react-scroll-area": "^1.2.3",
+ "@radix-ui/react-select": "^2.1.6",
+ "@radix-ui/react-separator": "^1.1.2",
+ "@radix-ui/react-slider": "^1.2.3",
+ "@radix-ui/react-slot": "^1.1.2",
+ "@radix-ui/react-switch": "^1.1.3",
+ "@radix-ui/react-tabs": "^1.1.3",
+ "@radix-ui/react-toggle": "^1.1.2",
+ "@radix-ui/react-toggle-group": "^1.1.2",
+ "@radix-ui/react-tooltip": "^1.1.8",
+ "class-variance-authority": "^0.7.1",
+ "clsx": "*",
+ "cmdk": "^1.1.1",
+ "embla-carousel-react": "^8.6.0",
+ "input-otp": "^1.4.2",
+ "lucide-react": "^0.487.0",
+ "next-themes": "^0.4.6",
+ "react": "^18.3.1",
+ "react-day-picker": "^8.10.1",
+ "react-dom": "^18.3.1",
+ "react-hook-form": "^7.55.0",
+ "react-resizable-panels": "^2.1.7",
+ "recharts": "^2.15.2",
+ "sonner": "^2.0.3",
+ "tailwind-merge": "*",
+ "vaul": "^1.1.2"
+ },
+ "devDependencies": {
+ "@types/node": "^20.10.0",
+ "@vitejs/plugin-react-swc": "^3.10.2",
+ "vite": "6.3.5"
+ },
+ "scripts": {
+ "dev": "vite",
+ "build": "vite build"
+ }
+ }
\ No newline at end of file
diff --git a/web/src/.DS_Store b/web/src/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..70cfb8d2d8d3d43ba7286d6a132d6d051f1a2214
Binary files /dev/null and b/web/src/.DS_Store differ
diff --git a/web/src/App.tsx b/web/src/App.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..d961f4ee3ca367995065a4e96f424af2fa95f71c
--- /dev/null
+++ b/web/src/App.tsx
@@ -0,0 +1,377 @@
+import React, { useState, useEffect } from 'react';
+import { Header } from './components/Header';
+import { LeftSidebar } from './components/LeftSidebar';
+import { ChatArea } from './components/ChatArea';
+import { RightPanel } from './components/RightPanel';
+import { FloatingActionButtons } from './components/FloatingActionButtons';
+import { Menu, X, User } from 'lucide-react';
+import { Button } from './components/ui/button';
+import { Toaster } from './components/ui/sonner';
+import { ChevronLeft, ChevronRight } from 'lucide-react';
+import { toast } from 'sonner';
+
+export interface Message {
+ id: string;
+ role: 'user' | 'assistant';
+ content: string;
+ timestamp: Date;
+ references?: string[];
+ sender?: GroupMember; // For group chat
+}
+
+export interface User {
+ name: string;
+ email: string;
+}
+
+export interface GroupMember {
+ id: string;
+ name: string;
+ email: string;
+ avatar?: string;
+ isAI?: boolean;
+}
+
+export type SpaceType = 'individual' | 'group';
+
+export type FileType = 'syllabus' | 'lecture-slides' | 'literature-review' | 'other';
+
+export interface UploadedFile {
+ file: File;
+ type: FileType;
+}
+
+export type LearningMode = 'concept' | 'socratic' | 'exam' | 'assignment' | 'summary';
+export type Language = 'auto' | 'en' | 'zh';
+
+function App() {
+ const [isDarkMode, setIsDarkMode] = useState(() => {
+ const saved = localStorage.getItem('theme');
+ return saved === 'dark' || (!saved && window.matchMedia('(prefers-color-scheme: dark)').matches);
+ });
+ const [user, setUser] = useState(null);
+ const [messages, setMessages] = useState([
+ {
+ id: '1',
+ role: 'assistant',
+ content: "đ Hi! I'm Clare, your AI teaching assistant for Module 10 â Responsible AI. I'm here to help you learn through personalized tutoring. Feel free to ask me anything about the course materials, or upload your documents to get started!",
+ timestamp: new Date(),
+ }
+ ]);
+ const [learningMode, setLearningMode] = useState('concept');
+ const [language, setLanguage] = useState('auto');
+ const [uploadedFiles, setUploadedFiles] = useState([]);
+ const [memoryProgress, setMemoryProgress] = useState(36);
+ const [leftSidebarOpen, setLeftSidebarOpen] = useState(false);
+ const [rightPanelOpen, setRightPanelOpen] = useState(false);
+ const [rightPanelVisible, setRightPanelVisible] = useState(true);
+ const [spaceType, setSpaceType] = useState('individual');
+ const [exportResult, setExportResult] = useState('');
+ const [resultType, setResultType] = useState<'export' | 'quiz' | 'summary' | null>(null);
+
+ // Mock group members
+ const [groupMembers] = useState([
+ { id: 'clare', name: 'Clare AI', email: 'clare@ai.assistant', isAI: true },
+ { id: '1', name: 'Sarah Johnson', email: 'sarah.j@university.edu' },
+ { id: '2', name: 'Michael Chen', email: 'michael.c@university.edu' },
+ { id: '3', name: 'Emma Williams', email: 'emma.w@university.edu' },
+ ]);
+
+ useEffect(() => {
+ document.documentElement.classList.toggle('dark', isDarkMode);
+ localStorage.setItem('theme', isDarkMode ? 'dark' : 'light');
+ }, [isDarkMode]);
+
+ const handleSendMessage = (content: string) => {
+ if (!content.trim() || !user) return;
+
+ // In group mode, add sender info
+ const sender: GroupMember | undefined = spaceType === 'group'
+ ? { id: user.email, name: user.name, email: user.email }
+ : undefined;
+
+ const userMessage: Message = {
+ id: Date.now().toString(),
+ role: 'user',
+ content,
+ timestamp: new Date(),
+ sender,
+ };
+
+ setMessages(prev => [...prev, userMessage]);
+
+ // In group mode, only respond if @Clare or @clare is mentioned
+ const shouldAIRespond = spaceType === 'individual' ||
+ content.toLowerCase().includes('@clare');
+
+ if (shouldAIRespond) {
+ // Simulate AI response
+ setTimeout(() => {
+ const responses: Record = {
+ concept: "Great question! Let me break this concept down for you. In Responsible AI, this relates to ensuring our AI systems are fair, transparent, and accountable. Would you like me to explain any specific aspect in more detail?",
+ socratic: "That's an interesting point! Let me ask you this: What do you think are the key ethical considerations when deploying AI systems? Take a moment to think about it.",
+ exam: "Let me test your understanding with a quick question: Which of the following is NOT a principle of Responsible AI? A) Fairness B) Transparency C) Profit Maximization D) Accountability",
+ assignment: "I can help you with that assignment! Let's break it down into manageable steps. First, what specific aspect are you working on?",
+ summary: "Here's a quick summary: Responsible AI focuses on developing and deploying AI systems that are ethical, fair, transparent, and accountable to society.",
+ };
+
+ const assistantMessage: Message = {
+ id: (Date.now() + 1).toString(),
+ role: 'assistant',
+ content: responses[learningMode],
+ timestamp: new Date(),
+ references: ['Module 10, Section 2.3', 'Lecture Notes - Week 5'],
+ sender: spaceType === 'group' ? groupMembers.find(m => m.isAI) : undefined,
+ };
+
+ setMessages(prev => [...prev, assistantMessage]);
+ }, 1000);
+ }
+ };
+
+ const handleFileUpload = (files: File[]) => {
+ const newFiles: UploadedFile[] = files.map(file => ({
+ file,
+ type: 'other' as FileType, // Default type
+ }));
+ setUploadedFiles(prev => [...prev, ...newFiles]);
+ };
+
+ const handleRemoveFile = (index: number) => {
+ setUploadedFiles(prev => prev.filter((_, i) => i !== index));
+ };
+
+ const handleFileTypeChange = (index: number, type: FileType) => {
+ setUploadedFiles(prev => prev.map((file, i) =>
+ i === index ? { ...file, type } : file
+ ));
+ };
+
+ const handleClearConversation = () => {
+ setMessages([{
+ id: '1',
+ role: 'assistant',
+ content: "đ Hi! I'm Clare, your AI teaching assistant for Module 10 â Responsible AI. I'm here to help you learn through personalized tutoring. Feel free to ask me anything about the course materials, or upload your documents to get started!",
+ timestamp: new Date(),
+ }]);
+ };
+
+ const handleExport = () => {
+ const result = `# Conversation Export
+Date: ${new Date().toLocaleDateString()}
+Student: ${user?.name}
+
+## Summary
+This conversation covered key concepts in Module 10 â Responsible AI, including ethical considerations, fairness, transparency, and accountability in AI systems.
+
+## Key Takeaways
+1. Understanding the principles of Responsible AI
+2. Real-world applications and implications
+3. Best practices for ethical AI development
+
+Exported successfully! â`;
+
+ setExportResult(result);
+ setResultType('export');
+ toast.success('Conversation exported!');
+ };
+
+ const handleQuiz = () => {
+ const quiz = `# Micro-Quiz: Responsible AI
+
+**Question 1:** Which of the following is a key principle of Responsible AI?
+a) Profit maximization
+b) Transparency
+c) Rapid deployment
+d) Cost reduction
+
+**Question 2:** What is algorithmic fairness?
+(Short answer expected)
+
+**Question 3:** True or False: AI systems should always prioritize accuracy over fairness.
+
+Generate quiz based on your conversation!`;
+
+ setExportResult(quiz);
+ setResultType('quiz');
+ toast.success('Quiz generated!');
+ };
+
+ const handleSummary = () => {
+ const summary = `# Learning Summary
+
+## Today's Session
+**Duration:** 25 minutes
+**Topics Covered:** 3
+**Messages Exchanged:** 12
+
+## Key Concepts Discussed
+âĸ Principles of Responsible AI
+âĸ Ethical considerations in AI development
+âĸ Fairness and transparency in algorithms
+
+## Recommended Next Steps
+1. Review Module 10, Section 2.3
+2. Complete practice quiz on algorithmic fairness
+3. Read additional resources on AI ethics
+
+## Progress Update
+You've covered 65% of Module 10 content. Keep up the great work! đ`;
+
+ setExportResult(summary);
+ setResultType('summary');
+ toast.success('Summary generated!');
+ };
+
+ return (
+