ResuMaxxing is a career operating system built for high-velocity resume tailoring, job application tracking, and AI-driven document review. It's a decoupled, client-server architecture designed to move fast without sacrificing the guardrails that matter when AI is touching someone's actual resume. Engineered and shipped end-to-end, solo.
Architecture Overview
The system follows a clean client-server split. The frontend and backend are fully decoupled — they share nothing except an HTTP contract and a JWT token. This means the backend can be scaled, replaced, or load-balanced without touching a line of frontend code, and vice versa.
AI Prompt Engineering & Guardrail Pipeline
Generative AI on a user's resume is a high-stakes operation. A hallucinated skill or fabricated metric on a resume someone submits to an employer is not a minor bug — it's a trust violation. Every model invocation in ResuMaxxing is constrained by a four-layer guardrail system:
- Strict JSON schema enforcement: All generative endpoints use
response_format={"type":"json_object"}to guarantee deterministic, parseable responses. The model cannot return freeform text. - Exact 1-to-1 bullet matching: Bullet customization algorithms extract individual sentences from the raw resume and enforce that the output count matches exactly — no merging bullets, no splitting bullets.
- Anti-hallucination vocabulary constraints: System prompts explicitly prohibit introducing technologies, skills, or metrics not present in the input. Synonym replacement is bound strictly to exact action-verb matches in the target job description.
- Domain isolation: Prompts forbid converting domain-specific achievements across disciplines. Frontend wins stay frontend wins. Backend achievements are not reframed as infrastructure wins.
Enterprise Billing Architecture
The billing system is event-driven and non-blocking by design. Lemon Squeezy sends signed webhook events on subscription changes. The architecture has three hard requirements: instant acknowledgment, idempotency, and no dead-session bugs.
- Instant acknowledgment (<50ms): The webhook endpoint returns HTTP 200 immediately after HMAC-SHA256 signature verification using
hmac.compare_digest— constant-time comparison to prevent timing attacks. The actual tier upgrade runs in a FastAPIBackgroundTaskto avoid Lemon Squeezy retry timeouts. - Independent session lifecycle: Background tasks create their own
AsyncSessionLocal()database sessions. The HTTP request context is already closed by the time the background task runs — using the request session would cause a dead-session exception. - Idempotency guard: Event IDs are logged before any tier upgrade. Duplicate webhooks from network retries are detected and silently skipped — no double-crediting of user quotas.
Security & Privacy
- GDPR right-to-be-forgotten: Listens for Clerk
user.deletedwebhooks verified via Svix cryptographic signatures. On receipt, the system triggers a cascade deletion across all database tables — resume versions, vault snapshots, tracked jobs, activity telemetry — automatically. - IDOR prevention: Every database query filters by both the record ID and the authenticated user's ID. A malicious user querying another user's resume version or tracked job receives HTTP 404, not 403 — no information leakage about resource existence.
- Content Security Policy: CSP middleware accommodates
capacitor://localhost(iOS) andhttp://localhost(Android) origins with strictframe-ancestors: DENYshielding.
Performance Design
- Decoupled JWKS verification: Auth overhead is eliminated by caching RSA public keys once at boot. Token verification is local and runs in microseconds.
- Non-blocking telemetry: Activity logs (
TARGET_ACQUIRED,ZAP_GENERATED) are dispatched asynchronously, preventing database lock contention from slowing primary API responses. - Async database connections: SQLAlchemy 2.0 with
aiomysqluses non-blocking connection pools. Under concurrent load, requests yield to the event loop rather than blocking threads. - Optimized PDF parsing: Text extraction during resume roasts avoids expensive vector-layout parsing steps that can freeze on complex PDFs.
Rate Limiting Matrix
| Endpoint | Route | Limit | Strategy |
|---|---|---|---|
| Guest Tailor | POST /resumes/guest-tailor |
5 / min | Public IP rate shield |
| Guest Roast | POST /resumes/guest-roast |
5 / min | PDF type check + 10MB stream guard |
| Resume Tailor | POST /resumes/generate |
10 / min | User ID limiter + quota check + IDOR guard |
| DOCX Export | POST /resumes/{id}/export-docx |
30 / min | Subscription tier verification (premium_1/premium_2) |
| Job Creation | POST /jobs/ |
30 / min | Input sanitization (sanitize_text, sanitize_url) |
Feature → Endpoint Mapping
| Feature | Endpoint | Infrastructure |
|---|---|---|
| Guest Bullet Tailoring | POST /resumes/guest-tailor |
GPT-4o-mini, strict 1-to-1 sentence extraction |
| PDF Resume Roasting | POST /resumes/guest-roast |
pdfplumber text/hyperlink extraction + AI roast engine |
| Master Resume AI Tailoring | POST /resumes/generate |
GPT-4o + versioning engine (ResumeVersion model) |
| Technical Skill Gap Analysis | POST /resumes/skill-gap |
Persistent gap engine (SkillGap model, urgency weights) |
| Job Description URL Extraction | POST /jobs/extract-url |
Async scraper + BeautifulSoup parser |
| Editable DOCX Export | POST /resumes/{id}/export-docx |
python-docx buffer stream, tier-guarded (premium) |
Technology Stack
| Layer | Technology | Purpose |
|---|---|---|
| Frontend framework | Next.js App Router | Server & client components, SSG/SSR hybrid rendering |
| Mobile runtime | Capacitor | Native bridging for Android & iOS builds from one codebase |
| Styling & UI | Tailwind CSS v4 + Shadcn UI + Framer Motion | Utility-first design system with micro-animations |
| State management | Zustand | Lightweight reactive client-side store |
| Backend framework | FastAPI (Python 3.12) | High-concurrency async ASGI web server |
| ORM & database | SQLAlchemy 2.0 + Alembic | Async database access & versioned migrations via aiomysql |
| Authentication | Clerk Auth | Passwordless, OAuth, JWKS JWT decoding with local key cache |
| AI integration | OpenAI API (GPT-4o & GPT-4o-mini) | Resume tailoring, roasting, skill gap analysis |
| Document engine | pdfplumber & python-docx | PDF extraction & DOCX resume generation |
| Logging & telemetry | structlog (JSON logging) | Structured production logging & ISO context rendering |
| Rate limiting | SlowAPI | IP and user ID based API rate throttling |
| Billing integration | Lemon Squeezy + Svix Webhooks | Subscription tiering & HMAC-signed event handling |
Notes
The hardest part of this project wasn't the AI integration — it was making the AI integration trustworthy. Anyone can wire up an OpenAI call and get a plausible-looking resume out. Getting it to never fabricate, never merge bullets, never shift a frontend achievement into backend territory — that required treating prompt engineering as a specification problem, not a prompt-tweeking problem. Every guardrail was written before the endpoint was, not after.
The billing architecture also taught me something worth keeping: the moment a webhook returns 200, you've acknowledged receipt. What happens after that is your responsibility, not the payment gateway's. Designing for that separation — instant ack, async work, idempotency at every retry — is what separates a payment integration from a payment incident waiting to happen.