Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 2.64 KB

File metadata and controls

60 lines (45 loc) · 2.64 KB

Workspace

Overview

pnpm workspace monorepo using TypeScript. Contains the Workflow Translator app — a business process analysis tool that takes messy process descriptions and returns structured analyst-quality output.

Stack

  • Monorepo tool: pnpm workspaces
  • Node.js version: 24
  • Package manager: pnpm
  • TypeScript version: 5.9
  • API framework: Express 5
  • Database: PostgreSQL + Drizzle ORM
  • Validation: Zod (zod/v4), drizzle-zod
  • API codegen: Orval (from OpenAPI spec)
  • Build: esbuild (CJS bundle)
  • AI: Replit OpenAI AI Integration (gpt-5.2 via proxy, no API key required)

Key Commands

  • pnpm run typecheck — full typecheck across all packages
  • pnpm run build — typecheck + build all packages
  • pnpm --filter @workspace/api-spec run codegen — regenerate API hooks and Zod schemas from OpenAPI spec
  • pnpm --filter @workspace/db run push — push DB schema changes (dev only)
  • pnpm --filter @workspace/api-server run dev — run API server locally

Architecture

Artifacts

  • artifacts/workflow-translator/ — React + Vite frontend (previewPath: /)
  • artifacts/api-server/ — Express API server (previewPath: /api)

Frontend Pages

  • / — Main app: input section + 7-section structured results dashboard

API Endpoints

  • POST /api/translate — Accepts { description: string }, returns structured WorkflowOutput JSON using OpenAI gpt-5.2

AI Integration

  • Uses Replit OpenAI AI Integration (@workspace/integrations-openai-ai-server)
  • Server imports openai client from the integration lib
  • No API key needed — automatically provisioned via Replit
  • Env vars: AI_INTEGRATIONS_OPENAI_BASE_URL, AI_INTEGRATIONS_OPENAI_API_KEY

Output Structure (7 sections)

  1. Workflow Summary
  2. Workflow Stages (name, goal, entry trigger, exit condition)
  3. Process Flow (numbered steps with action/owner/tool/output)
  4. Gaps and Friction Points (gap/why it matters/risk level)
  5. Recommended System Structure (system type/core records/fields/statuses)
  6. Measurement Suggestions (metric/why it matters)
  7. First 3 Improvements (recommendation/why first/expected impact)

See the pnpm-workspace skill for workspace structure, TypeScript setup, and package details.

Deferred Work

Confirmation email on signup (Task #28)

When a user submits their email via the usage-limit capture flow (artifacts/api-server/src/routes/captureEmail/index.ts), a confirmation email should be sent. The Resend integration was proposed but the user chose to defer it. To resume: connect Resend via Replit Integrations, then add the send call after the successful db.insert in that route.