TypeScript 5,141 FILES 6 FINDINGS

HOW WASP
ACTUALLY WORKS

The fastest way to develop full-stack web apps with React and Node.js. Conventions, patterns, and architecture extracted from the wasp-lang/wasp repository by sourcebook.

QUICK_REF:
Routing: Express app routes Data fetching: React Query (useQuery/useMutation)

WHAT_MATTERS

  • Uses Express routes for API endpoints — follow this pattern for new routes

  • Data fetching uses React Query — use useQuery/useMutation for new data operations

  • Barrel exports pattern — import from the directory, not from deep paths

KEY_FINDINGS

Tests are co-located with source files (*.test.ts next to *.ts). Keep this pattern.

HIGH

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

HIGH
10 barrel export files found

API endpoints use Express app routes. Follow this pattern for new routes.

HIGH
11 files use Express app routes

Data fetching uses React Query (useQuery/useMutation). Follow this pattern for new data operations.

HIGH
9 files use React Query

Hub files (most depended on): waspc/.../middleware/operations.ts (31 files); waspc/.../FeatureContainer.tsx (21 files); waspc/.../sdk/wasp/src/components/FeatureContainer.tsx (21 files); waspc/.../actions/index.ts (18 files); waspc/.../definitions.ts (17 files). Changes here have the widest blast radius.

HIGH

Circular imports detected: Link.tsx → index.ts (repeated). Avoid adding to these cycles.

HIGH
GENERATED IN ~3 SECONDS WITH

npx sourcebook init

VIEW ON GITHUB star

FROM_THE_BLOG

RELATED_REPOS