A full-stack AI-powered chat application built with React (TypeScript), Spring Boot, Spring AI, and MySQL. This project demonstrates modern web development practices, AI integration, and persistent chat history.
- Real-time chat interface with AI-powered responses (Mistral AI)
- Modern, responsive UI built with React, TypeScript, and Tailwind CSS
- Persistent chat history stored in MySQL
- RESTful API with Spring Boot and Spring AI
- Error handling and loading indicators for smooth UX
Frontend:
- React 18
- TypeScript
- Vite
- Tailwind CSS
- Lucide React (icons)
Backend:
- Java 17
- Spring Boot
- Spring AI (Mistral AI integration)
- Spring Data JPA
- MySQL
- Node.js & npm
- Java 17+
- Maven
- MySQL
git clone <your-repo-url>
cd Chat_SpringAI- Create a MySQL database (e.g.,
mistralai). - Update
src/main/resources/application.propertieswith your DB credentials.
cd ChatSpringAI
./mvnw spring-boot:runcd myapp
npm install
npm run devOpen http://localhost:5173 in your browser.
GET /api/mistral-ai/{message}— Send a message to the AI and receive a responseGET /api/mistral-ai/history— Retrieve chat history
Chat_SpringAI/
├── ChatSpringAI/ # Spring Boot backend
│ └── src/main/java/com/example/ChatSpringAI/
│ ├── Controller/
│ ├── Models/
│ ├── Repository/
│ └── Services/
├── myapp/ # React frontend
│ └── src/
│ ├── components/
│ ├── hooks/
│ └── types/
This project is for educational and demonstration purposes.
Feel free to contribute or open issues for improvements!