Skip to content

sim-pez/we-regret-to-persist

Repository files navigation

we-regret-to-persist

CI Go Claude Docker

An AI-powered job application tracker that automatically processes emails and maintains a database of your application statuses — so you never lose track of the rejections you'd rather forget.

Live: https://rejectlytics.simpez.uk/

Overview

This service consumes job-related emails from a Kafka topic, uses Claude AI to classify each one, and upserts the result into PostgreSQL. It demonstrates a clean event-driven architecture with a focused use case: turning an inbox full of recruiter noise into a structured, queryable dataset.

We regret stack

This is a service in the "We regret" stack, a collection of services that process recruiter emails and maintain a comprehensive job application history.

The stack is as follows:

  • n8n — monitors your email inbox, extracts relevant emails, and produces them to the emails Kafka topic
  • we-regret-to-persist (this service) — processes application confirmations and rejections, maintains the source of truth in Postgres
  • postgres — serves as the single source of truth for all application statuses and statistics (e.g. total applications, rejection rate, timeline of events)
  • we-regret-to-present — serves a REST API to query your application history

Tech stack

Layer Technology
Language Go 1.24
AI Claude Haiku 4.5 (anthropic-sdk-go)
Messaging Redpanda / Kafka (segmentio/kafka-go)
Database PostgreSQL (sqlx, squirrel, golang-migrate)
Testing testify, testcontainers-go
CI/CD GitHub Actions → GHCR

Prerequisites

Getting started

1. Configure environment

cp .env.example .env
# Set CLAUDE_API_KEY and Postgres credentials

2. Start infrastructure and seed sample emails

task dev

This starts Redpanda and PostgreSQL, creates the Kafka topic, and produces the emails from seed.jsonl.

3. Run the service

task run

The service migrates the database on startup, then begins consuming from the emails topic.

Manual setup (without task)
docker compose up -d
go run ./cmd/status

Testing

task test        # unit + integration tests (requires Docker)
task lint        # golangci-lint

Integration tests use Testcontainers to spin up real Postgres and Kafka instances.

CI/CD

GitHub Actions runs tests and lint on every push. On version tags (v*), it builds and pushes a Docker image to GitHub Container Registry.

docker build -t we-regret-to-persist:latest .

About

Kafka consumer that ingests rejection events and persists your suffering stats to the database

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors