Meridian is a Marketing Mix Modeling (MMM) workspace: upload marketing and outcome data, configure channel mapping and model settings, inspect contributions and ROI on a dashboard, run budget optimization with diminishing-returns curves, and chat with Meridian AI grounded in your current model run.
Direct link (copy/paste):
https://meridian-26kiwy8sz-atharva309s-projects.vercel.app/
Examples after it loads:
- Configure & upload data:
/configure - Dashboard:
/dashboard - Budget optimizer:
/optimize - Meridian AI:
/agent
(If you attach a production domain on Vercel, replace this URL with your main domain.)
| What | Link |
|---|---|
| GitHub repository | github.com/Atharva309/Meridian |
| Production / preview frontend (example) | Optimize page on Vercel |
| Vercel project · deployment overview | vercel.com — meridian deployment |
| Hugging Face Space (FastAPI backend) | Spaces · atharva9/meridian-api |
| HF Space · settings (secrets, repo, hardware) | Space settings |
Your main Vercel URL may also be https://meridian-<team>.vercel.app from the Domains panel; preview deployments use URLs like meridian-<hash>-<team>.vercel.app.
Backend API base (hosted on Hugging Face):
https://atharva9-meridian-api.hf.space/api
Swagger docs (when enabled): https://atharva9-meridian-api.hf.space/docs
┌─────────────────┐ HTTPS JSON / multipart ┌──────────────────────────┐
│ Vercel (Vite + │ ─────────────────────────────► │ Hugging Face Space │
│ React SPA) │ VITE_API_BASE_URL=/api │ FastAPI + uvicorn │
└─────────────────┘ │ pandas / sklearn / scipy │
└──────────────────────────┘
│
▼
OPENAI_API_KEY (secret)
for Meridian AI agent
& optional optimize copy
- Frontend: React 18, TypeScript, Vite, Tailwind-style shell, Chart.js / Recharts, Zustand.
- Backend: FastAPI; routes mounted under
/api; statistical MMM utilities, SciPy optimizer for budget allocation. - Hosting: Frontend on Vercel; backend Docker image built from repo root
Dockerfileon Hugging Face Spaces.
Meridian/
├── Dockerfile # HF Space: builds backend (port 7860)
├── .dockerignore
├── README.md
├── backend/
│ ├── app/
│ │ ├── main.py # FastAPI app, CORS, router prefix /api
│ │ ├── routes/api.py # REST endpoints
│ │ └── services/ # MMM, optimizer, agent, insights
│ ├── requirements.txt
│ └── tests/
├── data/ # Bundled sample CSVs for demos
└── frontend/
├── src/
│ ├── pages/ # Configure, Dashboard, Optimize, Agent
│ ├── api/client.ts # API base URL + fetch helpers
│ └── …
├── vercel.json # SPA rewrite → index.html
└── package.json
- Configure — Upload CSV (or sample datasets), map columns, set priors / saturation / adstock, run the model, save named runs.
- Dashboard — Explore spend vs contribution, ROI, rankings, filters, and windowing.
- Optimize — Fixed weekly budget; recommends channel spend split using concave ROI curves and min/max share caps; compares “current” vs “recommended.”
- Meridian AI — Chat agent that calls backend tools over your saved run context (requires
OPENAI_API_KEYon the server).
cd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
export OPENAI_API_KEY="sk-..." # optional: agent + LLM insights
uvicorn app.main:app --reload --reload-dir app --host 127.0.0.1 --port 8000API lives at http://127.0.0.1:8000/api.
cd frontend
npm installCreate frontend/.env.local:
VITE_API_BASE_URL=http://127.0.0.1:8000/apinpm run devApp defaults to port 5173 (see vite.config.ts).
- Import this repo; set Root Directory to
frontend. - Build:
npm run build· Output:dist. - Environment variable
VITE_API_BASE_URL= your hosted API base including/api, e.g.
https://atharva9-meridian-api.hf.space/api
The client normalizes a missing/apisuffix, but setting it explicitly avoids confusion. - Redeploy after env changes (Vite inlines
VITE_*at build time).
- Space uses Docker with root
Dockerfile(copiesbackend/). - In Space settings, add
OPENAI_API_KEYunder variables/secrets for Meridian AI. - Connect GitHub if you want automatic rebuilds on push.
| Variable | Where | Purpose |
|---|---|---|
VITE_API_BASE_URL |
Vercel (Production + Preview) | Browser → FastAPI base URL (…/api). |
OPENAI_API_KEY |
Hugging Face Space (secret) | OpenAI calls for Meridian AI (and optional text insight). |
Never commit real API keys; never expose OPENAI_API_KEY in Vercel public env for a static SPA.
Specify a license in the repo if you open-source the project beyond private use.
Deployed by Atharva309 / atharva9 — see links in the table at the top for the live Stack (Vercel + Hugging Face).