Beta
Namespace & Module Plan
Target code organization (domain/application/infrastructure/presentation) so experiments can graduate into clean modules.
Use alongside DDD summary and Architecture assessment.
Pure business logic (no framework imports).
Folders
- apps/stps/src/domain/learning
- apps/stps/src/domain/studio
- apps/stps/src/domain/shared
Responsibilities
- Entities (Section, Session, Assignment) as rich models
- Policies/aggregates (SectionAggregate, EnrollmentPolicy)
- Value objects (Visibility, TimeRange) built from facets
- Domain events definitions
Handoffs
- Application layer via repositories
- Events -> Event bus
- Keep free of React/Convex/Supabase dependencies.
Use cases / orchestrators referencing domain layer.
Folders
- apps/stps/src/application/commands
- apps/stps/src/application/queries
- apps/stps/src/application/services
Responsibilities
- Commands (createSection, startSession)
- Queries (getSectionsForCalendar)
- Feature toggles + rollout logic
- Orchestrating domain events / repositories
Handoffs
- Infrastructure adapters
- Presentation hooks
infrastructure
infrastructure
Adapters to external systems (Convex, Supabase, localStorage).
Folders
- apps/stps/src/infrastructure/persistence
- apps/stps/src/infrastructure/eventBus
- apps/stps/src/infrastructure/ai
Responsibilities
- Persistence adapters (LocalAdapter, ConvexAdapter, SupabaseAdapter)
- Event bus implementation
- Supabase storage helpers, Convex queries
- AI provider integrations
Handoffs
- Application layer (repositories)
- Edge/worker processes
Next.js pages, React components, beta playground.
Folders
- apps/stps/src/pages
- apps/stps/src/components
- apps/stps/src/beta
Responsibilities
- UI rendering + state hooks
- Beta sandbox pages
- Feature flag toggles in UI
- Routing + layout
Handoffs
- Application commands/queries
- Feature flag service