This project is a real-time chat application with an integrated AI bot. It allows users to communicate with each other in real-time and interact with an AI assistant for information or help.
- Real-time messaging using WebSocket
- User registration with unique usernames
- Public chat room for all users
- Integration with Vishwaguru AI bot
- Distinct message styling for AI responses
- Responsive web design for desktop and mobile use
- Frontend: HTML, CSS, JavaScript
- Backend: Java with Spring Boot
- WebSocket: SockJS and STOMP
- AI Integration: Ollama
- Java JDK 11 or higher
- Maven
- Ollama setup for AI integration
-
Clone the repository:
git clone https://github.com/Shivam-2310/ai-powered-chat-app cd chat-application
-
Install backend dependencies:
mvn install
-
Install frontend dependencies:
cd src/main/resources/static npm install
-
Configure Ollama:
- Ensure Ollama is installed and running on your system
- Update the
application.properties
file with your Ollama configuration
-
Build the project:
mvn clean package
-
Run the application:
java -jar target/chat-application-0.0.1-SNAPSHOT.jar
- Open a web browser and navigate to
http://localhost:8080
- Enter a username to join the chat
- Start chatting with other users in the public chat room
- To interact with Vishwaguru AI, start your message with
@vishwaguru
, for example:@Vishwaguru Write about features of Java ?
src/main/java/com/shivam/chat/
: Java source filesconfig/
: WebSocket configurationcontroller/
: WebSocket event handlersmodel/
: Data modelsservice/
: Business logic and AI integration
src/main/resources/static/
: Frontend resourcesjs/
: JavaScript files for WebSocket handling and UIcss/
: Stylesheetsindex.html
: Main HTML file
Contributions to improve the chat application are welcome. Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature
) - Make your changes
- Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Spring Boot for the robust backend framework
- SockJS and STOMP for WebSocket implementation
- Ollama for AI integration capabilities