A chat application built with Next.js that integrates with the Mistral AI API. This app provides a chat history management and real-time updates.
- Dynamic dark/light theme switching
- Real-time message updates
- Loading states and error handling
- Mobile-responsive layout
- Persistent chat storage using localStorage
- Organized chat history by timeframes:
- Today
- Yesterday
- Previous 7 Days
- Ability to continue previous conversations
- Real-time history updates across tabs
- Sidebar navigation for chat history
- New chat button to start fresh conversations
- Chat title generation
- Powered by Mistral AI API
- Natural language processing
- Context-aware responses
- Node.js 18+ installed
- Mistral AI API key
- Clone the repository:
git clone https://github.com/iraphaelfernandes/mistral-chat-app.git
cd mistral-chat-app
- Install dependencies:
npm install
- Create a
.env.local
file in the root directory and add your Mistral AI API key:
NEXT_PUBLIC_MISTRAL_API_KEY=your_api_key_here
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser.
- Next.js 14
- TypeScript
- Tailwind CSS
- Mistral AI API
NEXT_PUBLIC_MISTRAL_API_KEY
: Your Mistral AI API key
- API keys are stored in environment variables
- Chat history is stored locally in the browser
- No server-side storage of conversations
- Secure API communication
- Start a new chat using the "New Chat" button
- Type your message and press Enter or click Send
- View chat history in the sidebar
- Click on any previous chat to continue the conversation
- Use the mobile menu button on small screens to access history
Feel free to open issues and pull requests for any improvements.
This project is licensed under the MIT License - see the LICENSE file for details.