TraceFolio is a traceable technical portfolio evidence RAG service. It ingests public technical assets such as blog posts, GitHub READMEs, docs, and changelogs, then answers questions only when it can cite retrieved evidence.
This branch is a single-user local prototype. Do not expose it to the public Internet, a shared LAN, a tunnel, or an unauthenticated reverse proxy. The backend, Vite dev/preview servers, and Docker PostgreSQL port bind to 127.0.0.1 by default. Keep these bindings when running locally.
The API has no authentication or user authorization. Blog and local-directory ingest are disabled until the operator configures their allowlists. Set TRACEFOLIO_BLOG_ALLOWED_HOSTS to comma-separated exact trusted HTTPS hosts and TRACEFOLIO_LOCAL_REPO_ALLOWED_ROOTS to comma-separated directories intended for scanning. confirmOwnership=true is still required and does not authorize a directory outside those roots. Local scans skip links outside the selected real root and bound directory traversal and UTF-8 reads.
Blog requests require HTTPS on port 443 and check the configured host and resolved public IP addresses at every redirect. Jsoup resolves the host again when connecting; these application checks do not pin DNS to the actual socket. Use only domains whose DNS you trust. Public or multi-user deployment still requires authentication, request-forgery protection and network egress restrictions, plus OS isolation against concurrent filesystem changes. Keep the service local. See deep audit fixes and reliability notes.
- Java 21
- Spring Boot 4.1.0
- Spring AI 2.0.0 dependencies for model ecosystem alignment
- PostgreSQL + pgvector
- PostgreSQL full text search
- DeepSeek
deepseek-v4-flash - Ollama
bge-m3
- Spring AI 2.0.0 GA and Spring Boot 4.0 / 4.1 baseline: https://spring.io/blog/2026/06/12/spring-ai-2-0-0-GA-available-now/
- Spring AI PGVectorStore starter and dimension guidance: https://docs.spring.io/spring-ai/reference/api/vectordbs/pgvector.html
- DeepSeek model updates: https://api-docs.deepseek.com/updates
- DeepSeek JSON Output: https://api-docs.deepseek.com/guides/json_mode
- GitHub repository contents API: https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28
$env:JAVA_HOME='C:\Program Files\Java\jdk-21'
$env:PATH="$env:JAVA_HOME\bin;$env:PATH"
$env:DEEPSEEK_API_KEY='your_key'
$env:GITHUB_TOKEN='optional_token'
$env:TRACEFOLIO_BLOG_ALLOWED_HOSTS='spring.io'
$env:TRACEFOLIO_LOCAL_REPO_ALLOWED_ROOTS='D:\TraceFolio'
docker compose up -d
mvn test
mvn spring-boot:runTraceFolio maps PostgreSQL to host port 15432 to avoid clashing with existing local PostgreSQL services.
The HTTP API listens on http://localhost:8081.
The browser console is available at http://localhost:8081.
If Maven fails with class file version 65.0 ... recognizes up to 61.0, the shell is still using Java 17. Set JAVA_HOME to a JDK 21 directory before running Maven.
DeepSeek is required for normal answered QA. Without DEEPSEEK_API_KEY, retrieval and trace still work, but answer generation returns ABSTAINED with MODEL_CALL_FAILED: DEEPSEEK_API_KEY is not configured.
Open http://localhost:8081 after the service starts. The console includes:
- runtime status for PostgreSQL, pgvector, Ollama
bge-m3, DeepSeek key, document counts, trace counts, and eval runs - Evidence OS audit for claim, repo scan, workflow, and portfolio invariants
- GitHub README/docs ingest
- blog ingest
- EvidenceClaim extraction from existing chunks
- read-only GitHub and confirmed local repository evidence scan
- product roadmap board for V1-V6 completion, acceptance criteria, release gate, and blockers
- JD Evidence Compiler for JD parsing, evidence matrix, resume draft, refusal list, and gap project planning
- full product-loop workflow that produces a replayable run and a reusable Evidence Pack in one call
- auditable JD evidence workflow replay
- Portfolio Evidence Pack export with capability radar, JD matrix, resume draft, interview defense, gap projects, and refusal boundaries
- grounded QA
- trace replay with RRF scores and retrieved chunks
- suite-aware eval runner with core/JD/repo/workflow/portfolio coverage
The production UI is served by Spring Boot from src/main/resources/static. The source UI lives in frontend/ and uses Vue 3 + Vite. The workbench is split into page modules under frontend/src/pages, shared state/API wiring under frontend/src/composables, and reusable UI components under frontend/src/components.
For frontend development:
cd frontend
npm install
npm run devVite runs on http://localhost:5173 by default, or the next free port if 5173 is busy, and proxies /api to http://localhost:8081.
To rebuild the Spring Boot static UI:
cd frontend
npm run buildPOST /api/ingest/blogPOST /api/ingest/githubPOST /api/qaGET /api/traces/{traceId}POST /api/evals/runPOST /api/jd/compilePOST /api/jd/matchGET /api/jd/runs/{runId}POST /api/resume/compilePOST /api/gaps/projectsPOST /api/claims/extractGET /api/claimsPOST /api/repos/scanPOST /api/workflows/jd-evidence/runPOST /api/workflows/repo-evidence/runPOST /api/workflows/product-loop/runGET /api/workflows/{runId}POST /api/portfolio/exportGET /api/portfolio/exportsGET /api/portfolio/exports/{exportId}GET /api/portfolio/exports/{exportId}/contentGET /api/audit/evidence-osGET /api/product/roadmapPOST /api/workflows/{runId}/decisionsPOST /api/workflows/{runId}/resumePOST /api/workflows/{runId}/steps/{stepIndex}/retry
The JD Evidence Compiler is the first application layer on top of TraceFolio. It is not a generic ATS keyword optimizer.
Pipeline:
- Parse the JD into atomic requirements.
- Match each requirement against retrieved public evidence.
- Label each requirement as
SUPPORTED,WEAKLY_SUPPORTED,UNSUPPORTED, orGAP_PROJECT_REQUIRED. - Compile only supported or weakly supported claims into a resume draft.
- Refuse unsupported work experience, production-scale, big-company, revenue, or adoption claims.
- For hard gaps, generate a 3-7 day minimum evidence project and GitHub reference search strategy.
GitHub Scout searches reference repositories only for learning and implementation planning. Reference projects are never treated as the user's own experience.
This branch now implements the first product-loop slice of the larger TraceFolio roadmap:
EvidenceClaimlayer: extracts structured capability claims from imported chunks. Every claim must link to a source chunk and keep an original quote.- Claim validation: claims now carry
validationStatusandfreshness; missing quote/source/ref claims are invalid, and overclaimed wording is marked for review. - Repo Evidence Extractor V2: scans selected public GitHub repositories or confirmed local repositories in read-only mode, supports
FAST/DEEP, include/exclude paths, commit snapshot, file hash, symbol type, line anchors, and warnings. - Repo scan evidence is promoted into
EvidenceClaimwithsource_ref_type=REPO_SCAN, file path, line anchor, quote, strength, risk level, symbol metadata, and source kind. - Auditable workflow:
POST /api/workflows/jd-evidence/runrunsclaim extract -> JD compile -> evidence match -> resume compile -> validate resume claims -> gap planand persists each step. - Repo evidence workflow:
POST /api/workflows/repo-evidence/runrunsvalidate repo scope -> repo scan -> validate repo evidence -> Evidence OS audit. - Product loop workflow:
POST /api/workflows/product-loop/runrunsrepo scan -> claim extract -> JD compile -> evidence match -> resume compile -> validate -> gap plan -> portfolio export -> audit -> readiness, then returns a single replayable run. - Human review:
POST /api/workflows/{runId}/decisionsrecordsAPPROVED,REJECTED, orNOTEdecisions for risky steps;resumeandretryendpoints append auditable review/retry events without hiding history. - Portfolio Evidence Pack: exports Markdown or HTML from EvidenceClaim plus an optional JD run, including capability radar, project evidence pages, JD match package, resume draft, interview defense cards, gap roadmap, and usage boundaries. Export runs a privacy scan and redacts local paths or secret-like assignments.
- Product Roadmap:
GET /api/product/roadmapreports the V1-V6 product route, completion, acceptance criteria, differentiators, release gate, and runtime blockers. - Evidence OS Audit:
GET /api/audit/evidence-oschecks whether claims have quotes, sources are linked, repo scans generated claims, workflows have replay steps, and portfolio exports are non-empty.
PDF export, multi-user SaaS, automatic repository modification, browser extension, PDF OCR, and auto-apply workflows remain out of scope for this slice.
Invoke-RestMethod http://localhost:8081/api/ingest/blog `
-Method Post `
-ContentType 'application/json' `
-Body '{"url":"https://spring.io/blog/2026/06/12/spring-ai-2-0-0-GA-available-now/"}'
Invoke-RestMethod http://localhost:8081/api/ingest/github `
-Method Post `
-ContentType 'application/json' `
-Body '{"owner":"RyanCoreAI","repo":"patchbrake","path":"README.md"}'
$qa = Invoke-RestMethod http://localhost:8081/api/qa `
-Method Post `
-ContentType 'application/json' `
-Body '{"question":"PatchBrake 是什么?"}'
Invoke-RestMethod "http://localhost:8081/api/traces/$($qa.traceId)"
Invoke-RestMethod http://localhost:8081/api/evals/run `
-Method Post `
-ContentType 'application/json' `
-Body '{"suite":"core","tags":[],"failFast":false}'
Invoke-RestMethod http://localhost:8081/api/claims/extract `
-Method Post `
-ContentType 'application/json' `
-Body '{"clearExisting":false,"limit":500}'
Invoke-RestMethod http://localhost:8081/api/repos/scan `
-Method Post `
-ContentType 'application/json' `
-Body '{"source":"GITHUB","owner":"RyanCoreAI","repo":"TraceFolio","scanMode":"FAST","maxFiles":28}'
Invoke-RestMethod http://localhost:8081/api/repos/scan `
-Method Post `
-ContentType 'application/json' `
-Body '{"source":"LOCAL","owner":"RyanCoreAI","repo":"TraceFolio","localPath":"D:\\TraceFolio","confirmOwnership":true,"scanMode":"DEEP","includePaths":["src/main","src/test","frontend/src"],"excludePaths":["target","node_modules","dist"],"maxFiles":40}'
Invoke-RestMethod http://localhost:8081/api/workflows/repo-evidence/run `
-Method Post `
-ContentType 'application/json' `
-Body '{"repoScan":{"source":"LOCAL","owner":"RyanCoreAI","repo":"TraceFolio","localPath":"D:\\TraceFolio","confirmOwnership":true,"maxFiles":40}}'
$productLoop = Invoke-RestMethod http://localhost:8081/api/workflows/product-loop/run `
-Method Post `
-ContentType 'application/json' `
-Body '{"jdText":"Java Spring Boot RAG PGVector Docker CI/CD","repoScan":{"source":"LOCAL","owner":"RyanCoreAI","repo":"TraceFolio","localPath":"D:\\TraceFolio","confirmOwnership":true,"maxFiles":40},"runRepoScan":true,"extractClaims":true,"targetDays":5,"portfolioFormat":"MARKDOWN","maxClaims":40}'
Invoke-RestMethod "http://localhost:8081/api/portfolio/exports/$($productLoop.output.portfolioExport.exportId)/content"
$workflow = Invoke-RestMethod http://localhost:8081/api/workflows/jd-evidence/run `
-Method Post `
-ContentType 'application/json' `
-Body '{"jdText":"Java Spring Boot RAG PGVector Docker CI/CD","targetDays":5,"extractClaims":true}'
Invoke-RestMethod "http://localhost:8081/api/workflows/$($workflow.runId)/decisions" `
-Method Post `
-ContentType 'application/json' `
-Body '{"stepName":"validate_resume_claims","decision":"APPROVED","reason":"人工确认 quote 和拒写边界可以接受。"}'
Invoke-RestMethod "http://localhost:8081/api/workflows/$($workflow.runId)/resume" `
-Method Post `
-ContentType 'application/json' `
-Body '{"reason":"人工确认后恢复","metadata":{"surface":"powershell-smoke"}}'
Invoke-RestMethod http://localhost:8081/api/portfolio/export `
-Method Post `
-ContentType 'application/json' `
-Body (@{ title="TraceFolio Evidence Pack"; format="MARKDOWN"; jdRunId=$workflow.output.jdRunId; maxClaims=30 } | ConvertTo-Json)
Invoke-RestMethod http://localhost:8081/api/product/roadmap
Invoke-RestMethod http://localhost:8081/api/audit/evidence-osTraceFolio API responses force application/json;charset=UTF-8 for /api/*, and the browser UI uses <meta charset="UTF-8">.
If a Windows terminal still displays Chinese incorrectly, run this once in the current PowerShell session:
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new()
$OutputEncoding = [System.Text.UTF8Encoding]::new()
chcp 65001The browser console is the recommended smoke-test surface for users who do not want to debug shell encoding.
npm run build: passed.mvn test: 23 tests passed with Java 21.mvn -DskipTests package: passed.docker compose config --quiet: passed.git diff --check: passed.- Spring Boot jar smoke on
http://localhost:8081:/,/assets/index-FgqRyK6h.js, and/api/runtime/statusreturned 200. - Runtime status: PostgreSQL connected, pgvector enabled, 14
rag_*tables, Ollamabge-m3reachable with 1024 dimensions. - Evidence OS audit:
READY, 7/7 checks passed. - Product-loop smoke:
POST /api/workflows/product-loop/runcompleted 10 replayable steps and returnedPRODUCT_BASELINE_READY. - DeepSeek
DEEPSEEK_API_KEYwas not configured in the local shell, so answered QA and answer-oriented eval cases still require configuring the key before final QA acceptance.