Skip to content

Repository files navigation

MILE (My Intelligent Ledger & Explorer)

AI-native travel finance companion that plans trips, tracks spend, and explains budgets through conversation.

Next.js TypeScript Supabase Thesys C1 Deploy with Vercel


Demo Video

What MILE Does

  • Conversational trip planning that turns vague intent into day-by-day itineraries.
  • Natural language expense capture (text, voice, CSV import, receipts via vision AI).
  • Live budget tracking with category insights and forward-looking forecasts.
  • Dynamic UI generation using Thesys C1 for itineraries, dashboards, and smart forms.
  • Persistent user memory so preferences, context, and corrections stick across sessions.
  • PWA-ready experience with real-time sync via Supabase.

Architecture at a Glance

  • Next.js 14 + TypeScript with App Router, Tailwind, and animated UI components.
  • Multi-agent AI layer (lib/agents): intent classifier, context builder, decision helper, pattern analyzer, orchestrator.
  • Provider resilience: Groq primary with fallbacks; Gemini for vision; Thesys C1 for UI generation.
  • Data & auth: Supabase (Postgres, Auth, Storage, RLS), real-time subscriptions for instant UI updates.
  • Performance: streaming responses, response caching, lazy loading, and code splitting.

Feature Highlights

  • Chat-first planning: ask for a trip and iteratively refine costs, routes, and activities.
  • Smart transactions: automatic category suggestions, currency conversion, and contextual tags.
  • Receipts to data: image OCR with Gemini populates structured expenses.
  • Analytics: category breakdowns, burn-rate projections, and anomaly detection.
  • Generated interfaces: itinerary cards, expandable budget views, and guided forms created on-demand.

Quick Start (Local)

  1. Clone and install
git clone https://github.com/mantis2404/MILE.ai.git
cd MILE.ai
npm install
  1. Copy environment template
cp .env.example .env.local
  1. Fill required variables in .env.local
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
THESYS_API_KEY=sk-th-your-key
GROQ_API_KEY=gsk-your-key
GROQ_API_KEY_FALLBACK_1=gsk-fallback-1   # optional
GROQ_API_KEY_FALLBACK_2=gsk-fallback-2   # optional
GEMINI_API_KEY=AIza-your-key             # optional, for receipts
NEXT_PUBLIC_APP_URL=http://localhost:3000
NODE_ENV=development
  1. Apply database schema to your Supabase project
    • Open Supabase SQL editor
    • Paste and run the contents of supabase/schema.sql
  2. Run the dev server
npm run dev
  1. Try it out: sign up, ask for a trip plan, log an expense in natural language, and ask for a budget update.

Useful Scripts

  • npm run dev – start Next.js in development mode
  • npm run build – production build
  • npm start – run the built app
  • npm run lint – lint the codebase
  • npm run type-check – TypeScript type checking only
  • npm run test:db – verify Supabase connectivity

Project Structure

app/              # Routes, pages, and API handlers
components/       # UI, landing, and chat components
lib/agents/       # AI orchestration: intent, context, decision, pattern analysis
lib/ai/           # Providers: Groq, Gemini, Thesys integrations
lib/supabase/     # Client/server Supabase helpers
supabase/         # Database schema and migrations

Troubleshooting

  • Build fails: ensure env vars are set and run npm run build locally.
  • Auth redirects: match Supabase Site URL and callback to your deployed URL.
  • Rate limits: add Groq fallback keys and enable response caching.
  • Receipts not parsed: confirm GEMINI_API_KEY is set; otherwise feature is disabled.

Contributing

Issues and pull requests are welcome. Ideas to tackle next: multi-currency budgeting, shared/group trips, bank import adapters, and richer offline support.

Acknowledgments

Built with:

Inspired by: The belief that financial tools should adapt to humans, not the other way around.

Made with care for travelers who deserve financial peace of mind.

About

AI-native travel finance companion that plans trips, tracks spend, and explains budgets through interactive conversation.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages