- Backend:
aws-blocks/index.ts— APIs, auth, data models - Frontend:
src/— imports backend APIs viaimport { api } from 'aws-blocks' - Tests:
test/e2e.test.ts— run withnpm run test:e2e - Full guide:
node_modules/@aws-blocks/blocks/README.md— architecture, workflow, best practices, common mistakes - Block catalog + decision tree:
node_modules/@aws-blocks/blocks/docs/index.md - Per-block docs:
node_modules/@aws-blocks/blocks/docs/<package-name>.md
- Make changes to backend (
aws-blocks/index.ts) or frontend (src/) - Test with
npm run test:e2e— starts a dev server automatically if one isn't running - For faster iteration: run
npm run dev &in the background, then runnpm run test:e2erepeatedly (reuses the running server) - Do NOT use curl/fetch against the API unless troubleshooting connectivity
- Use Building Blocks for all persistence and cloud abstractions — never local files, in-memory arrays, or local databases.
- Read block docs at
node_modules/@aws-blocks/blocks/docs/<package-name>.mdbefore using a block. - The JSON-RPC transport is invisible — do not construct RPC payloads manually. Import and call the typed API directly.
npm run sandbox— deploy backend to AWS, serve frontend locallynpm run deploy— full production deploy to AWSnpm run sandbox:destroy— tear down sandbox resources