Prerequisites
Before you begin, ensure you have:- Java 25 or later - Check your version with
java -version - Gradle - Included via Gradle wrapper in the repository
- Git - To clone the repository
Installation
Your first API calls
Now that your server is running, let’s create a user and authenticate.Register a new user
Create your first user account using the registration endpoint:
cURL
Response
Response
The server returns a JWT token valid for 30 days:Save this token - you’ll need it for authenticated requests.
Username requirements: 2-8 characters
Password requirements: Minimum 6 charactersThese constraints are defined in
Password requirements: Minimum 6 charactersThese constraints are defined in
Configuration.java (MIN_USERNAME_LENGTH=2, MAX_USERNAME_LENGTH=8, MIN_PASSWORD_LENGTH=6).Get your user profile
Use the JWT token to fetch your user information:
The response uses the
cURL
Response
Response
SafeUser DTO, which excludes sensitive fields like the password hash.Send a friend request
Register a second user (e.g., “bob”) and send a friend request from alice to bob:
The relationship starts in
cURL
Response
Response
PENDING status. Bob must accept it to change the status to ACCEPTED.Explore the API
You’re now ready to explore the full API:OpenAPI Documentation
Interactive API documentation with Swagger UI
Authentication Endpoints
Register, login, and manage user accounts
Relationship Endpoints
Send, accept, and manage friend requests
Core Concepts
Learn about JWT tokens, relationships, and messaging
What’s next?
Configure the server
Set up environment variables, database options, and security settings.Server Configuration →
Set up the JavaFX client
Install and run the desktop client application.Client Installation →
Understand the architecture
Learn about the layered architecture, data models, and authentication flow.Architecture Overview →
Troubleshooting
Port 8080 is already in use
Port 8080 is already in use
If port 8080 is occupied, you can change it by setting the Or update
SERVER_PORT environment variable:application.properties with:401 Unauthorized errors
401 Unauthorized errors
Database errors on startup
Database errors on startup
If you see database errors, delete the local database file and restart: