TrueFit CV
Creator, AI SaaS|Next.js / Express / Redis / LLM provider
TLDR
CV and job-fit product with scoring, generation, credits, and a job-hunt agent. Next.js, Express BFF, Redis, Postgres, and LLM provider on Docker Compose. Node stack by design.
Context. Candidates need a clear score against a job, a rewritten CV grounded in their experience, and application drafting without duplicate credit spend.
Architecture
System diagram

Component map
As deployed
Next.js app
UI, exports, rewrites
Express BFF
/v1 REST
Eve agent
Tool-calling job agent
Admin SPA
Vite
PostgreSQL
Users, CVs, billing
Redis
Rate limits
object storage
CV files
LLM provider
Analyst, Curator, Eve
payment provider
Credits and subscriptions
What shipped
- One domain, four services: Next.js web, Express BFF, Eve agent, admin SPA
- Two-step generation: Job Analyst then CV Curator, both on strict JSON schemas
- Redis for rate limits; JWT in httpOnly cookies; Postgres for product data
- Credits and subscriptions enforced with Postgres triggers and payment provider webhooks
- Eve can search jobs and draft applications, but submit needs explicit approval
- Product analytics and feature flags for measuring and gating release risk
Backend
- Express REST under /v1 for auth, CVs, generations, jobs, applications, payments, and admin
- Next.js rewrites /bff, /eve, and /admin to internal services
- Object storage for CV uploads, with local disk in development
- Redis-backed AI rate limiting, with an in-memory fallback
- Eve calls the BFF with internal service auth; no silent auto-apply
Request and event flow
- 01User uploads a CV and a job description
- 02Job Analyst extracts requirements and scores fit from 0 to 100
- 03CV Curator produces structured CV JSON and a cover letter from that brief
- 04Generation insert meters credits, or skips metering for an active subscription
- 05Eve can search jobs and draft applications; submit only after approval
API domains
- Auth and Google OAuth
- CV upload and extract
- Generations and design pipeline
- Jobs and preferences
- Applications
- Payment provider checkout and webhook
- Guest analyze
Key decisions
- Use Next.js as the edge UI and reverse proxy so /bff, /eve, and /admin stay one origin for the browser while services stay separate behind the scenes.
- Split generation into Job Analyst then CV Curator. Scoring and rewriting stay separate, which keeps outputs stricter and easier to debug.
- Meter credits with a Postgres trigger on generation insert so billing cannot race the app layer. Active subscriptions skip metering.
- Put Redis in front of AI and guest rate limits. If Redis is unavailable, fall back to in-memory limits instead of allowing unlimited requests.
- Store CV files in object storage. Keep the API, Eve agent, and web app on one Docker Compose host behind Next.js rewrites.
- Eve can search jobs and draft applications, but employer contact only happens after explicit user approval.