Eko Monorepo Assessment Report v3
Assessment Date: 2025-12-18 Assessed By: Claude Code (Senior Monorepo Assessment Agent) Repository: Eko Stack Summary: Bun 1.1.0, Turbo 2.6.3, TypeScript 5.9.3, Next.js 16.0.10, React 19.2.3, Supabase, Upstash Redis, Playwright 1.57.0, Biome 2.3.9, Vitest 4.0.16 Version: v3.0
Executive Summary
| Area | Score (0-100) | Grade | Change | Notes |
|---|---|---|---|---|
| Repository Structure & Organization | 98 | A+ | +1 | New specs directory, subscription-manager agent |
| Build System & Tooling | 94 | A | +1 | Turbo cache growing, larger codebase |
| Code Quality & Standards | 90 | A- | = | Biome unified, no pre-commit hooks |
| Type System Configuration | 94 | A | = | Strict mode, modern bundler resolution |
| Testing Infrastructure | 78 | C+ | = | Single test file, no coverage reporting |
| Documentation | 97 | A+ | +3 | Comprehensive V1 specs and contracts |
| Backend / Data Layer | 96 | A | +3 | Major V1 contracts migration (0006) |
| UI / Design System | 92 | A- | = | Full Storybook, 20 components, dark mode |
| CI/CD & DevOps | 88 | B+ | = | Full pipeline, missing remote caching |
| Security | 85 | B | = | RLS strong, missing dependency scanning |
| FINAL SCORE | 91 | A- | +1 | V1 contracts infrastructure complete |
Grade Legend
- A+: 97-100 (Exceptional)
- A: 93-96 (Production-ready)
- A-: 90-92
- B+: 87-89
- B: 83-86
- C+: 80-82
- <80: Needs intervention
Key Changes Since Last Assessment (2025-12-16)
Major Improvements
-
V1 Contracts Migration - New
0006_v1_contracts.sqlwith 278 lines implementing:plan_definitionstable for subscription tiers (free/base/pro/team)user_subscriptionswith Stripe integrationnotification_preferencesandnotification_deliveriesfor email alertstracking_suggestionsandtracking_suggestion_examplesfor discovery- Weekly cadence support in
check_frequency ai_providerandai_modelcolumns on summaries- URL cap enforcement trigger with plan-based limits
- Full RLS policies on all new tables
-
Specification Documents - New
docs/specs/directory with 7 detailed specs:v1-business-rules.md- Core business logicservice-levels.md- SLA definitionsnaming-contracts.md- Naming conventionsmeaningful-change.md- Change detection specrender-escalation.md- Playwright escalation rulessummarization-safety.md- AI safety guidelinesurl-normalization.md- URL handling spec
-
Subscription Manager Agent - New agent for subscription lifecycle management
-
Entitlements System - New
packages/shared/src/entitlements.ts(72 lines) -
Documentation Expansion:
docs/dev/observability.md- Observability guidedocs/dev/migration-coexistence.md- Migration strategydocs/runbooks/scheduling.md- Scheduling runbookdocs/product/v1-execution-contract.md- V1 execution plandocs/product/tracking-suggestions/- Suggestion templatesdocs/architecture/schema-naming-contracts.md- Schema conventionsdocs/schema-reference.md- Full schema reference (49KB)
Metrics Changes
| Metric | v2 | v3 | Change |
|---|---|---|---|
| Migrations | 5 | 6 | +1 |
| Agent files | 17 | 17 | = |
| Turbo cache | 13 MB / 408 files | 24 MB / 592 files | +85% |
| node_modules | 649 MB | 699 MB | +8% |
| bun.lock lines | 1,278 | 1,304 | +2% |
| Shared package | ~600 LOC | ~795 LOC | +33% |
1. Repository Structure & Organization
Score: 98 (A+) (+1 from v2)
Current Structure
eko/
├── .claude/ 17 specialized agents
│ ├── agents/ Agent specifications
│ └── settings.local.json Local agent settings
├── .notes/ Development planning docs
├── apps/ 5 deployable applications
│ ├── web/ Next.js public app (port 3000)
│ ├── admin/ Next.js admin panel (port 3001)
│ ├── storybook/ Component documentation (port 6006)
│ ├── worker-render/ Playwright rendering service
│ └── worker-tracker/ URL tracking worker
├── packages/ 7 shared libraries
│ ├── ai/ OpenAI integration
│ ├── config/ Zod-validated env config
│ ├── db/ Supabase client & queries
│ ├── observability/ Logging utilities
│ ├── queue/ Upstash Redis queue
│ ├── shared/ Types, schemas, entitlements [EXPANDED]
│ └── ui/ Shared UI components (20 components)
├── docs/ Comprehensive documentation
│ ├── assessments/ Assessment reports
│ ├── specs/ [NEW] V1 specifications (7 files)
│ └── schema-reference.md [NEW] Full schema reference
├── infra/ Docker, fly.toml configs
└── scripts/ Setup and utility scripts
Strengths
@eko/*package scope consistently applied across all workspaces- Clear separation: apps deploy, packages share
- New
docs/specs/directory provides formal specification artifacts - Agent system with 17 specialized agents for autonomous workflows
- Agent routing validation in CI (
agents-routing-check.ts)
Weaknesses
.notes/directory not in.gitignore(consider if these should be tracked)
2. Build System & Tooling
Score: 94 (A) (+1 from v2)
Turbo Configuration
{
"tasks": {
"build": { "dependsOn": ["^build"], "outputs": [".next/**", "dist/**", "storybook-static/**"] },
"dev": { "cache": false, "persistent": true },
"lint": { "dependsOn": ["^build"] },
"typecheck": { "dependsOn": ["^build"] },
"test": { "dependsOn": ["^build"] }
}
}
Metrics
| Metric | Value |
|---|---|
| Local Turbo cache | 24 MB (592 artifacts) |
| Web app .next build | 37 MB |
| Storybook static | 7.3 MB |
| node_modules | 699 MB |
| bun.lock lines | 1,304 |
Strengths
- Turbo task graph correctly models dependencies with
^build - Bun provides fast install and execution (1.1.0)
- Local caching working effectively (85% cache growth indicates active development)
- TypeScript incremental builds enabled
- All dependencies locked to specific versions
Weaknesses
- No remote caching configured (Vercel Remote Cache or custom)
- Each CI job re-installs dependencies from scratch
3. Code Quality & Standards
Score: 90 (A-) (unchanged)
Biome Configuration (v2.3.9)
{
"linter": {
"rules": {
"noUnusedImports": "error",
"noUnusedVariables": "error",
"noExplicitAny": "warn",
"noNonNullAssertion": "off"
}
},
"formatter": {
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100,
"quoteStyle": "single"
}
}
Strengths
- Single tool (Biome) eliminates config drift between lint/format
- Strict on unused code (errors, not warnings)
- CSS modules and Tailwind directives supported
- Import organization automated
.editorconfigpresent for cross-editor consistency
Weaknesses
- No pre-commit hooks (husky/lefthook not configured)
noExplicitAnyis "warn" not "error"noNonNullAssertiondisabled- Quality enforcement relies entirely on CI
4. Type System Configuration
Score: 94 (A) (unchanged)
Base Config (tsconfig.base.json)
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noEmit": true,
"isolatedModules": true,
"declaration": true,
"declarationMap": true,
"incremental": true
}
}
Inheritance Pattern
- All 12 workspaces extend
../../tsconfig.base.json - Next.js apps add
nextplugin for App Router types - Packages specify
outDir/rootDirfor build isolation - UI package adds
jsx: "react-jsx"and path aliases
Strengths
strict: trueglobally enforced- Modern bundler resolution (Node 16+)
- Declaration maps enable source navigation
isolatedModulesensures transpiler safety
Weaknesses
noUncheckedIndexedAccessnot enabledexactOptionalPropertyTypesnot enableduseUnknownInCatchVariablesnot enabled
5. Testing Infrastructure
Score: 78 (C+) (unchanged)
Test Framework: Vitest 4.0.16
| Workspace | Config | Test Files |
|---|---|---|
| apps/web | Node env | 0 |
| apps/admin | Node env | 0 |
| apps/storybook | Default | 0 |
| apps/worker-render | Node env | 0 |
| apps/worker-tracker | Node env | 0 |
| packages/ai | Node env | 0 |
| packages/config | Node env | 0 |
| packages/db | Node env | 0 |
| packages/observability | Node env | 0 |
| packages/queue | Node env | 0 |
| packages/shared | Node env | 1 (smoke.test.ts) |
| packages/ui | No tests | 0 |
Strengths
- Vitest workspace configured across all workspaces
- E2E smoke test covers critical render pipeline (
e2e:render-smoke) - Test failures block CI build
- Consistent
vitest runpattern
Weaknesses
- Only 1 test file exists (18 lines in packages/shared)
- No coverage reporting configured or tracked
passWithNoTests: truemasks missing tests- No component tests for UI library
- No visual regression testing
6. Documentation
Score: 97 (A+) (+3 from v2)
Documentation Structure
docs/
├── README.md Index with V1 spec links
├── CONVENTIONS.md Standards & front-matter rules
├── glossary.md Terminology (updated with V1 terms)
├── schema-reference.md [NEW] Full schema reference (49 KB)
├── architecture/ 7 files + schema-naming-contracts.md [NEW]
├── assessments/ Assessment reports
├── dev/ 9 files + observability.md, migration-coexistence.md [NEW]
├── runbooks/ 7 files + scheduling.md [NEW]
├── policies/ AI safety, fair use
├── product/ PRD, user guide, v1-execution-contract.md [NEW]
└── specs/ [NEW] 7 specification documents
New Documentation
docs/specs/- 7 formal specification documents for V1 contractsdocs/schema-reference.md- Comprehensive schema documentation (49 KB)docs/dev/observability.md- Observability guidedocs/dev/migration-coexistence.md- Migration strategydocs/runbooks/scheduling.md- Scheduling operationsdocs/product/v1-execution-contract.md- V1 execution plan (19 KB)docs/architecture/schema-naming-contracts.md- Schema conventions
Strengths
- Enforced front-matter with CI validation (
scripts/docs-lint.sh) - Agent routing validation in CI
- Comprehensive runbooks for each subsystem
- Clear onboarding in
dev/local-development.md - V1 specifications are production-ready
Weaknesses
- No API documentation generation (TypeDoc)
- No auto-generated component docs from Storybook
7. Backend / Data Layer
Score: 96 (A) (+3 from v2)
Schema (6 migrations)
packages/db/migrations/
├── 0001_init.sql Core schema + RLS (7.6 KB)
├── 0002_renders.sql url_renders table (1.9 KB)
├── 0003_storage_renders_bucket.sql Storage bucket (2.5 KB)
├── 0004_user_note_and_checked_day.sql User annotations (1.2 KB)
├── 0005_brand_library_v1.sql Brand library (5.8 KB)
└── 0006_v1_contracts.sql [NEW] V1 contracts (11.7 KB, 278 lines)
New Tables (0006)
plan_definitions- Subscription tiers with limits and featuresuser_subscriptions- User-to-plan mapping with Stripe integrationnotification_preferences- Email notification settingsnotification_deliveries- Notification audit log with deduplicationtracking_suggestions- Discovery templatestracking_suggestion_examples- URL type examples per suggestion
New Features (0006)
- Weekly cadence support (
check_frequency IN ('daily', 'weekly')) - AI provider metadata (
ai_provider,ai_modelcolumns on summaries) - URL cap enforcement trigger (
check_url_cap()) - Comprehensive RLS on all new tables
Row-Level Security
| Table | SELECT | INSERT | UPDATE | DELETE |
|---|---|---|---|---|
| profiles | Own | Auth trigger | Own | Cascade |
| tracked_urls | Own | Enforce user_id | Own | Own |
| url_checks | Own (EXISTS) | Service role | - | - |
| url_changes | Own (EXISTS) | Service role | - | - |
| summaries | Own (2-level EXISTS) | Service role | - | - |
| url_renders | Own (EXISTS) | Service role | - | - |
| plan_definitions | Public (active) | - | - | - |
| user_subscriptions | Own | - | - | - |
| notification_preferences | Own | Own | Own | Own |
| notification_deliveries | Own | - | - | - |
| tracking_suggestions | Auth (active) | - | - | - |
| tracking_suggestion_examples | Auth (via FK) | - | - | - |
Strengths
- Clean normalized schema with proper FK constraints
- RLS policies follow principle of least privilege
- URL cap enforcement at database level (not application)
- Plan-based limits are data-driven (no hardcoding)
- Comprehensive indexes on query-critical columns
Weaknesses
- No explicit rollback migrations
- No migration tests
8. UI / Design System
Score: 92 (A-) (unchanged)
Storybook (apps/storybook)
- Version: 10.1.9
- Framework: React + Vite 7.3.0
- Addons: docs, themes
- Stories: 19 files covering all components
- Dark/light mode toggle in preview
Shared UI Library (packages/ui)
| Component | Sub-components | Dark Mode |
|---|---|---|
| AlertDialog | 11 | Yes |
| Avatar | 3 | Yes |
| Badge | 4 variants | Yes |
| Button | 6 variants, 6 sizes | Yes |
| Card | 6 | Yes |
| Checkbox | 1 | Yes |
| Dialog | 10 | Yes |
| DropdownMenu | 14 | Yes |
| Input | 1 | Yes |
| Label | 1 | Yes |
| Popover | 4 | Yes |
| RadioGroup | 2 | Yes |
| Select | 11 | Yes |
| Separator | 1 | Yes |
| Skeleton | 1 | Yes |
| Switch | 1 | Yes |
| Tabs | 4 | Yes |
| Textarea | 1 | Yes |
| Tooltip | 4 | Yes |
Technology Stack
- Radix UI primitives (14 packages) for accessibility
- class-variance-authority (CVA) for variant management
- Tailwind CSS v4 with CSS variables
cn()utility (clsx + tailwind-merge)- Lucide React for icons
Strengths
- 20 components with 60+ sub-components
- Full dark mode via CSS custom properties
- All components documented in Storybook
- Accessibility built-in via Radix
- shadcn/ui "New York" style
Weaknesses
- No README in packages/ui
- No accessibility testing (axe, pa11y)
- No component unit tests
9. CI/CD & DevOps
Score: 88 (B+) (unchanged)
GitHub Actions Pipeline
Triggers: push/PR to main/dev
Jobs (Parallel):
1. docs-lint - Validates markdown front-matter
2. agents-routing - Validates agent ownership
3. lint - Biome check
4. typecheck - tsc
5. test - Vitest
Job (Sequential):
6. build - Depends on all above
Strengths
- Full quality gate (docs, agents, lint, types, tests, build)
- Parallel execution for independent jobs
- Build blocked until all checks pass
--frozen-lockfileensures determinism- Agent routing validation prevents ownership conflicts
Weaknesses
- No remote caching (each run installs fresh)
- No preview environments on PRs
- No deployment automation
- No GitHub Actions dependency caching
10. Security
Score: 85 (B) (unchanged)
Strengths
| Area | Status |
|---|---|
| RLS Policies | Strong - all 12 tables protected |
| Env Validation | Strong - Zod schemas at runtime |
| Secret Exclusion | Good - .gitignore configured |
| Auth Separation | Good - anon vs service role clients |
| Worker Security | Good - proper cleanup, timeouts |
| Security Policy | Present - SECURITY.md with scope |
| URL Cap Enforcement | [NEW] Database-level plan limits |
Weaknesses
| Area | Status | Priority |
|---|---|---|
| Dependency Scanning | Missing (no Dependabot) | P1 |
| Secret Scanning | Missing (no GitHub scanning) | P1 |
| SSRF Prevention | Missing (no private IP blocking) | P2 |
| Rate Limiting | Missing (no per-user limits) | P2 |
| Admin Authorization | Incomplete (run_now disabled) | P2 |
Recommendations
- Add
.github/dependabot.ymlfor npm vulnerability scanning - Enable GitHub secret scanning in repository settings
- Add
isAllowedUrl()validation to block private IPs and metadata endpoints - Complete admin authorization feature
Risk Assessment
| Risk Area | Level | Change | Mitigation |
|---|---|---|---|
| Build stability | Low | = | Turbo graph + lockfile ensure reproducibility |
| Data integrity | Low | -1 | RLS + FK constraints + URL cap trigger |
| Security | Medium | = | Add dependency/secret scanning urgently |
| Team velocity | Low | = | Clear structure, good docs, fast tooling |
| UI consistency | Low | = | Storybook + shared components unified |
| V1 readiness | Low | NEW | Specs complete, schema ready, entitlements defined |
Recommended Next Steps
P0 - Critical
- None (no blocking issues for production)
P1 - High Priority
- Add Dependabot for dependency vulnerability scanning
- Enable GitHub secret scanning
- Add pre-commit hooks (husky + lint-staged)
- Configure coverage reporting and set minimum thresholds
- Add unit tests for entitlements logic
P2 - Medium Priority
- Add SSRF prevention (private IP blocklist)
- Enable Turbo remote caching for CI speedup
- Add GitHub Actions dependency caching
- Add unit tests for UI components
- Enable
noUncheckedIndexedAccessin TypeScript
P3 - Long-Term
- Add visual regression testing (Chromatic)
- Add load testing infrastructure
- Create migration rollback procedures
- Add TypeDoc for API documentation
- Add accessibility testing (axe-core)
Readiness Scorecard
| Target | Previous | Current | Gap |
|---|---|---|---|
| Production ready | 90% | 91% | Testing coverage, dependency scanning |
| V1 launch ready | - | 95% | Entitlements tests, notification worker |
| Scale ready | 78% | 80% | Remote caching, rate limiting |
| Team onboarding | 95% | 97% | Excellent docs, specs complete |
| Design system | 92% | 92% | Component tests, accessibility |
Assessment Metadata
- Assessment Date: 2025-12-18
- Previous Assessment: 2025-12-16 (v2)
- Assessed By: Claude Code (Senior Monorepo Assessment Agent)
- Repository: Eko
- Stack Summary: Bun 1.1.0, Turbo 2.6.3, TypeScript 5.9.3, Next.js 16.0.10, React 19.2.3, Supabase, Upstash Redis, Playwright 1.57.0, Biome 2.3.9, Vitest 4.0.16
- Version: v3.0
This assessment reflects the state of the Eko monorepo as of December 18, 2025. Scores are based on industry best practices for production-grade TypeScript monorepos.