A Cloudflare Worker API proxy that forwards project viability scan requests to the ProposalPilot AI service, with a simple frontend MVP for testing.
- Cloudflare Worker Backend: Fast, serverless API proxy
- Frontend MVP: Simple HTML/JS interface for testing viability scans
- Error Handling: Comprehensive error handling and validation
- Flexible Configuration: Supports optional
targetMarketandconstraintsfields
.
├── backend/ # Cloudflare Worker
│ ├── index.js # Worker entry point
│ ├── package.json # Dependencies
│ └── wrangler.toml # Cloudflare configuration
├── proposalpilot-mvp/ # Frontend MVP
│ └── frontend/
│ ├── index.html # Frontend UI
│ └── main.js # Frontend logic
└── README.md
- Node.js (v18 or higher)
- npm or yarn
- Cloudflare account (for deployment)
- ProposalPilot API key
- Navigate to the backend directory:
cd backend- Install dependencies:
npm install- Set up your API key:
wrangler secret put VIABILITY_SCAN_API_KEYEnter your ProposalPilot API key when prompted.
- Run locally:
npm run devThe worker will start on http://localhost:8787
- Deploy to Cloudflare:
npm run deployThe frontend is automatically deployed via GitHub Pages. Visit:
https://soul-lighter-productions-llc.github.io/ProposalPilotAI/
Note: Update the API URL in main.js to point to your deployed Cloudflare Worker URL.
-
Start the backend worker (see above)
-
Open
proposalpilot-mvp/frontend/index.htmlin your browser, or use a local server:
# Using Python
cd proposalpilot-mvp/frontend
python -m http.server 8000
# Using Node.js (http-server)
npx http-server proposalpilot-mvp/frontend -p 8000- The frontend will connect to
http://localhost:8787by default
POST / (or your deployed worker URL)
Request Body:
{
"projectSummary": "Your project description here",
"targetMarket": "Optional target market",
"constraints": ["Optional", "constraints", "array"]
}Response:
{
"success": true,
"data": {
// Viability scan results from ProposalPilot API
}
}- Open the frontend (GitHub Pages or locally)
- Enter your project summary in the text area
- Click "Run Viability Scan"
- View the results below
Edit backend/wrangler.toml to customize:
- Worker name
- API endpoint URL
- Compatibility date
MIT License - see LICENSE file for details