How theharborproject/lantern works
Lantern is a TypeScript CLI and reusable API for discovering web components, planning component states, and auditing accessibility in a real browser. The principal flow is project configuration → component scan and accessibility projections → survey planning and execution → normalized checks and a SurveyRun result, optionally saved in project-scoped history. The README also documents interactive selection and history commands. Edges reflect README statements and visible source-index references; several CLI and runtime details are unsampled, so uncertain links are omitted.
Main entry points: run-survey.ts Survey workflow · scan-service.ts Scan orchestration · service.ts Programmatic API · commands CLI commands
Components 20
Entry points
- CLI commands
src/cli/commands - Programmatic API
src/api/service.ts
Project setup
- Config resolution
src/config - Project initialization
src/init/init-project.ts
Discovery and planning
- Scan orchestration
src/scan/scan-service.ts - Component analysis
src/component-scan/run-component-scan.ts - Scan projections
src/component-scan - State planning
src/state-planning/plan-component-state.ts - Interactive selection
src/interactive
Audit execution
- Survey workflow
src/survey/run-survey.ts - Target resolution
src/lint/resolve-lint-targets.ts - Check planning and report
src/lint/build-lint-report.ts - Audit engines
src/engines - Component runtime
src/component-runtime/runtime-session.ts
Results and history
- Survey run model
src/survey/schema/survey-run.ts - Survey history
src/history/service.ts - Survey rendering
src/survey/render-survey-run.ts
Other components
- CLI user
- API consumer
- Playwright browser
Connections 24
- CLI user → CLI commands: runs commands
README.md - API consumer → Programmatic API: calls API
README.md - CLI commands → Project initialization: initializes project
- CLI commands → Survey workflow: runs survey
- Programmatic API → Config resolution: resolves config
src/api/service.ts - Programmatic API → Scan orchestration: scans project
src/api/service.ts - Programmatic API → Survey workflow: executes survey
src/api/service.ts - Project initialization → Config resolution: creates config
src/init/init-project.ts - Scan orchestration → Component analysis: scans sources
src/scan/scan-service.ts - Scan orchestration → Scan projections: writes projections
src/scan/scan-service.ts - Scan orchestration → Component analysis: reuses cached model
src/scan/scan-service.ts - Survey workflow → Scan orchestration: gets scan
src/survey/run-survey.ts - Survey workflow → Target resolution: resolves targets
src/survey/run-survey.ts - Survey workflow → State planning: plans states
src/survey/run-survey.ts - Survey workflow → Check planning and report: builds report
src/survey/run-survey.ts - Target resolution → Scan orchestration: refreshes scan
src/lint/resolve-lint-targets.ts - Check planning and report → Audit engines: plans and executes checks
src/lint/build-lint-report.ts - Check planning and report → Component runtime: creates runtime session
src/lint/build-lint-report.ts - Audit engines → Component runtime: uses rendered session
- Component runtime → Playwright browser: drives browser
README.md - Survey workflow → Survey run model: produces run
src/survey/run-survey.ts - Survey workflow → Survey history: persists run
README.md - Programmatic API → Survey rendering: renders run
src/public-api.ts - Survey history → Survey run model: validates stored runs
src/history/service.ts