QuoteCraft AI is a production-oriented ChatGPT app for building fast, professional service-business quotes inside ChatGPT. The MVP supports paver patios, lawn makeovers, and pressure washing with deterministic pricing logic driven by JSON config instead of opaque model-invented pricing.
- Collects quote inputs in an in-chat interactive UI
- Calculates low, mid, and high estimates with transparent formulas
- Breaks out materials, labor, markup, regional adjustment, urgency adjustment, and extras
- Generates assumptions, upsell suggestions, and client-ready quote copy
- Lets users recalculate or explain a quote inside the same ChatGPT app experience
src/server/*: Express-hosted MCP server using@modelcontextprotocol/sdksrc/server/register-tools.ts: ChatGPT app tool registration withregisterAppToolsrc/server/register-components.ts: HTML widget resource registration withregisterAppResourcesrc/components/*: React widget rendered inside ChatGPTsrc/lib/*: Pricing engine, formatting, validation, and shared typessrc/data/*: JSON pricing rules, markup settings, regional multipliers, and service templatessrc/tools/*: Thin tool handlers that normalize inputs, generate quotes, and return structured resultssrc/tests/*: Vitest coverage for calculations, validators, and tool flows
This repo follows the current OpenAI Apps SDK approach for ChatGPT apps:
- MCP server over Streamable HTTP
- app resources served as
text/html;profile=mcp-app - tool-to-widget linkage via
_meta.ui.resourceUri - OpenAI compatibility metadata included where useful for ChatGPT widget framing
- tool responses returning
structuredContent, transcript text, and widget-only_meta
If OpenAI Apps SDK conventions evolve, adapt the runtime wiring first in:
src/server/register-tools.tssrc/server/register-components.tssrc/server/index.ts
quotecraft-ai/
├─ README.md
├─ package.json
├─ tsconfig.json
├─ .env.example
├─ .gitignore
├─ vercel.json
├─ appsdk.config.ts
├─ src/
│ ├─ server/
│ ├─ components/
│ ├─ tools/
│ ├─ lib/
│ ├─ data/
│ ├─ prompts/
│ └─ tests/
└─ docs/
Each quote follows the same deterministic pipeline:
- Select service pricing rates by
serviceTypeandqualityTier - Multiply material and labor unit rates by project size
- Add selected extra costs from config
- Enforce the service minimum when subtotal is too low
- Apply default markup
- Apply regional multiplier
- Apply urgency multiplier
- Derive low and high range from service-specific range multipliers
No part of the quote total depends on hidden AI-estimated pricing.
- Node.js 20+
- npm 10+
npm installCopy .env.example to .env and adjust as needed:
PORT: local server portAPP_BASE_URL: public base URL for your deploymentOPENAI_APP_DOMAIN: dedicated widget origin if you have one for submission
Build the widget and start the server:
npm run build:widget
npm run devFor a rebuild-on-change widget loop in a second terminal:
npm run dev:widget- Health:
GET /health - Metadata:
GET /metadata - MCP endpoint:
POST /mcp
Run the test suite:
npm testRun a production build:
npm run build- Start or deploy the app so the MCP endpoint is reachable.
- Point ChatGPT developer mode or connector setup to your
POST /mcpendpoint. - Verify the widget resource resolves and that tool calls
generateQuote,explainQuote, andregenerateQuoteare discoverable. - Test prompts such as:
Quote a 500 sq ft paver patioEstimate a lawn makeover for 1/4 acreCreate a pressure washing quote for driveway + patio
- Import the repo into Vercel
- Set environment variables from
.env.example - Confirm
npm run buildsucceeds in Vercel build logs - Expose the deployment URL as your ChatGPT app endpoint
- If required for submission, set a dedicated
OPENAI_APP_DOMAIN
Legal pages exposed by the app:
- Privacy policy:
/privacy - Terms of use:
/terms
Primary pricing edits live in:
src/data/pricing-rules.jsonsrc/data/regional-multipliers.jsonsrc/data/markup-config.jsonsrc/data/service-templates.json
To add a new service:
- Add its config in
pricing-rules.json - Add copy in
service-templates.json - Extend
SERVICE_TYPESinsrc/lib/types.ts - Add presets or UI affordances if needed
- Add tests for the new service
- Add saved quote history and customer records
- Add tax, discount, and deposit rules
- Add photo upload or site-condition modifiers
- Add CRM export or PDF generation
- Add authenticated multi-user pricing profiles