Next.js app: turn PDFs or documentation URLs + a question into a step-by-step workflow (OpenAI).
cd prototype
npm install
cp .env.example .env.local # then add your OPENAI_API_KEY
npm run devOpen http://localhost:3000.
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY | Yes | OpenAI API key for workflow generation (and vision for PDFs). |
Copy prototype/.env.example to prototype/.env.local and set OPENAI_API_KEY..env.local and the .secrets/ folder are git-ignored; never commit keys.
- Upload a PDF — Manuals, guides, SOPs (max 20MB; first 20 pages used). Pages are rendered to images and sent to the model.
- Paste a URL — Documentation page is scraped; text is used for generation.
- Ask a question — e.g. “How do I set up X?” or “What tools do I need for Y?”
- Get a workflow — Hierarchical steps and sub-steps, displayed in the UI.
npm run dev— Development servernpm run build— Production buildnpm run start— Run production buildnpm run lint— ESLint
- Next.js 16 (App Router), React 19, TypeScript
- API routes:
/api/upload(PDF → images),/api/scrape(URL → content),/api/generate(content/images + question → workflow) - OpenAI API (vision for PDF pages, chat for workflow generation)
- Tailwind, Radix/shadcn-style UI