Portfolio Content API use case — power your personal site or portfolio from a single project-scoped API.
What this is (short answer): A pattern for portfolios that combines project showcases and writing into one source-of-truth, delivered via a lightweight Dev API so your frontend can render projects, blog posts, and metadata consistently.
Why teams choose this model
- Single repository of truth for projects and articles.
- Reusable Dev API for custom frontends and static sites.
- Clean separation: public pages for canonical URLs + API for app consumption.
Implementation outline
- Model
projectsandarticlesin separate collections inside one project. - Use the Dev API to fetch lists and single items in your frontend.
- Render canonical URLs on your chosen domain; keep
last updatedandauthormetadata on each paper.
Example: fetch a paper via Dev API (JavaScript)
js
fetch('https://api.whitepapper.example/projects/{projectId}/papers/{paperId}', {
headers: { 'Authorization': 'Bearer <DEV_API_KEY>' }
})
.then(r=>r.json())
.then(paper => console.log(paper.title, paper.metadata.canonical))Checklist
- Projects and articles separated into distinct collections
- Dev API keys scoped and rotated regularly
- Canonical URLs and schema on public pages