A modern, responsive AI chatbot web application built with React and Vite, featuring real-time streaming responses and advanced markdown rendering capabilities.
N.AI is a sophisticated frontend web application that provides an interactive chat interface with AI-powered responses. The application streams AI responses in real-time, renders markdown content dynamically, and persists user conversations in a database for seamless chat history management.
- ⚡ Real-time AI Streaming: Live streaming of AI responses as they're generated
- 📝 Advanced Markdown Rendering: Full support for markdown formatting in chat messages
- 💾 Conversation Persistence: Save and retrieve user conversations from database
- 📱 Responsive Design: Optimized for desktop and mobile devices
- 🔒 User Authentication: Secure user management system
- 🕒 Message History: Complete chat history with search and navigation
- 🎨 Modern UI/UX: Clean, intuitive interface with smooth animations
This frontend connects to the N.AI backend service. You can find the backend repository here: N.AI Backend Repository
- ⚛️ React 19 - Modern React with latest features
- ⚡ Vite 6 - Lightning-fast build tool and dev server
- 🛠️ Redux Toolkit - Predictable state management
- 🎨 TailwindCSS v4 - Utility-first CSS framework
- 🌐 React Router v7 - Client-side routing and navigation
- 📡 Axios - HTTP client for API communication
- 📝 React Markdown - Markdown rendering with syntax highlighting
- 💡 React Syntax Highlighter - Code block syntax highlighting
- 🔤 React Icons - Comprehensive icon library
- 🔔 React Toastify - Toast notifications
- Node.js 18.x or higher
- npm or yarn package manager
- Backend Service - Make sure the N.AI Backend is running
- 📂 Clone the repository
git clone https://github.com/NguyenNguyen0/chatbot-fe.git
cd chatbot-fe- 📦 Install dependencies
npm install
# or
yarn install-
⚙️ Configure environment
- Set up your backend API endpoint in the configuration files
- Ensure the backend service is running and accessible
-
🚀 Start the development server
npm run dev
# or
yarn dev- 🌐 Access the application
- Open your browser and navigate to
http://localhost:5173 - Start chatting with the AI!
- Open your browser and navigate to
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint for code qualitynpm run format- Format code with Prettier
To build the project for production:
npm run buildThis generates a dist directory with optimized, production-ready files that can be served by any static file server.
This frontend application is designed to work seamlessly with the N.AI backend:
- 🔗 Real-time Communication: WebSocket connections for streaming AI responses
- 🛠️ State Management: Redux Toolkit for managing chat state and user sessions
- 🌐 API Integration: RESTful API calls for user authentication and conversation persistence
- 📦 Component Architecture: Modular, reusable React components organized by feature
- 🍴 Fork the repository
- 🌿 Create your feature branch (
git checkout -b feature/amazing-feature) - 💾 Commit your changes (
git commit -m 'Add some amazing feature') - 📤 Push to the branch (
git push origin feature/amazing-feature) - 🔀 Open a Pull Request
This project is licensed under the terms specified in the LICENSE file. See the LICENSE file for details.

