This guide walks you through cloning the repository, starting the server, and making your first authenticated API request from scratch.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Rubick65/calenderyBack/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Make sure the following tools are installed and available on your
Verify your Java version:
PATH before continuing:| Requirement | Version / Notes |
|---|---|
| Java | 21 (the Dockerfile uses eclipse-temurin:21-jre-jammy) |
| Maven | 3.9+ (or use the included ./mvnw wrapper) |
| PostgreSQL | Any recent version; a local instance or a managed cloud DB |
| Docker | Optional — for a fully containerised setup |
| Supabase project | Needed for profile-photo storage (avatars bucket) |
Clone and Configure
Clone the repository and set the required environment variables.CalenderyBack reads all sensitive values from environment variables. Export them in your shell (or add them to a The full mapping in
.env file / IDE run configuration):application.yaml is:Run the Server
Option A — Maven wrapper (recommended for development)The server starts on port 8080. You should see Spring Boot’s startup banner and then log output at The container JVM is tuned for containerised environments:Confirm the server is healthy:
WARN level (configured in application.yaml).Option B — Docker (multi-stage build)The project ships a two-stage Dockerfile that builds the JAR and packages it into a slim JRE image:Register a User
Registration is a two-step process: submit the registration form, then click the confirmation link that arrives by email.Step 4a — Submit registrationExpected response A verification email is sent to Expected response
POST /api/users/auth/register is a public endpoint (no credentials required). Send a JSON body matching the UserDto shape:200 OK:alice@example.com containing a link with a token query parameter.Step 4b — Confirm the email token200 OK (empty body). The account is now enabled and can authenticate.Until the token is confirmed the account remains disabled. Attempting to authenticate with a disabled account returns HTTP 401 Unauthorized.
Make an Authenticated Request
CalenderyBack uses HTTP Basic authentication. Pass Expected response Step 5b — Call a protected endpointExpected response You’re authenticated! From here you can explore publications, followers, and the real-time chat via the WebSocket endpoint at
email:password base-64-encoded in every request to a protected route.Step 5a — Login (verify your credentials)POST /api/users/auth/login returns your user information and roles:200 OK:GET /api/users/app/getUserSettings requires ROLE_USER and additionally checks that the idUsuario parameter matches the authenticated principal (ownership guard via @PreAuthorize):200 OK:ws://localhost:8080/ws-endpoint.What’s Next?
Authentication deep-dive
Learn about disabled-account handling, token resend, public-key exchange, and route protection rules.
Introduction
Architecture overview, functional domains, and the Mediator pattern explained.