This repository contains:
/api: FastAPI app & PocketFlow DAG/web: React UI/tasks: Codex task files/tests: pytest suites/infra: Render blueprints & migrations
Prerequisites:
- Python 3.11
- Node.js 18
- pip and npm
-
Create & activate a virtual environment:
python3.11 -m venv .venv source .venv/bin/activate -
Install Python dependencies:
pip install --upgrade pip pip install -r requirements.txt
-
(Optional) Install front-end dependencies:
cd web npm ci cd ..
-
Run the test suite:
pytest -q
-
End-to-end E2E tests (CI-only): These are configured via GitHub Actions in
.github/workflows/e2e.ymland run automatically on push and PR. -
Manual testing examples:
- FetchSummaryNode:
python3 - << 'PYCODE' from api.nodes.fetch_summary_node import FetchSummaryNode text = FetchSummaryNode("https://example.com") print(text[:200] + "…") PYCODE
- FetchSummaryNode:
-
Configure environment variables (backend):
- Copy
.env.exampleto.envand setOPENAI_API_KEY.
- Copy
-
Configure front-end environment (static site):
- Define
VITE_API_BASE_URLto point at your deployed API, e.g.VITE_API_BASE_URL=https://prompt-backend.onrender.com
- In development, leave
VITE_API_BASE_URLunset so the Vite proxy handles/generate10/*calls. - (Optional) For CI deploy via GitHub Actions, set the following repository secrets:
RENDER_API_SERVICE_ID— Render service ID for the FastAPI backendRENDER_WEB_SERVICE_ID— Render service ID for the React static siteRENDER_API_KEY— Render API key with deploy permissions
- Define
-
Run the API server locally:
uvicorn api.main:app --reload
- SummariseNode:
python3 - << 'PYCODE' from api.nodes.summarise_node import SummariseNode prompt = SummariseNode("Sample business description") print(prompt) PYCODE
- SummariseNode:
/tests: pytest suites/infra: Render blueprints & migrations