This repo is the starter project for our first Codex Lab student exercise.
It already includes a working student directory and network graph built with Next.js. The goal of the first session is for each student to turn the directory into a routed profile system by building their own member page inside the site.
The directory homepage should stay at /. Clicking a student's name in the
directory should open that student's page at /members/[id], reusing the
existing hyphenated ids from lib/members.ts.
Each student should:
- Make their name clickable in the directory.
- Create a dedicated member page at
/members/[id]. - Extend the shared
Memberdata model with profile information. - Add optional custom sections that reflect their personality, projects, or experiments.
- Keep the experience polished on desktop and mobile.
The homepage should remain the main directory. The member page should feel like an extension of the same site, not a separate microsite.
/: student directory homepage/members/[id]: routed member pages such as/members/ryan-fernandes
Use the existing Member.id value as the route key. Do not introduce a second
slug system for this lab.
The primary clickable target for this assignment is the student name in the directory list. Graph-node navigation is optional and not part of the baseline requirement.
Every student page should include a shared set of profile fields so the directory stays coherent:
headlinemajor/yearlocationbuilder typeintereststools usedprojects/startuprepo/demo links
Students can add whatever else they want beyond those shared fields:
- experiments
- media
- notes
- favorite prompts
- build logs
- writing
- anything else they want to showcase
- Next.js 16 App Router
- React 19
- Tailwind CSS 4
- Framer Motion
- Vitest
- Playwright
These steps are for students starting from a mostly clean Mac. If you already
have git, brew, gh, node, and pnpm, you can skip to
Local Development.
This gives you Git and other developer tools that many JavaScript packages expect.
xcode-select --installAfter that finishes, confirm Git is available:
git --versionHomebrew is the package manager we will use for the rest of the setup.
Official site: brew.sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"When the installer finishes, follow the exact "Next steps" it prints in
Terminal so brew is added to your shell correctly. The command differs
between Apple Silicon and Intel Macs.
Then verify it worked:
brew --versionGitHub CLI makes it much easier to clone the repo, authenticate Git, and push your branch.
Official site: cli.github.com
brew install gh
gh auth login
gh auth statusRecommended options during gh auth login:
- Choose
GitHub.com - Choose
HTTPS - Say
yeswhen it asks whether Git should authenticate with your GitHub credentials
Install the current LTS version of Node.js from the official download page:
After installing it, confirm both Node and npm are available:
node --version
npm --versionIf you prefer, you can also install Node with Homebrew. The official installer is usually the least confusing option for students.
This repo uses pnpm as its package manager.
Official docs: pnpm installation
Recommended setup:
npm install --global corepack@latest
corepack enable pnpm
pnpm --versionIf you want a Homebrew-based fallback instead, pnpm's docs also support:
brew install pnpmUse your regular macOS Terminal for the initial clone. That is the least confusing path for first-time setup.
If you have GitHub CLI set up:
gh repo clone danielapassos/Codex-Lab
cd Codex-LabIf you prefer plain Git:
git clone https://github.com/danielapassos/Codex-Lab.git
cd Codex-LabRun dependency installation from the same Terminal window after cd Codex-Lab.
pnpm installYou can also run pnpm install from Codex after opening the repo, because
Codex runs commands in the project workspace too. For a first-time setup, the
recommended flow is:
- clone in macOS Terminal
cdinto the repo in macOS Terminal- run
pnpm installin macOS Terminal - then open the folder in Codex
Once the repo is on your machine, open the Codex-Lab folder in the Codex app.
Recommended first steps inside Codex:
-
Confirm Codex opened the correct folder.
-
Create your feature branch before editing anything:
git checkout -b codex/<your-name>-profile-page
-
Ask Codex to inspect the repo before editing. Example:
Inspect this repo and summarize the current architecture before making changes. -
Ask Codex to implement your feature with clear constraints. Example:
Add routed member pages at /members/[id], make student names clickable from the directory, preserve the current visual style, and run lint and typecheck when you're done. -
Review the diff and test results before you commit.
Short version:
- clone and install dependencies in macOS Terminal
- open the folder in Codex
- create a branch
- ask Codex to inspect the repo first
- ask Codex to make the change
- ask Codex to run verification commands
- review the diff before commit
If you are starting from scratch, use this exact sequence:
- Clone the repo in macOS Terminal.
- Run
cd Codex-Lab. - Run
pnpm install. - Open the
Codex-Labfolder in the Codex app. - In Codex, create a branch named
codex/<your-name>-profile-page. - Ask Codex to inspect the repo and explain the current structure before editing.
- Ask Codex to make your feature change.
- Ask Codex to run
pnpm lint,pnpm typecheck, and any relevant tests. - Review the diff.
- Commit and push your branch.
You can run local commands either in macOS Terminal or by asking Codex to run them in the repo. Both act on the same project files.
pnpm devThen open http://localhost:3000.
No environment variables are required for the current lab flow. The
.env.example file is there for future expansion.
This project is set up to treat Git as the source of truth for production.
- Production deploys on Vercel must include Git metadata such as branch, repo, and commit SHA.
pnpm buildruns a prebuild check that fails a Vercel production deploy if it was uploaded without that metadata.- The site shows a build provenance panel so anyone can verify which commit a deployment came from.
- Keep Vercel's "Automatically expose System Environment Variables" setting enabled, because the deployment check relies on those values.
Operational rule:
- Do not use
vercel --prodfrom a local workspace for this project. - Push the intended commit to GitHub and let the connected Vercel project build from
main. - If a local clone and Vercel ever disagree, compare the live deployment's build provenance to the Git commit history before assuming the clone is wrong.
For anyone cloning or extending this repo, follow these rules:
- GitHub
mainis the source of truth for production. - Use a feature branch whose name starts with
codex/. - Install dependencies before opening the repo in Codex, unless you intentionally want Codex to run that setup for you.
- Ask Codex to inspect the codebase before asking it to edit files.
- Run verification before pushing:
pnpm lint,pnpm typecheck, and the relevant tests. - Review the diff before committing.
- Treat screenshots,
.next/, and other generated artifacts as outputs, not source code. - Never use
vercel --prodfrom a local machine for this project. - Use Vercel previews for branch work and merge to
mainfor production.
app/page.tsx: directory homepage entry pointapp/members/[id]/page.tsx: routed member pagescomponents/directory-home.tsx: homepage composition and graph statecomponents/member-table.tsx: mobile and desktop directory UI with member linkscomponents/member-profile-page.tsx: shared shell for each student's pagecomponents/network-graph.tsx: interactive student network graphlib/members.ts: member data, profile fields, and route idscomponents/member-table.test.tsx: unit tests for the directory tabletests/e2e/home.spec.ts: Playwright coverage for the directory and member pages
Build a routed member page that opens when a student name is clicked from the directory and displays richer information for that person.
Each student's page should stay within the shared visual system of the site, but the content should feel personal.
At minimum, each student page should include:
headlinemajor/yearlocationbuilder typeintereststools usedprojects/startuprepo/demo links
Students may also add extra sections for experiments, notes, media, writing, or anything else they want to publish.
If you add fields, update the Member type in lib/members.ts so
the data model stays explicit.
- Clicking a student name navigates to that student's page at
/members/[id]. - Direct navigation to a valid member URL works.
- Invalid member ids render a not-found experience.
- The member page includes:
Codex Labin the header- the student's name in the main title position
- a
Back to directorylink pointing to/
- The page remains readable on small screens.
- Existing directory content still works, including social/profile links.
pnpm lintandpnpm typecheckpass before submission.
- Extend the
Membertype and the relevant student record inlib/members.ts. - Add a dynamic route such as
app/members/[id]/page.tsx. - Update
components/member-table.tsxso student names link to the routed page. - Build or extend a shared member page component that renders the required profile fields.
- Add optional custom sections for any content you want beyond the shared structure.
- Add or update tests in
components/member-table.test.tsxandtests/e2e/home.spec.ts.
Create a branch before you start:
git checkout -b codex/<your-name>-profile-pageExamples:
codex/jason-profile-pagecodex/mark-member-page
- Open the repo in the Codex app.
- Ask Codex to inspect the current code before editing anything.
- Be specific about the outcome, the files, and the constraints.
- Ask Codex to keep changes minimal and preserve the existing visual style.
- Ask Codex to run verification commands after making changes.
- Review the diff before you commit.
Good prompts usually include:
- the feature you want
- the files or components to start from
- the behavior that must stay intact
- the commands Codex should run to verify the work
Weak prompt:
Make this better.
Strong prompt:
Inspect this repo and add routed member pages at /members/[id]. Make student names clickable from the directory, preserve the current visual language, and run pnpm lint and pnpm typecheck when you're done.
Another useful prompt:
Extend the Member type in lib/members.ts with headline, majorYear, tools, and projects. Add those fields for my student record, render them on my routed member page, and update the relevant tests.
Run these commands before submitting your work:
pnpm lint
pnpm typecheck
pnpm test:unit
pnpm test:e2epnpm test:e2e starts its own local dev server through Playwright, so you do
not need to manually start a second server for that command.
- Your branch name starts with
codex/ - A student name navigates to a routed member page
- Your profile content appears on that page
- The page includes a working
Back to directorylink - Lint and typecheck pass
- You reviewed the diff before commit
The current student dataset lives in lib/members.ts.
Today, each member includes:
idnameuniversitywebsiteavatarlinksprofile
The shared profile object is expected to include:
headlinemajorYearlocationbuilderTypeintereststoolsprojectsrepoDemoLinksaboutcustomSections