Inspiration
Every day, businesses waste millions on bad spending decisions. From Facebook ad campaigns that never convert to software subscriptions that go unused, money is spent without proper evidence or analysis. Traditional expense tracking only tells you what happened after the money is gone. We wanted to build something that intervenes before the spending decision is made. The world doesn't need another expense tracker. It needs a decision firewall that asks: "Can you prove this is a good investment?"
What it does
Preva is an AI-powered spending decision engine that evaluates proposed business expenses before money is committed. Businesses enter a proposed expense with expected returns and supporting evidence. Preva then:
- Assesses evidence- What supporting documents exist?
- Calculates ROI/ROAS- What return is expected?
- Runs scenario analysis - What happens in optimistic, expected, conservative, and downside scenarios?
- Applies deterministic guardrails - Financial rules (NOT LLM) determine the decision
- Provides AI analysis - Groq LLM offers qualitative assessment of assumptions and risks The result is a clear decision: APPROVE, CONDITIONAL,REVIEW, or REJECT with detailed explanations and recommendations.
How we built it
Backend:
- FastAPI for the REST API
- SQLite for storing decisions and historical data
- Python for all business logic
- Multi-agent architecture: Evidence Agent → ROI Engine → Guardrail Engine → Decision Agent
- Deterministic guardrails ensure LLM does NOT make final financial decisions AI Integration:
- Groq API with
openai/gpt-oss-120bmodel for AI analysis - Offline fallback mode if API is unavailable Frontend:
- HTML, CSS, JavaScript for a clean, responsive interface
- Real-time form submission with result display
- Dashboard with statistics and decision history Deployment:
- Render for backend hosting
- Vercel for frontend hosting
- GitHub for version control
Challenges we ran into
- CORS Issues: Connecting the Vercel frontend to the Render backend required careful CORS configuration.
- Groq Model Selection: Finding the right model (
openai/gpt-oss-120b) and correctly configuring it in both code and environment variables. - Vercel Deployment: Configuring Vercel to serve static HTML/CSS/JS files from the
frontend/directory required proper settings and avercel.jsonfile. - Render Cold Starts: The free Render tier spins down after inactivity, causing 30-50 second delays on first request.
- Termux Development: Building a complete full-stack application entirely on an Android phone using Termux required careful dependency management.
Accomplishments that we're proud of
✅ Working, deployed product- Live at https://preva-sand.vercel.app ✅ Real AI integration - Groq LLM provides meaningful business analysis ✅ Deterministic financial engine- LLM does NOT make financial decisions; guardrails do ✅ Multi-agent architecture - Evidence → ROI → Guardrails → Decision ✅ Full deployment - Backend on Render, Frontend on Vercel ✅ Database persistence - All decisions stored in SQLite ✅ Scenario analysis - Optimistic, Expected, Conservative, Downside scenarios ✅ Evidence confidence scoring- 0-100% evidence quality assessment ✅ Risk scoring - 0-100 risk score for every decision
What we learned
- AI is an enhancer, not a decision-maker - The guardrail engine is the most important component. AI provides analysis, but deterministic rules make the final decision.
- Evidence matters - The more evidence a user provides, the better the decision quality. 3.Deployment is complex- Connecting frontend, backend, AI APIs, and databases across multiple platforms requires careful configuration.
- Mobile development is viable - Building a full-stack application from Termux on Android is possible with the right tools. 5.Cold starts are real - Free tier hosting comes with spin-down delays that affect user experience.
What's next for Preva
- Document processing- Upload receipts, invoices, and PDFs for automatic evidence extraction (OCR)
- Historical learning- Learn from past decisions to improve recommendations over time
- Channel-specific analysis - Track performance by channel (Facebook, Google, Email, etc.)
- Team collaboration - Multiple users, approval workflows, and audit trails
- Integration with accounting software- QuickBooks, Xero, etc.
- Mobile app - Native Android/iOS apps
- Multi-currency support - Beyond NGN, support USD, EUR, GBP, etc.
Built With
- ai/ml
- api
- business
- css
- decision
- fastapi
- github
- groq
- html
- intelligence
- javascript
- language
- management
- natural
- openai
- processing
- python
- render
- rest
- spending
- sqlite
- support
- vercel
Log in or sign up for Devpost to join the conversation.