An autonomous agent that processes inbound quote requests from email, enriches them via CRM/Pricing/Inventory APIs, generates professional quotes (JSON + PDF), and logs every step for audit.
- Backend: FastAPI (Python 3.11)
- Database: PostgreSQL 16 (SQLAlchemy + asyncpg)
- Frontend: React 18 + Vite + Zustand
- PDF Generation: ReportLab
- Deployment: Docker + docker-compose
docker-compose up --build- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
Backend:
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000Frontend:
cd frontend
npm install
npm run devFrontend dev server runs at http://localhost:5173 with API proxy to :8000.
| Method | Path | Description |
|---|---|---|
POST |
/api/quotes |
Submit email → generate quote |
GET |
/api/quotes |
List all quotes |
GET |
/api/quotes/{id} |
Get quote by ID |
GET |
/api/quotes/{id}/pdf |
Download quote PDF |
GET |
/api/quotes/mock-emails |
Get sample email templates |
GET |
/api/audit |
List all audit logs |
GET |
/api/audit/{quote_id} |
Audit trail for a quote |
GET |
/api/health |
Health check |
- CRM: 3 customers (alice@acmecorp.com, bob@widgetsinc.com, carol@startupxyz.com)
- Products: WIDGET-A, WIDGET-B, GADGET-X, GADGET-Y, SENSOR-1
- Inventory: GADGET-Y is intentionally out of stock