Skip to main content
Portfolio case studies in next-dev-portfolio live in src/data/collections/projects/projects.json. Like blog posts, the file is a keyed object where each top-level key is the project’s slug and each value is a fully typed project record. The structured fields — context, problem, architecture, result — encourage you to write each case study as a coherent narrative rather than a bullet list, which makes a stronger impression on anyone reading your work.

File Location

Data Structure

The top-level object maps slug → project:

Required Fields

Every project record must include all of the following fields. The Zod schema will reject the build if any field is missing or has the wrong type.

Optional Fields

The role Field

Use the role field to set your title or contribution on this specific project. Be specific — "Lead systems architect" communicates more than "Engineer".

The stack Array

List technologies in the order that best reflects your contribution — lead technologies first. These are rendered as pill tags on the project detail page.
Setting featured: true makes the project eligible to appear in the featured-projects section on the home page. The section’s limit field in src/data/pages/home.json caps the total number shown — featured projects are selected in the order they appear in projects.json.
If you have more featured: true projects than the home page limit allows, the extras are simply not shown on the home page. They remain fully accessible at their /work/[slug] URLs and in the full work listing.

The image Object

When provided, the hero image object requires two sub-fields:

How Projects Are Displayed

Home page — featured projects

The featured-projects section on src/data/pages/home.json pulls projects where featured: true, up to the configured limit.

Work list page — /work

The projects-list section on src/data/pages/work.json renders all projects in the order they appear in projects.json.
To control how many featured projects appear on the home page, open src/data/pages/home.json and update the limit in the featured-projects section:

Dynamic Route

Every project is accessible at /work/[slug], where [slug] is the top-level key in projects.json. The template at src/data/pages/work/[slug].json configures the project-detail section that assembles the full case study layout from the project’s structured fields.

Adding a New Project

1

Open projects.json

Open src/data/collections/projects/projects.json in your editor.
2

Append a new entry

Copy an existing project object and paste it as a new key-value pair. Choose a URL-safe slug: lowercase letters, numbers, and hyphens only.
3

Fill in every required field

Write context, problem, architecture, and result as full paragraphs. See the best practices section below for guidance on what each should say.
4

Rebuild the site

The Zod schema validates every project at build time. Missing or mistyped fields produce a descriptive error with the field path.

Best Practices for Case Study Writing

The four narrative fields are the heart of each case study. Treat them as short paragraphs, not bullet lists.
A strong result paragraph often mirrors the problem paragraph — if the problem was “publish errors happened weekly”, the result is “publish errors dropped 40% in the first sprint”. This symmetry makes the impact immediately legible.

Complete Project Example