Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Daniel-Stojanovski/finkiopendesk/llms.txt

Use this file to discover all available pages before exploring further.

The FinkiOpenDesk backend is a Spring Boot 3 application built with Java 21. It connects to a PostgreSQL database, runs Flyway migrations on startup, and exposes a REST API on port 8080. You can run it locally with Maven for development or package it as a Docker image for production.

Prerequisites

Before you begin, make sure you have the following installed:
  • Java 21 — the runtime version specified in pom.xml
  • Docker — required to build and run the container image
  • PostgreSQL — a running database instance accessible via a connection string
  • A SendGrid account with an API key, used for sending account activation emails
All required environment variable names are documented in the environment variables reference.

Running locally with Maven

1

Clone the repository

git clone https://github.com/Daniel-Stojanovski/finkiopendesk.git
cd finkiopendesk/finkiopendesk-be
2

Set environment variables

Create a .env file in the finkiopendesk-be/ directory. Spring Boot will pick it up automatically via the spring.config.import=optional:file:./.env setting in application.properties.
.env
DB_URL=jdbc:postgresql://localhost:5432/finkiopendesk
DB_USER=postgres
DB_PASSWORD=your_password
SENDGRID_SMTP_API_KEY=SG.xxxxxxxxxxxx
JWT_ACTIVATION_SECRET=your_activation_secret
JWT_LOGIN_SECRET=your_login_secret
PORT=8080
3

Start the application

./mvnw spring-boot:run
The application starts on http://localhost:8080. Flyway runs database migrations automatically on startup.

Building and running with Docker

The repository includes a Dockerfile in finkiopendesk-be/. It uses a multi-step approach: builds the fat JAR with the Maven wrapper inside the container, then runs it with the Eclipse Temurin JDK 21 runtime.

Dockerfile

dockerfile
FROM eclipse-temurin:21-jdk

WORKDIR /app

COPY . .

RUN chmod +x mvnw
RUN ./mvnw clean package -DskipTests

EXPOSE 8080

CMD ["java", "-jar", "target/finkiopendesk-0.0.1-SNAPSHOT.jar"]
1

Build the image

Run this command from inside the finkiopendesk-be/ directory:
docker build -t finkiopendesk-be .
The Maven wrapper downloads dependencies and compiles the project during the build. Tests are skipped with -DskipTests to keep build times short.
2

Run the container

Pass all required environment variables with -e flags or load them from a file:
docker run -p 8080:8080 \
  -e DB_URL=jdbc:postgresql://host.docker.internal:5432/finkiopendesk \
  -e DB_USER=postgres \
  -e DB_PASSWORD=your_password \
  -e SENDGRID_SMTP_API_KEY=SG.xxxxxxxxxxxx \
  -e JWT_ACTIVATION_SECRET=your_activation_secret \
  -e JWT_LOGIN_SECRET=your_login_secret \
  -e PORT=8080 \
  finkiopendesk-be
The API is now reachable at http://localhost:8080.
When connecting to a PostgreSQL instance running on the host machine from inside Docker, use host.docker.internal instead of localhost in the DB_URL.

Production deployment on Render

The live backend is deployed on Render as a Docker service. Render pulls the repository, builds the image using the Dockerfile, and injects environment variables through its dashboard. Key settings for the Render service:
SettingValue
EnvironmentDocker
Port8080
Health check path/
Set each variable from the environment variables reference in the Render service’s Environment tab. Flyway applies any pending database migrations automatically each time a new deployment starts.
Use a managed PostgreSQL service such as Render Postgres, Supabase, or Neon so the database remains available independently of the backend service’s lifecycle.

Build docs developers (and LLMs) love