Repository navigation
Repository Layout
For developers: what each folder in the repository holds, which package owns what, and where to start reading the code.
re:Invent Compass is one npm workspaces monorepo. Four TypeScript packages, an Angular site and the Terraform for AWS live side by side, so a change to a shared contract is checked against every consumer in one pull request.
.
├── .github/ CI workflows, CI scripts, Dependabot
├── .kiro/ Kiro specs, steering files and the save hook
├── contracts/ the Compass API OpenAPI contract (single source)
├── data/ venues.json: the six venues and their walking times
├── fixtures/ Events API fixtures, the sample repo, the synthetic catalog
├── infra/ Terraform: bootstrap, dev and prod, six modules, tests
├── packages/
│ ├── contracts/ @compass/contracts: zod schemas, generated types, MCP tool schemas
│ ├── core/ @compass/core: Events API client, rules, scanner, planner, passes
│ ├── mcp-server/ reinvent-compass: the local MCP server and CLI (the npm package)
│ └── pass-service/ @compass/pass-service: the two Lambda functions of the pass API
├── power/ the Kiro Power: manifests, skills, hook template
├── scripts/ owner-run deploy and secret scripts
├── site/ @compass/site: the Angular showcase site
├── spikes/ code kept from the technical spikes
├── CONCEPT.md, KIRO-SPEC-PROMPTS.md, README.md, CONTRIBUTING.md, SECURITY.md
├── LICENSE, NOTICE
├── package.json, package-lock.json, tsconfig.json, tsconfig.base.json
├── vitest.config.ts, eslint.config.js, .prettierrc.json
└── .nvmrc, .npmrc, .env.example, .gitleaks.toml, .trivyignore
The workspaces are declared in the root package.json: packages/contracts, packages/core, packages/mcp-server, packages/pass-service and site.
| Folder | What it holds |
|---|---|
| .github | The three workflows (check.yml, e2e.yml, publish.yml), the dependency-free CI scripts in .github/scripts and the Dependabot settings. See Quality gate. |
| .kiro | Eight Kiro specs in .kiro/specs (requirements, design and tasks for each part), the four steering files in .kiro/steering and one Kiro hook in .kiro/hooks. See Kiro specs and Steering and hooks. |
| contracts | compass-api.openapi.yaml, the single source of the Compass API. See Contracts. |
| data | venues.json: the six re:Invent venues, their aliases and the walking minutes between each pair. |
| fixtures | Canned Events API responses per operation in fixtures/api, the scanner's sample repo and the synthetic catalog of 120 made-up sessions in fixtures/synthetic, with its deterministic generator. |
| infra | All AWS infrastructure as Terraform. See Infrastructure below. |
| packages | The four TypeScript packages. See Packages below. |
| power | The Kiro Power: plugin.json, mcp.json, POWER.md, three skills in power/skills and the hook template in power/hook-templates. See Kiro Power. |
| scripts | Owner-run scripts: bootstrap.sh (apply the bootstrap stack), release.sh (deploy one environment), load-secrets.sh, set-workspace-secrets.sh, check-secrets.sh and google-wallet-class.mjs (create or update the Google Wallet class). See Release and Secrets. |
| site | The Angular showcase site. See Site below. |
| spikes | Code kept from two technical spikes (ID token redaction and the API shape diff), with tests, so it stays covered. |
packages/contracts is @compass/contracts, the shared shapes every other package imports. It has one export (.).
| Path | What it holds |
|---|---|
| src/wire | zod schemas for the Events API wire shapes: session, schedule, event, personal time, bulk result. |
| src/domain | Compass domain shapes: commitment, normalised session, venue, verdict. |
| src/generated | TypeScript types generated from both OpenAPI documents. Never edited by hand. |
| src/mcp-tools.ts | The input and output schema of all 24 MCP tools. |
| src/compass-api-schemas.ts | zod schemas for the Compass API responses, typed against the generated types. |
| events-api.openapi.json | The official Events API OpenAPI document. |
| openapi.yaml | A byte-identical copy of the Compass API contract, the input for type generation. |
packages/core is @compass/core, the logic shared by the MCP server and the site. It has no root export: each area is a subpath, declared in packages/core/package.json.
| Subpath | Source | What it does |
|---|---|---|
@compass/core/auth |
src/auth | PKCE sign-in with AWS Builder ID, the loopback callback, the keychain token store, refresh and sign-out. |
@compass/core/api |
src/api | One file per Events API operation, plus the transport, retry policy, quota tracker and confirmed-write helper. See Events API coverage. |
@compass/core/catalog |
src/catalog | Catalog paging, the private on-disk cache, session normalisation, local filtering and the event window. |
@compass/core/simulated |
src/simulated | The fixture-backed transport for simulated mode. |
@compass/core/rules |
src/rules | The pure, browser-safe guardrail rules: clashes, connections, boarding, energy, layovers, rebooking, safe swap. See Guardrail rules. |
@compass/core/scanner |
src/scanner | The read-only repository scanner: AWS services and other technology. |
@compass/core/spec |
src/spec | The week planner and the writer of the week plan as a Kiro spec. |
@compass/core/passes |
src/passes | The pass fields builder, the Compass API client, pass sync, QR codes and the calendar file. |
@compass/core/redact |
src/redact | The single redactor used before anything is logged. |
@compass/core/github |
src/github | The GitHub App device sign-in, token store and read-only repository scan. |
Each subpath has a @compass/source export condition that points at the TypeScript source. Vitest resolves that condition, so a fresh clone runs the tests with no build step.
packages/mcp-server is the published npm package reinvent-compass (version 0.1.3, bin reinvent-compass). Its source in src:
| Folder | What it holds |
|---|---|
| server | Server creation, the tool registry, tool descriptions, elicitation and results. |
| tools | One handler per MCP tool. See MCP tools. |
| guardrail | The booking check before a reserve, the safe swap ledger and suggestions. |
| adapters | The real adapters behind the ports (events, passes, file system, GitHub, QR page), including the read-only wrapper. |
| ports | The interfaces the tools call. |
| cli | The command line: server, demo, hook. |
| hooks | The two hook commands that the Kiro hook template calls. |
| config | Settings read from the environment and the built-in constants. |
| runtime | The runtime wiring: browser opener, pass client, exit hooks and the hook dependencies. |
| demo | The ten-step terminal demo. |
| simulated | The simulated runtime and the in-process pass service used in simulated mode. |
| safety | Identifier and path checks, and labelling of untrusted data. |
| state | The schedule snapshot and the tech list on disk, and the in-memory session state (last scan, pending swaps). |
| logging | The stderr logger. |
| bin.ts | The process entry point. |
packages/mcp-server/scripts holds the esbuild bundler (build.mjs) and the packed file check (check-pack.mjs). See MCP server.
packages/pass-service is @compass/pass-service, the code of the two Lambda functions behind the Pass API. The main folders of its source:
| Folder | What it holds |
|---|---|
| handlers | One handler per operation, in api (attendee and hand-off routes) and passkit (Apple PassKit web service). |
| app | Routing and the shared request pipeline. |
| services | The pass lifecycle (issue, update, void) and the hand-off. |
| data | DynamoDB access, keys and the rate limiter. |
| apple | The Apple pass template and signing. |
| The Google Wallet object and save links. | |
| apns | Pass update pushes to Apple devices. |
| calendar | The calendar file. |
| auth | Builder ID ID token verification. |
| security | The origin check, pass authentication tokens, hand-off ids and hashing. |
| credentials | Secret shapes and loading from Secrets Manager. |
| http | Request parsing, success responses and problem responses. |
| validation | Request and response schemas. |
| observability | The request log line and metrics. |
| bundling | The deterministic Lambda zip build. |
| lambda-entry | The two Lambda handlers (excluded from coverage). |
The rest (artwork, config, harness and wiring) holds the pass artwork renderer, the settings, the owner-run local harness and the dependency wiring. See Pass service.
site is the Angular 22 showcase site, prerendered to static files.
| Path | What it holds |
|---|---|
| site/src/app | Angular components and the pages (home, demo, install, documentation, board, legal pages and more). |
| site/src/lib | Every decision the site makes, as plain TypeScript, covered by unit tests at 100%. |
| site/scripts | Build output check, bundle budget check, the local static server and the demo snapshot maker. |
| site/e2e | The Playwright and axe browser tests. |
| site/test | The vitest unit tests. |
See Showcase site.
| Path | What it holds |
|---|---|
| infra/bootstrap | Applied once by the owner: the OIDC trust for HCP Terraform, the plan and apply roles, the budget, the domain, the API Gateway account settings and the workspaces. |
| infra/envs/dev, infra/envs/prod | One root module per environment, composing the six modules. |
| infra/modules | secrets, data, api, site, edge and observability. |
| infra/tests | Cross-cutting Terraform native tests and the static Node tests. |
See AWS architecture.
re:Invent Compass is an independent community project and is not affiliated with, endorsed by, or sponsored by Amazon Web Services. Boarding passes are unofficial: your re:Invent badge is your ticket. Licensed under Apache-2.0. Disclaimer · Repository · Project board
Get started
User guide
Architecture
- Overview
- Kiro Power
- MCP server
- Pass service
- Showcase site
- Flows
- AWS architecture
- Security
- Data and privacy
- Quality
Key decisions
- Index
- Product and scope
- Architecture
- Infrastructure
- Passes and wallets
- Security and privacy
- Delivery and tooling
Developer guide
Operations
Runbooks
How it was built
Reference
Links