Skip to content

Latest commit

 

History

History
89 lines (60 loc) · 1.83 KB

File metadata and controls

89 lines (60 loc) · 1.83 KB

IssueFlow Run Notes

Prerequisites

  • Java 21
  • Docker Desktop
  • Maven wrapper included in this repository (mvnw.cmd / mvnw)

Start PostgreSQL

The application is configured for the PostgreSQL service in compose.yml:

  • database: issueflow
  • username: issueflow
  • password: issueflow
  • port: 5432
docker compose up -d

Run Tests

Tests use the H2 test configuration, so PostgreSQL does not need to be running for this command.

.\mvnw.cmd test

Run The App

Start PostgreSQL first, then run:

.\mvnw.cmd spring-boot:run

The app runs on http://localhost:8080.

Build The Jar

.\mvnw.cmd clean package

Run The Packaged Jar

Start PostgreSQL first, then run:

java -jar target\issueflow-0.0.1-SNAPSHOT.jar

Auth Smoke Test

Create a user. password is required, stored as a BCrypt hash, and never returned in API responses.

curl.exe -X POST http://localhost:8080/users `
  -H "Content-Type: application/json" `
  -d "{\"username\":\"jdoe\",\"email\":\"jdoe@example.com\",\"fullName\":\"John Doe\",\"role\":\"DEVELOPER\",\"password\":\"secret123\"}"

Log in and capture the bearer token.

$token = (curl.exe -X POST http://localhost:8080/auth/login `
  -H "Content-Type: application/json" `
  -d "{\"username\":\"jdoe\",\"password\":\"secret123\"}" | ConvertFrom-Json).accessToken

Use the token on protected endpoints.

curl.exe http://localhost:8080/users `
  -H "Authorization: Bearer $token"

curl.exe http://localhost:8080/auth/me `
  -H "Authorization: Bearer $token"

Log out.

curl.exe -X POST http://localhost:8080/auth/logout `
  -H "Authorization: Bearer $token"

Logout uses an in-memory token deny-list for this demo, so it resets when the application restarts.