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.
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.
HIGHProject uses barrel exports (index.ts files that re-export). Import from the directory, not from deep paths.
HIGH10 barrel export files found
API endpoints use Express app routes. Follow this pattern for new routes.
HIGH11 files use Express app routes
Data fetching uses React Query (useQuery/useMutation). Follow this pattern for new data operations.
HIGH9 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.
HIGHCircular imports detected: Link.tsx → index.ts (repeated). Avoid adding to these cycles.
HIGH