A Spring Boot middleware service that generates personalized cover letters using AI. Built as part of the Web Services and Integrations course at IT-Högskolan.
This application acts as a bridge between the user and a Large Language Model (LLM). It tailors cover letters based on a chosen personality/target role, maintains conversation history per session, and handles errors gracefully.
| Personality | Target Role |
|---|---|
teacher |
Teaching positions in fashion or technology education |
manager |
Middle management, team lead, operations manager |
consultant |
Software consultant, implementation specialist |
POST /api/v1/chat
{
"personality": "consultant",
"message": "Write me a cover letter for a software consultant role",
"sessionId": "my-session-123"
}{
"message": "AI generated cover letter...",
"sessionId": "my-session-123"
}- AI-powered cover letter generation via OpenRouter
- Session memory — refine your letter conversationally
- Three personalities targeting different job types
- Global exception handling with clean error messages
- Automatic retry with exponential backoff on rate limits
- Swagger UI documentation at
/swagger-ui.html
- Clone the repository
- Create a
.envfile in the project root: - Add the
.envfile in IntelliJ Run Configuration:- Edit Configurations → Modify options → Environment variables
- Load from file → select
.env
- Run the application
- Visit
http://localhost:8080/swagger-ui.html
- Java 26
- Spring Boot 4.0.6
- Spring RestClient
- Spring Retry
- springdoc-openapi (Swagger)
- OpenRouter API (Claude 3.5 Haiku)
Available at http://localhost:8080/swagger-ui.html when running locally.