6293fa89e3
Build and Push Docker Images / build (push) Failing after 1m36s
- New cv-search-models shared library: EF entities + CvSearchDbContext for cvSearch schema (JobSearchTokens, JobSearchSessions, JobSearchResults tables) - New cv-search-job worker service: polls DB for pending sessions, scrapes job boards via configurable HTML scraping, runs LLM scoring via cv-matcher-api, emails ranked results - cv-matcher-api: JobTokenService creates one-time tokens; JobSearchController handles link clicks and creates sessions - api: proxies job-search start endpoint, appends job search link to match result email - CI workflow updated to build and push myai-cv-search-job:staging image - CLAUDE.md documentation added for all affected services Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.3 KiB
2.3 KiB
api — Public-Facing Proxy API
Internal port 8080. The only service exposed to the internet.
Responsibilities
- Validates reCAPTCHA on CV upload and match requests
- Proxies CV operations to
cv-matcher-apivia Refit (ICvMatcherApi,IJobSearchApi) - Sends match result emails via SMTP (
SmtpEmailSender) - Includes a job search link in match emails when a
CvDocumentIdis present - Serves the job-search-start page (
GET /api/cv-matcher/job-search/start?t=<token>) - Enforces rate limiting (
cvMatcherpolicy: 10 req / 10 min) - Enforces CORS (allow list from
Cors__AllowedOrigins__*env vars) - Caches uploaded CV PDFs locally to
FileStorage:Pathfor email attachment
Key routes
| Method | Route | Description |
|---|---|---|
| POST | /api/cv-matcher/upload |
Upload CV PDF, forward to cv-matcher-api |
| POST | /api/cv-matcher/match |
Match CV+job, send email with job search link |
| GET | /api/cv-matcher/job-search/start?t=<token> |
One-click job search start; returns plain HTML |
| GET | /api/health |
Health check |
Job search link flow
- After a successful match with an email,
CvMatcherController.MatchJobcallsIJobSearchApi.CreateTokenAsync - Builds link:
{JobSearch:BaseUrl}/api/cv-matcher/job-search/start?t={tokenId} - Passes link to
SmtpEmailSender.BuildMatchEmailBody(result, jobSearchLink) - When user clicks link →
GET /api/cv-matcher/job-search/start?t=→ proxies tocv-matcher-api POST /api/cv/job-search/token/{tokenId}/start - Returns styled HTML page (Started / AlreadyUsed / Expired / NotFound)
Settings
| Section | Key env var | Notes |
|---|---|---|
CvMatcherApi |
CvMatcherApi__BaseUrl, CvMatcherApi__InternalApiKey |
Shared by both Refit clients |
JobSearch |
JobSearch__BaseUrl |
Base URL for link generation only (maps to JobSearchLinkSettings.BaseUrl) |
FileStorage |
FileStorage__Path |
Directory for cached CV PDFs; shared volume with cv-search-job |
Smtp |
Smtp__Host, Smtp__Username, etc. |
Used by SmtpEmailSender |
Captcha |
Captcha__SecretKey |
reCAPTCHA v3 secret |
HTML page generation
CvMatcherController.HtmlPage(title, message) uses $$""" raw string literal so CSS { / } are literal. Do not change to $""" — causes CS9006.