TypeScript 1,379 FILES 12 FINDINGS

HOW REMIX
ACTUALLY WORKS

Build better websites. The full stack web framework from Shopify. Conventions, patterns, and architecture extracted from the remix-run/remix repository by sourcebook.

QUICK_REF:
Testing: Node.js built-in test runner Auth: auth middleware Exports: Named exports preferred

WHAT_MATTERS

  • Strongly prefers named exports over default exports (39:1 ratio) — use export function, not export default

  • demos/bookstore/app/routes.ts is a hub file (imported by 53 files) — changes here ripple everywhere

  • Auth uses auth middleware — logic lives in packages/auth-middleware/src/index.ts

KEY_FINDINGS

This is a monorepo. Changes may affect multiple packages.

HIGH

Tests are co-located with source files. Keep this pattern — don't create a separate test/ directory.

HIGH

Project uses barrel exports (index.ts files that re-export). Import from the directory, not from deep paths.

HIGH
24 barrel export files found

Environment variables are documented in .env.example. Copy it to .env.local before running.

HIGH

Strongly prefers named exports over default exports (39 named vs 1 default). Use export function, not export default.

HIGH

Tests use Node.js built-in test runner.

HIGH
11 test files

Auth uses auth middleware. Auth logic lives in packages/auth-middleware/src/index.ts.

HIGH
4 files

Generated files detected (packages/mime/scripts/codegen.ts, etc). Do NOT edit directly.

HIGH
2 generated files

UI components live in: demos/sse/app/ui, demos/social-auth/app/ui, demos/frames/app/ui.

HIGH
3 component directories

Hub files: demos/bookstore/app/routes.ts (53 files); demos/bookstore/app/data/schema.ts (38 files); demos/bookstore/app/ui/layout.tsx (23 files); packages/component/src/lib/jsx.ts (22 files); demos/bookstore/app/utils/render.tsx (19 files). Changes here have the widest blast radius.

HIGH

Circular import chains detected: parse.ts → part-pattern.ts; route-pattern.ts → part-pattern.ts → parse.ts; route-pattern.ts → part-pattern.ts → href.ts. Avoid adding to these cycles.

HIGH

83 dead code candidates detected. Review and clean up unused exports.

HIGH
GENERATED IN ~3 SECONDS WITH

npx sourcebook init

VIEW ON GITHUB star

FROM_THE_BLOG

RELATED_REPOS