This repository contains a deliberately minimal implementation of the TriFiVend calling tool. The goal is to provide a working proof of concept without the layers of experimental agents and deployment scripts that previously cluttered the project.
backend/ # FastAPI application code
ui/ # Vite + React front-end for triggering calls
main.py # Uvicorn entrypoint that exposes `backend.create_app`
A lightweight JSON file in data/calls.json keeps track of every call request. The file is created automatically when the API boots.
The GET /calls endpoint accepts an optional limit query string (up to 500) to return only the most recent records (for example /calls?limit=20). This keeps responses fast even when the call log grows.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.backend.txt
uvicorn main:app --reloadEnvironment variables (optional but required for real phone calls):
TWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKENTWILIO_FROM_NUMBEROPENAI_API_KEY(if using OpenAI-powered call scripting)OPENAI_MODEL(for examplegpt-4.1-mini)
If these values are missing the API will still accept requests, but it will only record them locally instead of placing real calls.
cd ui
npm install
npm run devThe development server assumes the API is available at http://localhost:8000. You can change this by updating the API_BASE_URL constant in ui/src/api.ts.
pytestThe tests cover the most important flows: creating calls, listing them, and updating their status.