Skip to content

About

An interactive 3D lesson on how a cell reads a protein-coding gene.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EXPRESSION

From gene to protein

Live demo: xpression-lab.vercel.app CI status on main License: MIT Node.js 22 or later WebGL with an SVG fallback

EXPRESSION is an interactive 3D lesson about how a eukaryotic cell reads a protein-coding gene. Follow one illustrative messenger RNA (mRNA) from its first transcription in the nucleus to a ribosome releasing a short chain of amino acids. Open the lesson in your browser.

The lesson is designed to make the handoffs visible. You can identify a structure, pause at the moment it acts, then scrub backward to see what changed. The same message connects the chapters, so the cap, joined exons, and tail remain recognizable as the view changes scale.

The journey

Chapter What you explore
The cell Orient yourself in a cutaway cell and trace the route from the nucleus to a ribosome.
Transcription Watch RNA polymerase copy the gene and release a capped RNA transcript.
RNA processing See the intron removed, the exons joined, and a poly(A) tail added.
Nuclear export Follow the mature message through a nuclear pore into the cytoplasm.
Translation Watch the ribosome read codons, extend the peptide, and release it at the stop codon.

Choose a chapter or press Play to follow the guided tour. Drag to orbit, scroll or pinch to zoom, and select a structure to read its explanation. Use the playhead to revisit a phase or Focus structure to move the camera to a visible selection.

The model uses illustrative spatial scales and timings. The example ends with a released peptide. For the underlying biology, see How do genes direct the production of proteins? and How Cells Read the Genome: From DNA to Protein.

Design

The interface takes its cues from a science museum exhibit. A dark stage gives the model room, while the nearby context panel explains what you are seeing. Across chapters, cool blues mark DNA, amber marks RNA, muted violet marks molecular machinery, and cream-gold marks the peptide. The wordmark rests on the export-ready message: 5′ cap, joined exons, and poly(A) tail. Design tokens and visual direction

React and TypeScript drive the lesson, and Three.js with React Three Fiber renders its procedural scenes. The scene, event caption, and translation codon strip read the same chapter playhead. That lets the lesson show the same event whether you arrive through playback or by scrubbing.

If WebGL fails or is unavailable, the app switches to an illustrated SVG view. Chapter navigation, playback, captions, and explanations remain available. The camera and ambient effects respect the system's reduced-motion preference.

Run locally

Use Node.js 24 LTS to match CI. The minimum for local development is Node.js 22. Use the pnpm version pinned in the root manifest. If you manage pnpm with Corepack, run corepack enable first.

From the repository root, install and start the app.

pnpm install --frozen-lockfile
pnpm --filter @vibe/app-vite dev

Open the URL printed by Vite. The app runs in the browser and requires no API keys or environment variables.

Build and verify

After the frozen install, run pnpm verify. It runs the format check, lint, the app typecheck, the UI typecheck, the app tests, the production build, and the dist check, and stops at the first failure. Run one step alone with the commands below it.

pnpm verify
pnpm format:check
pnpm lint
pnpm --filter @vibe/app-vite test
pnpm --filter @vibe/app-vite typecheck
pnpm --filter @vibe/ui exec tsc --noEmit
pnpm --filter @vibe/app-vite build:client
node scripts/check-dist.mjs

Serve the build locally with pnpm --filter @vibe/app-vite preview. Add ?xp-fallback=1 to the URL to check the illustrated view.

GitHub Actions runs the same checks as pnpm verify for pull requests into main and pushes to main. Each successful run retains the built site as the expression-dist artifact for seven days. Download and extract it into apps/vite/dist/ to inspect that build with Vite preview. CI workflow

Deployment

Vercel's Git integration deploys the site. Each merge to main publishes the production build to xpression-lab.vercel.app. Vercel uses the install, build, output, and SPA fallback settings in the repository. Vercel configuration Vercel Git deployments

To host the build elsewhere, publish apps/vite/dist/ and configure the host to serve index.html for direct app routes. The default build serves from the domain root. To build for a subpath such as /expression/, use pnpm --filter @vibe/app-vite exec vite build --base /expression/.

Contributing

Branch from main, run pnpm verify, and open a pull request back to main. Wait for build-and-typecheck and address review feedback before merging. Use Conventional Commits with an imperative subject, a required body, and every line at most 72 characters. Contributor instructions

For interaction or scene changes, include the chapter, view, and playhead position in the PR so a reviewer can reproduce your checks. Record user-visible changes under Unreleased. Changelog

Repository layout

  • The Vite app contains routing, the lesson, and its design tokens. apps/vite
  • The expression module contains the instructional timeline, playback and selection store, chapter scenes, and shared Three.js utilities. Expression module
  • Node tests cover behavior that can be verified without a browser. apps/vite/tests
  • The shared workspaces expose React UI primitives and TypeScript settings. packages/ui packages/config
  • GitHub Actions, PR and issue templates, and repository guidance live under .github. Design plans and contributor references live under docs. .github docs

License

EXPRESSION is released under the MIT License.

About

An interactive 3D lesson on how a cell reads a protein-coding gene.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages