Modern, professional real-time chat application built with Spring Boot 3.3.0 and WebSocket, featuring user authentication, live messaging, multi-user support, and real-time collaboration features.
v2.0 Released! π Multi-user presence, typing indicators, message reactions, and more!
See FEATURES_V2.md for detailed new features.
- Login System: Secure user login with credentials validation
- Registration: Create new accounts with email verification
- Session Management: Automatic login state tracking
- User Profiles: Display current user information
- Real-time Messaging: Send and receive messages instantly
- Channel Support: Multiple channels for organized conversations
- User Presence: See who's online in real-time
- Online User Count: Active participant tracking
- Message History: View recent chat history (50 messages)
- Typing Indicators: See when others are typing in real-time
- Message Reactions: Add emoji reactions to messages
- User List: See all active users in sidebar
- Online Status: Visual indicators for online/offline users
- Auto-sync: Changes sync across all connected clients
- Modern Design: Professional gradient-based UI with blue and purple accents
- Responsive Layout: Adapts to different screen sizes
- Real-time Updates: No page refresh needed
- Dark Sidebar: Easy-to-read chat list and user management
- Message Bubbles: Clear sender identification
- Smooth Animations: Professional fade-in and transitions
- Backend Framework: Spring Boot 3.3.0
- Real-time Communication: WebSocket
- Frontend: HTML5, CSS3, JavaScript
- Build Tool: Maven 3.8+
- Language: Java 17
- Database: H2 (in-memory)
- Server: Embedded Tomcat
- Java 17 or higher installed
- Maven 3.8+ installed
- Git (for cloning the repository)
-
Navigate to project directory:
cd JLiveChats -
Build the project:
mvn clean package
-
Set environment variables (optional for OAuth):
export GOOGLE_CLIENT_ID="your-client-id" export GOOGLE_CLIENT_SECRET="your-client-secret"
-
Run the application:
mvn spring-boot:run
-
Access the application:
- Open browser:
http://localhost:8080
- Open browser:
mvn clean package
java -jar target/jlivechats-1.0.0.jar- Open project in IntelliJ IDEA or Eclipse
- Right-click on
JLiveChatsApplication.java(insrc/main/java/com/jlivechats/) - Select "Run JLiveChatsApplication.main()"
For complete deployment instructions to Render, Railway, Docker, or other platforms, see DEPLOYMENT.md.
Quick Deploy to Render (Free):
- Go to render.com
- Create new Web Service from GitHub
- Select this repository
- Set environment variables (see DEPLOYMENT.md)
- Deploy!
If you're getting Error 400: redirect_uri_mismatch when signing in, see GOOGLE_OAUTH_FIX.md for detailed instructions on updating Google Cloud Console.
For comprehensive details about v2.0 features (typing indicators, user presence, reactions), see FEATURES_V2.md
This includes:
- Architecture and implementation details
- WebSocket endpoints reference
- Technical specifications
- Future enhancements roadmap
The application comes with pre-configured test accounts:
| Username | Password | Notes |
|---|---|---|
| bhola | password123 | Admin user |
| john | john123 | Regular user |
| jane | jane123 | Regular user |
Or create new accounts using the registration screen.
- Email/Username input field
- Password input field
- Secure authentication
- Link to registration screen
- Beautiful gradient background
- Username input
- Email address input
- Password input with strength indicator
- Password confirmation
- Link back to login screen
-
Left Sidebar:
- Current user profile
- List of available channels
- Online users with status indicators
- Logout button
-
Main Chat Area:
- Channel header with description
- Message display area with sender information
- Message timestamps
- Input field for new messages
- Send button with keyboard shortcut (Enter)
| Element | Color | Hex |
|---|---|---|
| Primary Accent | Blue | #667eea |
| Secondary Accent | Purple | #764ba2 |
| Background | Dark Blue-Gray | #2c3e50 |
| Text Primary | White | #ffffff |
| Text Secondary | Light Gray | #e0e0e0 |
| Borders | Light Gray | #e0e0e0 |
- User logs in with credentials
- Authentication Service validates credentials
- User redirected to main chat interface
- Select a channel to view conversation
- Type message and press Enter or click Send
- Message added to Message Service
- Message displayed in chat area with timestamp
src/
βββ main/
β βββ java/
β β βββ com/jlivechats/
β β βββ JavaFXApplication.java # Main entry point
β β βββ ui/
β β β βββ LoginView.java # Login screen
β β β βββ RegisterView.java # Registration screen
β β β βββ ChatView.java # Main chat interface
β β β βββ SceneManager.java # Scene navigation
β β βββ service/
β β β βββ AuthenticationService.java # User authentication
β β β βββ MessageService.java # Message management
β β βββ config/
β β βββ (Spring configuration files)
β βββ resources/
β βββ styles/
β β βββ application.css # JavaFX styles
β βββ static/
β βββ (Web resources, optional)
- Start the application
- Enter username and password
- Click "Sign In" or press Enter
- Invalid credentials will show error message
- Click "Sign Up" link on login screen
- Fill in all fields (username, email, password)
- Confirm password matches
- Click "Create Account"
- Select a channel from left sidebar
- Type message in input field at bottom
- Press Enter or click Send button
- Message appears in chat with timestamp
- Click "Logout" button in top-left sidebar
- Redirected back to login screen
- Password Validation: Passwords must be minimum 6 characters
- Username Validation: Usernames must be minimum 3 characters
- Email Validation: Email format validation on registration
- Session Management: Current user tracking with AuthenticationService
- Data Privacy: In-memory storage (no external database exposure)
Edit src/main/resources/styles/application.css to customize:
- Font families
- Colors and gradients
- Button styles
- Text field styling
Modify in JavaFXApplication.java:
stage.setWidth(1200);
stage.setHeight(700);
stage.setMinWidth(800);
stage.setMinHeight(600);Edit in ChatView.java:
ObservableList<String> channels = FXCollections.observableArrayList(
"#general", "#random", "#announcements", "#help"
);- Ensure Java 17+ is installed:
java -version - Check Maven is installed:
mvn -version - Try:
mvn clean install
- Verify JavaFX dependency in pom.xml
- Run:
mvn dependency:resolve
- Check screen resolution is at least 800x600
- Verify CSS file is in resources/styles/
- WebSocket integration for real-time messaging
- Database persistence (SQLite/PostgreSQL)
- User avatar uploads
- Message search functionality
- Chat notifications
- File sharing capability
- Emoji picker
- Dark/Light theme toggle
- User preferences settings
- Group chat support
This project is open-source and available for educational purposes.
Created by: Bhola Yadav
USN: 1CR23CS044
Section: K
Branch: Computer Science Engineering
Enjoy your new JLiveChats application! π