Back to .md Directory

Epic Workshop Development Guide

Documents a React Router v7 monorepo for running EpicWeb.dev workshops locally, with build, test, and dev commands.

May 2, 2026
0 downloads
0 views
ai agent mcp workflow
View source

What this file does

Documents a React Router v7 monorepo for running EpicWeb.dev workshops locally, with build, test, and dev commands.

When to use it

  • Setting up a local copy of the Epic Workshop learning environment
  • Contributing to the epicshop repository and need command reference
  • Understanding the monorepo package structure and testing approach

Assumes this stack

React Router v7NxvitestPlaywrightTypeScript

Epic Workshop Development Guide

Overview

Epic Workshop (epicshop) is a React Router v7 monorepo providing a local learning environment for EpicWeb.dev workshops.

Services

ServicePortCommandNotes
Workshop App5639+ (auto-assigned)npm run devMain web UI, runs from example/ directory
Sidecar processesVariousAuto-startedWorkshop-specific, defined in epicshop.sidecarProcesses

Key Commands

TaskCommand
Build allnpm run build
Lintnpm run lint
Formatnpm run format
Unit testsnpm run test
E2E testsnpm run test:e2e
Dev servernpm run dev
Full validationnpm run validate

Architecture Notes

  • Nx orchestration: All build/test/lint commands use nx for automatic dependency ordering and caching
  • Server-only modules: Files with .server suffix in @epic-web/workshop-utils are server-only and cannot be imported in client components
  • Always build before testing: Run npm run build before npm run dev when testing client-side changes
  • Port auto-assignment: The app starts on port 5639 by default but will auto-find an available port if occupied

Package Structure

  • epicshop (packages/workshop-cli): CLI tool
  • @epic-web/workshop-app (packages/workshop-app): Main React Router app
  • @epic-web/workshop-utils (packages/workshop-utils): Shared server utilities
  • @epic-web/workshop-presence (packages/workshop-presence): Optional real-time presence
  • @epic-web/workshop-mcp (packages/workshop-mcp): MCP server for AI assistants

Testing Approach

  • Unit tests use vitest and cover CLI, utils, presence, and MCP packages
  • E2E tests use Playwright and test against the example/ workshop
  • For UI changes, test manually via npm run dev and browser

Agent Workflow

  • If you discover improvements that are unrelated to your current change, first search closed issues to see if the idea was already decided against, then open a new GitHub issue with a concise problem, proposal, and acceptance criteria.

Common Issues

  • If changes aren't reflected, ensure you've run npm run build first
  • The TESTS tab in the UI requires authentication to use

What's inside

6 sections: overview, services table, key commands, architecture notes, package structure, testing approach, agent workflow, common issues.

Change this for your project

  • Replace epicweb-dev/epicshop with your own repository name
  • Replace @epic-web/workshop-utils with your own package scope
  • Replace example/ directory references with your own workshop path

Where it goes

Save in docs/ or the repository root. Gives agents and new contributors a map of the codebase.

Worth borrowing

  • Auto-assigning ports to avoid conflicts during development
  • Using Nx for automatic dependency ordering and caching across monorepo packages
  • Separating server-only modules with a .server suffix to prevent client imports

Related Documents