Skip to content
Back to all projects

Backend

Career-flow

A multi-user Spring Boot REST API for tracking job applications, interviews and interview question cards. The cards are scheduled with the SM-2 spaced repetition algorithm, and each user can only reach their own data. It is a backend only; there is no front end.

Problem

During a job search, applications, interview dates and the questions to study usually end up scattered across notes and spreadsheets. I wanted them in a single API that says which round happened for which application and when each question should be reviewed again. Two things interested me most. One is keeping several users' data from mixing: knowing a record's id must not be enough to reach it. The other is letting an algorithm (SM-2) decide when each card comes back.

Highlights

  • Ownership is checked in the service layer: every access by id goes through user-scoped queries such as findByIdAndUserId, findByIdAndApplicationUserId and findByIdAndDeckUserId, and someone else's record answers 404 just like a missing one.
  • OwnershipIT drives every endpoint that takes an id with two users, so the ownership rule stays covered by a test when a new endpoint is added.
  • SM-2: the quality score is 0 to 5; below 3 resets the card to 1 day, otherwise the interval grows to 1 day, 6 days, then interval times easiness factor. The factor is updated on every review and never drops below 1.3.
  • Passwords use BCrypt and sessions use an HS256 signed JWT. If the JWT key is not Base64 or is shorter than 256 bits the application fails at startup rather than on the first login.
  • LoggingAspect only logs the method name, duration and numeric, UUID and enum arguments, and never strings or DTO values. LoggingAspectIT captures all TRACE-level log output during register and login and asserts that the password and token never appear.
  • The schema is managed by Flyway (three migrations) with Hibernate in 'validate' mode. The integration tests share a single Testcontainers PostgreSQL 17 container and one Spring context; there are 36 test methods in 10 test classes.

Architecture and notes

It is a classic layered Spring application: controllers, service interfaces and implementations, repositories, entities, DTOs and MapStruct mappers. Every response uses the same envelope ({ success, message, data, timestamp }); validation errors become a field-to-message map, and a missing record, a business rule, bad credentials, access denied and a duplicate e-mail map to 404, 400, 401, 403 and 409. The application list is paged and sorted, the API is documented with OpenAPI and the Swagger UI is on.

The ownership chain is this: a user owns applications and decks, an application owns interviews, and a deck owns cards. Interviews and cards inherit ownership from their parent, so creating a child first looks up the parent for that user.

The gaps are listed in the README: no refresh tokens, logout or token revocation, no rate limit on login, and no endpoint that uses roles. Update endpoints for decks, cards and interviews are missing, the lists are not paged, and there is no front end or CI workflow. Records created before the ownership columns existed belong to nobody and cannot be reached through the API; I have not written a backfill migration for them.

Live from GitHub

Stars
0
Forks
0
Last updated

Languages

  • Java100%

Fetched from the public GitHub API and refreshed hourly.

From the README

A REST backend for managing a job search: track applications and interviews, and study interview questions with spaced repetition. Built with Spring Boot, PostgreSQL and JWT authentication.

This repository currently contains the backend only (backend/) and the local infrastructure definition (infrastructure/). There is no front end here.

Features

What is implemented in the code today:

…

Read the full README on GitHub (opens in a new tab)

Technologies

  • Java 21
  • Spring Boot 3.5
  • Spring Security
  • JWT
  • PostgreSQL 17
  • Flyway
  • OpenAPI
  • Testcontainers

Request flow

Hover or focus a component to see what it is.

A generic request path built from the project's tech list. It illustrates the stack; it is not a measured trace.