Skip to content

[Dark Factory] Implement issue #1 as a strict TypeScript Next.js 14 full-stack portal with two routes (Project Brief Submission + Build Tracker Dashboard), exact premium dark UI per spec, complete API surface with Zod validation and structured errors, in-memory project/pipeline state, SSE live logs, and a 6-stage simulation engine with realistic timings and real-time stats.#2

Merged
ibuzzardo merged 1 commit intomainfrom
df/job-h5kreygq
Mar 1, 2026

Conversation

@ibuzzardo
Copy link
Copy Markdown
Owner

Dark Factory -- Automated PR

Generated by pipeline job cmm7nrax40002mbk2h5kreygq
⚠️ This implementation required 3 retry iterations

Implementation Plan

  1. modify package.json, tsconfig.json, next.config.js, tailwind.config.ts, postcss.config.js, .env.example
  2. create src/lib/types/*.ts, src/lib/constants/design-tokens.ts, src/lib/constants/pipeline.ts
  3. create src/lib/validation/project-brief-schema.ts, src/lib/validation/common.ts
  4. create src/lib/api/response.ts, src/lib/api/errors.ts
  5. create src/lib/store/in-memory-store.ts, src/lib/store/event-bus.ts
  6. create src/lib/pipeline/simulation-engine.ts, src/lib/pipeline/stage-runner.ts, src/lib/pipeline/log-generator.ts, src/lib/pipeline/stats-calculator.ts
  7. create src/app/api/projects/route.ts, src/app/api/projects/[projectId]/route.ts, src/app/api/projects/[projectId]/stats/route.ts, src/app/api/projects/[projectId]/pipeline/start/route.ts, src/app/api/projects/[projectId]/events/route.ts
  8. create src/components/ui/* (shadcn generated), src/lib/utils.ts
  9. create src/components/project-brief/*.tsx
  10. modify src/app/page.tsx (or src/app/project-brief/page.tsx), src/app/layout.tsx
  11. create src/components/build-tracker/*.tsx, src/hooks/use-sse.ts, src/hooks/use-pipeline-state.ts
  12. create src/app/tracker/[projectId]/page.tsx (or spec-defined route), src/app/globals.css
  13. create src/lib/api/client.ts, src/lib/config/env.ts
  14. create tests/unit/pipeline-engine.test.ts, tests/unit/validation.test.ts, tests/integration/api-routes.test.ts, tests/integration/sse.test.ts, tests/e2e/project-brief-to-tracker.spec.ts
  15. modify README.md

Code Review Verdict

✅ Approved

Issues flagged:

  • [major] src/lib/store/in-memory-store.ts: TTL cleanup is implemented but never scheduled/invoked anywhere, so stale projects are never actually evicted during normal runtime. This does not satisfy the intended unbounded-growth prevention behavior unless another caller runs cleanup() periodically.
  • [major] src/hooks/use-sse.ts: Custom reconnect logic recreates a new EventSource without preserving last processed event id. Server supports replay via last-event-id, but client does not explicitly carry forward ids, so reconnect-safe replay can miss events in transient disconnect windows.
  • [minor] src/components/project-brief/step-progress.tsx: Elements returned from Array.map are wrapped in an unkeyed fragment (<>...</>), which can trigger React key warnings and unstable reconciliation. Put a key on the fragment.
  • [minor] src/lib/api/client.ts: requestJson throws a generic Request failed on non-OK responses and discards structured API error payload details. This weakens debuggability and prevents actionable UI error states.
  • [minor] tests/e2e/project-brief-to-tracker.spec.ts: E2E test coverage is very limited to heading visibility at breakpoints; it does not validate the required end-to-end flow (brief submission -> tracker navigation -> pipeline start -> live updates).
  • [suggestion] src/app/api/projects/[projectId]/pipeline/start/route.ts: Requiring projectId in both URL and body adds redundant validation surface. Consider using only the route param for start requests to simplify API ergonomics.

Pipeline Cost

Total: $1.0135 USD

Agent Model Notes
planner gpt-5.3-codex --
coder gpt-5.3-codex --
reviewer gpt-5.3-codex --
tester gpt-5.3-codex --
designer gpt-5.3-codex --
validator gpt-5.3-codex --

This PR was opened automatically by Dark Factory v4.

…s 14 full-stack portal with two routes (Project Brief Submission + Build Tracker Dashboard), exact premium dark UI per spec, complete API surface with Zod validation and structured errors, in-memory project/pipeline state, SSE live logs, and a 6-stage simulation engine with realistic timings and real-time stats.

Generated by Dark Factory v4 pipeline job cmm7nrax40002mbk2h5kreygq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant