Stop wasting hours on manual invoice data entry. Upload any invoice image or PDF and let AI extract all the data automatically.
- 🤖 AI-Powered Extraction - Uses Gemini 1.5 Flash for accurate invoice data extraction
- ⚡ Fast Processing - Process invoices in seconds, not minutes
- 📊 Auto-Categorization - Automatically categorizes expenses (Software, Travel, Meals, etc.)
- 📁 Export Anywhere - Export to CSV, QuickBooks, Xero
- 💰 Save Money - Free tier available, paid plans from $29/month
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS + shadcn/ui
- AI: Google Gemini 1.5 Flash (free tier available)
- Payments: DodoPayments (ready to integrate)
- Database: Supabase (ready to integrate)
- Node.js 18+
- Google Gemini API key (free tier available)
- DodoPayments account (for payments)
- Supabase account (for database)
# Clone the repository
cd invoicebot
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env.local
# Configure your environment variables
# Edit .env.local with your API keysCreate a .env.local file with:
# Google Gemini (free tier available at https://aistudio.google.com)
GOOGLE_API_KEY=your_gemini_api_key
# DodoPayments (https://dodopayments.com)
DODO_PAYMENTS_API_KEY=your_dodo_api_key
DODO_PAYMENTS_WEBHOOK_KEY=your_webhook_key
DODO_PAYMENTS_RETURN_URL=http://localhost:3000
DODO_PAYMENTS_ENVIRONMENT=test_mode
# Supabase (https://supabase.com)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000npm run devOpen http://localhost:3000 to see the app.
invoicebot/
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ ├── upload/route.ts # File upload endpoint
│ │ │ └── process/route.ts # AI processing endpoint
│ │ ├── dashboard/page.tsx # Dashboard with invoice list
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Landing page
│ ├── components/ # React components
│ ├── lib/
│ │ ├── supabase.ts # Supabase client
│ │ ├── gemini.ts # Gemini AI client
│ │ ├── dodopayments.ts # DodoPayments client
│ │ └── utils.ts # Utility functions
│ └── types/ # TypeScript types
├── public/ # Static assets
└── package.json
Run the following SQL in your Supabase SQL Editor:
-- Profiles table
create table profiles (
id uuid references auth.users primary key,
email text,
stripe_customer_id text,
plan text default 'free',
invoices_used integer default 0,
created_at timestamptz default now()
);
-- Invoices table
create table invoices (
id uuid default gen_random_uuid() primary key,
user_id uuid references profiles(id),
vendor text,
total decimal,
date date,
category text,
file_url text,
status text default 'pending',
raw_text text,
created_at timestamptz default now()
);
-- Enable RLS
alter table profiles enable row level security;
alter table invoices enable row level security;
-- Create policies (adjust for your needs)
create policy "Users can view own profile" on profiles
for select using (auth.uid() = id);
create policy "Users can view own invoices" on invoices
for select using (auth.uid() = user_id);
create policy "Users can insert own invoices" on invoices
for insert with check (auth.uid() = user_id);Upload an invoice file for processing.
Process an uploaded invoice with AI extraction.
- Push to GitHub
- Connect to Vercel
- Add environment variables
- Deploy
docker build -t invoicebot .
docker run -p 3000:3000 invoicebot| Plan | Price | Features |
|---|---|---|
| Free | $0/mo | 5 invoices/month |
| Pro | $29/mo | 20 invoices/month |
| Lifetime | $197 one-time | Unlimited invoices |
- Supabase authentication integration
- DodoPayments subscription handling
- Export to QuickBooks/Xero
- Email notifications
- Mobile app (React Native)
- API access for developers
Contributions welcome! Please read the contributing guidelines first.
MIT License - feel free to use this for your own projects.
Built with ❤️ using Next.js, Tailwind CSS, and Gemini AI