Skip to content

Jobsidney/Simple_AI-CHAT_Interface_job

Repository files navigation

Vision Chat AI Interface

A modern, responsive React + TypeScript chat interface built with shadcn/ui, Framer Motion, and TailwindCSS. Features Vision Chat AI - a hardcoded AI agent with deterministic responses that vary based on user options and file attachments.

🚀 Features

Chat Interface

  • Real-time messaging with user and Vision Chat AI message bubbles
  • Markdown support for AI responses (bold, code, links, lists)
  • Syntax highlighting for code blocks with dark theme
  • Collapsible code blocks with "Show more/less" functionality
  • Collapsible user messages for long text and code
  • Typing indicators with animated dots
  • Auto-scroll to latest messages
  • Timestamps for all messages
  • File attachments with image previews and validation
  • Voice input with speech recognition
  • Mobile responsive design with drawer navigation
  • Conversation persistence with local storage
  • Share functionality with copyable links

Vision Chat AI Response System

🎨 Design: I created the UI/UX design in Figma. You can view the complete design system and mockups here: Figma Design - Transform Your Workflow With AI Assistant

Vision Chat AI Interface Demo

  • 6 distinct response styles:
    • Summary paragraphs
    • Bullet lists (with proper ChatGPT-style formatting)
    • Numbered steps
    • Witty quips
    • Definition + examples
    • Q&A format
  • Code detection and automatic code example generation
  • Deterministic responses based on:
    • Response length (short/medium/long)
    • Response style (bullets/steps/paragraph/definition/qa/quip)
    • Response tone (casual/formal/friendly)
  • File-aware responses when attachments are present

Controls & Options

  • Multi-line textarea (Enter to send, Shift+Enter for newline)
  • File upload with validation (max 5 files, 10MB each)
  • Options panel with 3 customizable controls:
    • Response Length (Short/Medium/Long)
    • Response Style (Bullets/Steps/Paragraph/Definition/Q&A/Quip)
    • Response Tone (Casual/Formal/Friendly)
  • Quick action dropdown with preset prompts:
    • Add photos & files
    • Create image
    • Thinking mode
    • Deep research
    • Study and learn
  • Real-time option updates affecting AI responses

Animations & UX

  • Framer Motion animations for:
    • Message appearance
    • Typing indicators
    • File chip interactions
    • Options panel toggle
    • Mobile drawer transitions
  • Responsive design for all screen sizes
  • Mobile drawer navigation for smaller devices
  • Accessibility features (keyboard navigation, screen reader support)
  • Smooth scrolling and auto-scroll to latest messages

🛠️ Tech Stack

  • React 19 with TypeScript
  • shadcn/ui for UI components
  • TailwindCSS for styling
  • Framer Motion for animations
  • React Markdown for message rendering
  • Lucide React for icons
  • React Router DOM for navigation
  • Vite for build tooling

📁 Project Structure

src/
├── components/
│   ├── chat/
│   │   ├── ChatArea.tsx           # Main chat interface
│   │   ├── ChatSidebar.tsx        # Left sidebar with conversations
│   │   ├── MessageRenderer.tsx   # Message rendering with markdown
│   │   └── OptionsPanel.tsx       # Chat options configuration
│   └── ui/                        # shadcn/ui components
├── hooks/
│   ├── useChatActions.ts          # Chat action handlers
│   ├── useChatPersistence.ts      # Chat state persistence
│   ├── useInputState.ts           # Input state management
│   ├── useUIState.ts              # UI state management
│   └── useVoiceState.ts           # Voice input handling
├── lib/
│   └── utils.ts                   # shadcn/ui utilities
├── pages/
│   ├── ChatPage.tsx               # Main chat page
│   └── LandingPage.tsx            # Landing page
├── App.tsx                        # Root component
└── main.tsx                       # Application entry point

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • npm

Installation

  1. Clone the repository

    git clone <repository-url>
    cd simple-ai-chat-interface-job
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev
  4. Open in browser Navigate to http://localhost:5173 (or the port shown in terminal)

Build for Production

npm run build
npm run preview

🎮 Usage

Basic Chat

  1. Type a message in the textarea
  2. Press Enter to send (Shift+Enter for newline)
  3. Wait for Vision Chat AI response with typing indicator
  4. Continue the conversation

File Attachments

  1. Click the pink "+" button
  2. Select "Add photos & files" from dropdown
  3. Select up to 5 files (max 10MB each)
  4. Files appear as chips below the input
  5. AI responses will reference attached files
  6. Remove files by clicking the X on chips

Chat Options

  1. Click the purple "Options" button to open panel
  2. Adjust settings:
    • Response Length: Short/Medium/Long
    • Response Style: Bullets/Steps/Paragraph/Definition/Q&A/Quip
    • Response Tone: Casual/Formal/Friendly
  3. Options affect AI response style immediately

Quick Actions

  1. Click the pink "+" button
  2. Select from quick actions:
    • Add photos & files: Upload files
    • Create image: Insert image creation prompt
    • Thinking: Insert thinking mode prompt
    • Deep research: Insert research prompt
    • Study and learn: Insert learning prompt

Voice Input

  1. Click the microphone button
  2. Allow microphone permissions
  3. Speak your message
  4. Click stop when finished
  5. Message will be transcribed automatically

Sharing Conversations & Messages

  1. Share entire conversation:

    • Click the three dots menu (⋯) next to any conversation in the sidebar
    • Select "Share" to copy a link to the entire conversation
    • The link opens the conversation when clicked
  2. Share individual messages:

    • Click the copy icon (📋) below any AI response
    • Click the share icon (🔗) below any AI response
    • This copies a direct link to that specific message
    • When opened, the link scrolls to and highlights the specific message
  3. Shareable links:

    • Links are formatted as: yoursite.com/chat?conversation=ID&message=ID
    • Work across devices and browsers
    • Preserve conversation context and message history

Implemented Features

✅ Core Features

  • Real-time chat interface with user and AI message bubbles
  • Markdown rendering with syntax highlighting for code blocks
  • Collapsible content for long messages and code
  • File attachments with image previews and validation
  • Voice input with speech recognition
  • Mobile responsive design with drawer navigation
  • Conversation persistence with local storage
  • Share functionality with copyable conversation links

✅Advanced Features

  • Code detection and automatic code example generation
  • 6 response styles (bullets, steps, paragraph, definition, Q&A, quip)
  • 3 response tones (casual, formal, friendly)
  • 3 response lengths (short, medium, long)
  • Quick action dropdown with preset prompts
  • Options panel with real-time response customization
  • Typing indicators with animated dots
  • Auto-scroll to latest messages

Releases

No releases published

Packages

 
 
 

Contributors

Languages