How notationlabs/notation works
Notation is a JavaScript-native serverless deployment toolkit. Developers scaffold an app, define infrastructure and runtime functions, then compile, inspect plans, deploy or destroy resources, and watch development stacks; a dashboard exposes persisted resource state. The graph preserves the compiler, resource/reconciliation lifecycle, AWS API Gateway and event-driven capabilities, runtime handlers, visualization, and starter scaffolding. Several subsystem links are documented or supported by the source index; unsampled internals and provider relationships are not expanded beyond that evidence.
Main entry points: index.ts Notation CLI · compile.ts Infrastructure compiler · api.ts Infrastructure definition · plan.ts Deployment planning
Components 21
App authoring
- Project scaffolder
packages/create-notation/src/scaffold.ts - Infrastructure definition
packages/create-notation/templates/starter/infra/api.ts - Function handlers
packages/create-notation/templates/starter/runtime/todos.fn.ts
CLI and compiler
- Notation CLI
packages/cli/src/index.ts - Infrastructure compiler
packages/cli/src/compile.ts - Function transforms
packages/esbuild-plugins/src/plugins/function-infra-plugin.ts - Hot replacement
packages/cli/src/watch.ts
Resource lifecycle
- Resource model
packages/resource/src/resource.ts - Resource diff
packages/resource/src/diff-params.ts - Deployment planning
packages/reconciler/src/plan.ts - Durable runtime
packages/core/src/provisioner/durable-runtime.ts - Durable reconciliation
packages/reconciler/src/durable/reconcile.ts - Deployment state
packages/state/src/state.ts
Cloud providers
- API Gateway resources
packages/aws.iac/src/resources/api-gateway/route.ts - Gateway authorization
packages/aws.iac/src/resources/api-gateway/auth.ts - EventBridge schedules
packages/aws/src/event-bridge/schedule.ts - Lambda handlers
packages/aws/src/lambda.fn/handlers.ts
State and visibility
- Dashboard state API
packages/dashboard/server/server.ts - Dashboard UI
packages/dashboard/src/app.tsx - Resource visualizer
packages/core/src/visualiser/chart.ts
Other components
- Developer
Connections 24
- Developer → Project scaffolder: creates project
- Developer → Notation CLI: runs commands
packages/cli/src/index.ts - Notation CLI → Infrastructure compiler: compiles app
packages/cli/src/index.ts - Infrastructure compiler → Function transforms: configures transforms
packages/cli/src/compile.ts - Infrastructure compiler → Infrastructure definition: compiles entrypoint
packages/cli/src/compile.ts - Infrastructure compiler → Function handlers: compiles functions
packages/cli/src/compile.ts - Notation CLI → Hot replacement: starts watch
packages/cli/src/index.ts - Hot replacement → Infrastructure compiler: recompiles
packages/cli/src/watch.ts - Notation CLI → Deployment planning: plans changes
- Deployment planning → Resource model: plans resources
packages/reconciler/src/plan.ts - Deployment planning → Deployment state: reads state
packages/reconciler/src/plan.ts - Resource model → Resource diff: compares params
packages/resource/src/resource.ts - Notation CLI → Durable runtime: deploys or destroys
- Durable runtime → Durable reconciliation: runs reconciliation
packages/core/src/provisioner/durable-runtime.ts - Durable runtime → Deployment state: persists execution state
- Durable reconciliation → Resource model: reconciles resources
- Infrastructure definition → API Gateway resources: defines gateway
- API Gateway resources → Gateway authorization: configures authorization
packages/aws.iac/src/resources/api-gateway/route.ts - Notation CLI → Dashboard state API: starts dashboard
packages/cli/src/index.ts - Dashboard state API → Deployment state: reads snapshots
packages/dashboard/server/server.ts - Dashboard UI → Dashboard state API: receives remote state
- Notation CLI → Resource visualizer: visualizes resources
- Function handlers → Lambda handlers: uses runtime handlers
- Infrastructure definition → EventBridge schedules: defines schedules