Skip to content

MVP: add mock-first Next.js app shell, AI analysis libs, API routes, DB schema and tests - #1

Open
dalgme wants to merge 1 commit into
mainfrom
codex/compare-ide-and-codex-app-environments
Open

MVP: add mock-first Next.js app shell, AI analysis libs, API routes, DB schema and tests#1
dalgme wants to merge 1 commit into
mainfrom
codex/compare-ide-and-codex-app-environments

Conversation

@dalgme

@dalgme dalgme commented May 2, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Establish a documentation-first, mock-driven MVP for a MarketShield AI global market-entry decision engine and a basic briefing-room UX.
  • Provide a minimal-but-complete local end-to-end flow (project creation → orientation → analyses → report preview/export) while keeping real provider/DB integration as future work.
  • Enforce structured AI outputs (confidence/rationale/assumptions/limitations) and gated paid features for preview vs full exports.

Description

  • Added a Next.js app shell with global styles, layout, pages and UI components including MockReport, PaywallGate, project creation form, orientation, analysis pages, action board and report preview/download flows.
  • Implemented API surface and route handlers for AI and analysis flows (normalize-context, run-prompt, orientation/analysis/generate endpoints, project-level read endpoints, failure-pattern matching, and report export with HTML download and PDF disabled).
  • Introduced a mock-first AI layer and validators (lib/ai/*): mock/openai provider stubs, prompt runner, system constitution prompts, JSON output validation and context normalizer.
  • Implemented analysis/orientation/reporting modules (lib/analysis/*, lib/orientation/*, lib/report/compose.js), a failure-pattern matcher, a local insight pipeline and import script, an in-memory store, a small mock DB helper for client project creation, and billing helpers.
  • Added project DB schema and seed files for Supabase (supabase/migrations/..., supabase/seeds/...) and numerous documentation files describing architecture, data strategy, and roadmaps.
  • Added scripts and config: package.json, tsconfig.json, next.config.mjs, smoke/unit placeholders and automated test helpers under scripts/ (including smoke-test.js, migration-test.js, import-local-insights.js, and write-stage-report.js).

Testing

  • Ran stage validation and smoke tests via npm run validate:stage and npm run test:smoke, and the smoke suite completed successfully printing a full flow verification message.
  • Executed migration checks via node scripts/migration-test.js and local-insight import via node scripts/import-local-insights.js, both of which passed (schema/seed checks and sample import succeeded).
  • Generated stage report with npm run report:stage -- --stage=16 --ready=yes which wrote the stage report file; lint/typecheck/test/build placeholders were included in the validate flow and returned successful placeholders in CI-local runs.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant