An AI-powered consulting strategist tool that matches new client needs to past Statements of Work (SOWs) and generates solution recommendations. Built with FastAPI, Supabase, OpenAI, and Streamlit.
- Match client prompts to similar past SOWs using embeddings
- Generate 2–3 tailored tech solution suggestions via GPT-4o model
- Save suggestions to Supabase table
- Export recommendations as a TXT file
- Simple, clean Streamlit UI
consulting-app/
├─ main/
├── .env # Environment variables (not committed)
├── __init__.py
├── app.py # FastAPI backend with API endpoints
├── run.sh # Shell exe
├── seed_db.py # Script to generate and store embeddings
├── streamlit_app.py # Streamlit frontend UI
├── requirements.txt # Python dependencies
└── static/ # Supabase schema and data tables
├── supabase_schema_ddl.sql
└── .gitignore
└── README.mdgit clone https://github.com/your-repo/sow-recommender
cd sow-recommender
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtCreate a .env file with:
OPENAI_API_KEY=your_openai_key
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_or_service_role_key
SUPABASE_POSTGRES_URL=postgresql://user:pass@host:port/dbnameUse static/database/supabase_schema_ddl.sql to ensure you’ve created the following tables in your Supabase PostgreSQL instance:
-- consulting.sows, consulting.clients, consulting.solutions
-- Plus:
CREATE TABLE consulting.embeddings (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
sow_id UUID UNIQUE REFERENCES consulting.sows(id) ON DELETE CASCADE,
embedding BYTEA
);
CREATE TABLE consulting.saved_suggestions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
prompt TEXT,
suggestions TEXT[]
);
python seed_db.py./run.shWe need to integrate multiple hospital data sources
into a unified analytics platform on the cloud.• Deploy FastAPI + Streamlit online
• Add user login and project history
• Support multi-SOW report generation
• Add confidence score visualizations
• FastAPI
• Streamlit
• OpenAI
• Supabase