- Task System App Plan
Task System App Plan
Goal
Build a standalone, real-world task management backend inside nestjs-yalc that:
- is usable on its own;
- serves as a serious demo/reference app for
nestjs-yalc; - becomes a CI/CD target for unit, integration, and e2e tests;
- stays fully independent from OpenClaw;
- can later be consumed and extended by an OpenClaw-side app.
Non-negotiable constraints
For this project, use only patterns and building blocks already aligned with nestjs-yalc:
- CRUD APIs via
crud-gen - REST via
crudRestControllerFactory - module communication via strategy providers
- logging / errors / event flows via
YalcEventServiceandevent-manager - no custom parallel architecture outside
nestjs-yalc - no OpenClaw coupling inside the
nestjs-yalcexample app
High-level architecture
Inside nestjs-yalc
Create a standalone app composed of:
examples/task/module- reusable module package
- entities / DTOs / generated CRUD providers
- reusable domain module wiring
examples/task/app- runnable Nest app
- REST surfaces
- strategy-based internal communication examples
- event-manager usage examples
- test target for CI/CD
Outside nestjs-yalc
OpenClaw later becomes:
- consumer
- orchestrator
- assistant UX layer
But not part of this example app.
Functional scope for v1
Core modules
projects- create/update/delete/list projects
- basic lifecycle and status
tasks- create/update/delete/list tasks
- task status
- optional due date
- link to project
events(after first vertical slice)- separate from tasks
- true scheduled items
sync(after core CRUD works)- external refs
- sync state
- provider-agnostic metadata
Domain rules
- Task and Event are distinct concepts.
- Internal IDs are canonical.
- External provider IDs must never become domain IDs.
- Provider-specific semantics stay out of the core model.
- The app must work even if no external consumer exists.
Implementation checklist
Keep this checklist updated while implementing. Mark items as [x] when completed, add sub-items when needed, and adjust wording only if scope really changes.
Active now
- Define architecture and constraints for a standalone
task-system-app - Add planning/documentation files to the repo
- Create initial scaffold for
examples/task/module - Create initial scaffold for
examples/task/app - Open branch/PR for the scaffold work
- Make
task-system-appboot successfully - Fix
CrudGenDependencyFactory+TypeORM+ DI wiring in the YALC-correct way - Make the first minimal REST vertical slice work for
projectsandtasks - Get the initial e2e suite green
- Make the example build cleanly in addition to passing e2e
- Commit and push the first bootable/passing version
Next after vertical slice is green
- Harden tests (unit + integration + e2e)
- add initial focused unit tests for task/project domain event services
- add deeper integration coverage around event-manager/module wiring
- Add
eventsmodule - Add
syncmodule and external refs model - Refactor
syncintoExternalRef+SyncState - Add full GraphQL coverage
- expose GraphQL CRUD for
projects - expose GraphQL CRUD for
tasks - expose GraphQL CRUD for
events - expose GraphQL CRUD for
sync - add GraphQL integration/e2e tests for all exposed slices
- expose GraphQL CRUD for
- Add GraphQL capability coverage for distinctive YALC features
- join coverage (validated on actual supported GraphQL join args / enum values)
- virtual field coverage
- framework-level coverage for derived-field hydration / selection / denyFilter behavior
- example-level GraphQL e2e read coverage for derived field (
fullName) - optional future expansion: sorting/filtering semantics on derived fields where supported by repository path
- JSON field coverage with nested property access
- deferred: current
task-systemexample does not expose a dedicated JSON-backed CRUD model yet - when added, cover JSON scalar round-trip (create/read/update)
- when added, cover JSON exposure on GraphQL grids
- when added, probe nested dot-path sorting/filtering semantics honestly
- deferred: current
- GraphQL filtering/sorting/pagination coverage beyond baseline CRUD
- sorting coverage on task grids
- filtering coverage (blocked in this example because plain-repository fallback now fails explicitly on structured filters; needs extended repository path to test end-to-end)
- pagination coverage on grid queries
- GraphQL error behavior coverage for advanced queries
- Improve
nestjs-yalcdocumentation whenever capability discovery reveals missing or unclear feature docs - Add
areas/inboxif still justified after core domain stabilizes - Integrate the example into repo CI/CD checks
- Prepare the external OpenClaw-side integration layer separately
Delivery phases
Phase 0 — foundation and docs
Already started:
- clone repo locally
- inspect framework conventions
- add documentation:
docs/backend-blueprint.mdexamples/task/app/README.md- this plan file
Phase 1 — first runnable vertical slice
Target:
- standalone app boots
- SQLite works
- REST CRUD works for:
- projects
- tasks
- one strategy-based internal flow works
- one
YalcEventService-based error/log flow works
Implementation pieces:
- task-system module package
- task-system app package
- TypeORM wiring
- CRUD-gen provider generation
- REST controllers via factory
- bootstrap app
- first e2e suite
Phase 2 — stabilize framework-consistent wiring
Current blocker area:
- correct
CrudGenDependencyFactory+ TypeORM + module wiring for a standalone app - ensure repository/service/dataloader generation works in the exact intended
nestjs-yalcway - remove accidental assumptions copied from partial examples
Definition of done:
- app boots without DI errors
- e2e tests pass for the initial CRUD flow
Phase 3 — strengthen test value
Add:
- unit tests for service logic and mapping
- integration tests for module wiring
- e2e tests for:
- CRUD lifecycle
- strategy-based internal calls
- event-manager logging/errors
Goal:
Make this app a real regression target for nestjs-yalc.
Phase 4 — extend the domain
Add progressively:
eventsareasinboxsync- external refs and provider-agnostic sync metadata
Phase 5 — CI/CD integration in repo
Add repository-level checks so this app validates:
- build correctness
- CRUD-gen regressions
- event-manager regressions
- strategy regressions
- end-to-end correctness
Current status
Done
- initial scaffold created
- docs updated
- standalone example structure added
- first REST/controller/test scaffolding written
- first real e2e run attempted
- bootstrap/DI wiring fixed for the initial vertical slice
- example now boots, builds, and passes its initial e2e suite
- the first bootable/passing version has been committed and pushed
Current blocker
The original DI/bootstrap blocker has been resolved for the initial vertical slice.
Current observed blocker family:
- build/webpack/TypeScript pathing issues for the standalone example when compiling against
@nestjs-yalc/*source packages in the monorepo - some remaining app-specific type mismatches are being cleaned up while preserving the YALC patterns
The runtime/e2e slice is now working and the example now builds cleanly as well; the remaining work is to harden and extend it further.
Next concrete actions
- Add more focused unit/integration coverage around the working slice.
- Harden
event-managerusage and per-module logging configuration where appropriate. - Add explicit domain events for
tasksandprojectswhere useful. - Only then expand domain complexity (
events,sync, etc.).
Newly completed
- add first standalone
eventsslice (entity/DTO/module/REST/e2e) - add first standalone
syncslice (entity/DTO/module/REST/e2e) - refactor
syncintoExternalRef+SyncState
Next implementation target
- Build a GraphQL capability matrix for the features that make
nestjs-yalcvaluable beyond plain CRUD. - Start with the most framework-distinctive coverage: joins/relations, virtual fields, and JSON field access.
- Keep growing the sync model only through conceptually separate domain pieces.
- Delay provider-specific Google integration until the generic sync domain is strong enough.
- Separate external mapping/identity from operational sync state.
- Keep the sync domain provider-agnostic before touching provider-specific Google integration.
- Continue implementing incrementally on top of these correct domain boundaries.
In progress notes
event-managerhas been extended beyond demo/error endpoints toward module-specific domain event emission fortasksandprojects.- The example app now supports standalone CRUD slices for
projects,tasks,events, andsyncreferences. - The next hardening step after this is to reduce duplicated setup and add more focused integration tests around event/logging/sync wiring.
PR strategy
Open a draft PR early once the scaffold is in a reviewable state, so progress is visible.
Suggested PR scope:
- docs additions
- task-system example scaffold
- explicit note that wiring/e2e stabilization is in progress if tests are not yet green
Success criteria
The project is successful when:
examples/task/appis runnable standalone;- it demonstrates correct
nestjs-yalcpatterns; - it has meaningful e2e coverage;
- it is valuable even without OpenClaw;
- it has meaningful e2e coverage;
- it is valuable even without OpenClaw;
- OpenClaw can later extend it without changing its core identity.