Prerequisites
Before installing the Chat Server API, ensure you have the following installed on your system:Java Development Kit (JDK) 25
The server requires JDK 25 as specified in You should see output indicating Java 25 or higher.
build.gradle.kts:13. Download and install from Oracle or use a package manager.If you’re on Windows, use
gradlew.bat instead of ./gradlew in all commands throughout this documentation.Clone the repository
Clone the Chat Server API repository to your local machine:Dependencies
The project uses Spring Boot 4.0.2 and includes the following key dependencies (frombuild.gradle.kts:27-62):
Core dependencies
- Spring Boot Starter Data JPA - Database persistence
- Spring Boot Starter Validation - Request validation
- Spring Boot Starter WebMVC - REST API endpoints
- Spring Boot Starter WebSocket - Real-time messaging
- Spring Boot Starter Security - Authentication and authorization
- Spring Boot Starter Actuator - Health checks and metrics
Database
- SQLite JDBC (3.41.2.2) - Primary database driver
- H2 Database - Alternative embedded database (runtime)
- Hibernate Community Dialects - SQLite dialect support
Security
- JJWT API (0.11.5) - JWT token generation and validation
- JJWT Implementation (0.11.5) - JWT runtime implementation
- JJWT Jackson (0.11.5) - JSON parsing for JWTs
- BCrypt Password Encoder - Password hashing
Documentation
- SpringDoc OpenAPI Starter Common (3.0.1)
- SpringDoc OpenAPI Starter WebMVC UI (3.0.1) - Swagger UI integration
Development tools
- Lombok - Reduces boilerplate code
- Spring Boot DevTools - Hot reload during development
Build the project
Build the project
Use the Gradle wrapper to download dependencies and build the project:This command will:
- Download all dependencies from Maven Central
- Compile the Java source code
- Run unit tests
- Package the application into a JAR file