ExpenseIntel: AI-Powered Expense Intelligence for SMBs

Track: Economic Empowerment & Education Stack: Vanilla JS · Express · SQLite · Claude API · ApexCharts · Resend


Inspiration

Small and medium-sized businesses generate thousands of card transactions every month — but most lack the tools to make sense of their own spending. Finance teams get buried in spreadsheets, policy violations slip through undetected, and approval workflows crawl along manually.

Inspired by Brim's mission to empower businesses with smarter financial tools, we built ExpenseIntel: an AI-powered expense intelligence platform built on real transaction data.


What It Does

ExpenseIntel gives businesses a single platform to turn raw transaction data into actionable intelligence across five core workflows:

1. 💬 Talk to Your Data

Ask natural language questions about spending. Claude generates SQL, runs it against your transactions, and returns interactive charts powered by ApexCharts.

2. 🔍 Policy Compliance Engine

An agentic AI scan that reviews thousands of transactions against your expense policy — flagging violations with severity rankings and employee leaderboards.

Crucially, we designed this with human oversight in mind. Finance managers are never expected to blindly accept AI decisions. For any flagged violation, the manager can click "Notify Employee" to automatically send a professional email requesting a follow-up meeting. Humans stay in the loop; accountability flows both ways.

3. ✅ Pre-Approval Requests

Employees submit expense requests in plain English. Claude parses the natural language input and presents a structured summary back to the employee — giving them a chance to review and edit the parsed details before confirming submission. This prevents miscommunication and ensures the request accurately reflects intent before it reaches the finance team.

Once submitted, the finance manager receives an instant email notification with one-click approve/deny buttons — no login required, actionable directly from their phone. In parallel, the manager also gets a full AI-generated recommendation inside the app, where Claude has looked up the employee's transaction history and department budget to inform its reasoning.

4. 📊 Expense Reports

The finance team triggers AI-generated expense reports for any employee and date range. Claude groups transactions into meaningful categories and produces structured reports ready for CFO review.

5. 🖼️ Saved Visuals Gallery

Charts generated during conversations are automatically saved and can be revisited at any time. The gallery also serves as a living showcase of the platform's email communications — the violation notification email and the pre-approval request email are both displayed here, illustrating the full communication loop the system creates.


How We Built It

ExpenseIntel is built entirely in JavaScript — no frameworks, no build step.

  • Backend: Express server with a SQLite database (better-sqlite3) holding 4,235 real Brim transactions across 11 relational tables.
  • AI Architecture: All five AI features share a common agentic loop architecture. Claude is given a set of purpose-built tools — run_query, get_schema, flag_violation, get_employee_history, get_department_budget, save_chart — and iterates autonomously: calling tools, reasoning over results, and refining output before returning a final response.
  • Frontend: Hand-crafted vanilla JS SPA with a custom design system, light/dark theming, and ApexCharts for data visualization.
  • Email: Resend for transactional email delivery, including tokenized approve/deny links in finance manager emails.

Challenges We Ran Into

Synthetic data generation was harder than expected. The original transaction dataset had limited coverage across departments and edge-case policy scenarios. Generating realistic synthetic data using Claude — transactions that matched real-world MCC codes, merchant patterns, and spending distributions — required significant iteration on generation prompts and validation logic.

Agentic reliability was a real engineering problem. Getting Claude to produce consistently structured, actionable outputs across multi-step loops required careful prompt engineering and tool design — especially for compliance scanning over thousands of rows.

API integrations took more iteration than anticipated. Wiring Resend for transactional email delivery and ensuring the approve/deny token links in finance manager emails worked correctly end-to-end was a grind.


What We're Proud Of

  • Entirely hand-crafted UI — every layout, component, and animation was designed and coded without AI assistance, resulting in a cohesive and polished product feel.
  • True agentic depth — every AI feature uses a multi-step loop with custom tools, not a single-prompt wrapper. Claude reasons, queries, and iterates before surfacing results.
  • Human-in-the-loop compliance — rather than forcing managers to blindly trust AI violation flags, we built a direct "Notify Employee" action that triggers a real email, keeping humans accountable and in control.
  • Zero-friction approval workflow — from an employee typing a request in plain English, to Claude parsing and letting them confirm the details, to the finance manager receiving a mobile-friendly email with one-click approve/deny — the entire loop runs without the approver ever needing to open the app or log in.
  • Policy compliance at scale — the compliance engine scans thousands of transactions against a real expense policy and produces ranked, actionable violation reports with zero manual input.

What We Learned

We learned what it actually means to build with an AI model rather than just call it. Designing tool schemas, managing agentic iteration limits, and engineering prompts for reliable structured output required a fundamentally different mindset than traditional API integration.

We also learned how much product quality lives in the seams — the small details in UI transitions, data loading states, and error handling that separate a demo from a real product.


What's Next

  • Multi-tenant authentication — support multiple companies with isolated data and role-based access control
  • Real-time sync — connect directly to Brim's card network for live transaction ingestion
  • Anomaly detection — proactive alerts when spending patterns deviate from historical norms
  • Scalable deployment — a Cloudflare Worker + D1 backend is already built as a production-ready deployment path

Built at the McGill's First CBC Hackathon. ExpenseIntel is an independent project inspired by Brim's mission to bring smarter financial tools to businesses.

Built With

Share this project:

Updates