This is a feature-rich chat application built with a modern tech stack, designed for real-time, interactive conversations. It supports file uploads, GitHub repository integration, and live-streaming AI responses.
- Real-time Chat Interface: A clean and intuitive chat interface for seamless communication.
- WebSocket Integration: Leverages WebSockets for instant, bidirectional communication between the client and server, enabling real-time message streaming.
- File Uploads: Users can upload documents directly into the chat. The application processes these files and integrates them into the conversation context.
- GitHub Repository Integration: Users can link to public GitHub repositories, allowing the AI to access and process code from the specified branch.
- Streaming AI Responses: AI-generated responses are streamed word-by-word, providing a dynamic and engaging user experience.
- Message Management:
- Rewrite and Resubmit: Users can stop a streaming response, edit their last message, and resubmit it to get a new response.
- Delete Uploaded Content: Users can delete previously uploaded files or linked GitHub repositories.
- Backend API Communication: The frontend communicates with a backend server for handling business logic, file processing, and AI interactions.
- Component-Based Architecture: Built with React and organized into reusable components for maintainability and scalability.
- Modern Tooling: Utilizes Vite for a fast and efficient development experience.
- Frontend:
- UI Components:
- State Management:
- React Hooks (
useState,useEffect,useRef)
- React Hooks (
- API Communication:
- Axios for HTTP requests
- Native WebSocket API for real-time communication
- Routing:
- Linting & Formatting:
/
├── public/ # Static assets
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── ui/ # Shadcn UI components
│ │ ├── ChatContainer.tsx
│ │ ├── ChatHeader.tsx
│ │ ├── ChatInput.tsx
│ │ └── MessageList.tsx
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility functions
│ ├── pages/ # Top-level page components
│ │ ├── Index.tsx
│ │ └── NotFound.tsx
│ ├── types/ # TypeScript type definitions
│ ├── App.tsx # Main application component with routing
│ └── main.tsx # Application entry point
├── .gitignore
├── package.json
├── README.md
└── vite.config.ts
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install dependencies:
npm install
To start the local development server, run:
npm run devThe application will be available at http://localhost:5173.
To create a production-ready build, run:
npm run buildThe optimized and minified files will be generated in the dist/ directory.
To check for code quality and style issues, run:
npm run lint