An AI-powered invoice and receipt processing system designed to help accounting professionals quickly analyze, organize, and archive invoices and receipts. This application leverages Google's Gemini AI to automatically extract key information from invoice images and PDF documents.
- π€ AI-Powered Extraction: Automatically extracts invoice information (invoice number, type, date, amount, vendor) from images and PDF files using Google Gemini AI
- π¦ Batch Processing: Upload and process multiple invoices simultaneously
- π Invoice Management: View, search, and manage all processed invoices in a centralized list
- β Status Tracking: Track invoice approval status (pending/approved)
- π¨ Modern UI: Clean and intuitive interface built with Next.js and Tailwind CSS
- β‘ Framework: Next.js 15 with App Router (Static Export)
- π€ AI Integration: Google Gemini AI (gemini-2.0-flash)
- πΎ Storage: Client-side localStorage
- π¨ Styling: Tailwind CSS
- π Language: TypeScript
- π Deployment: GitHub Pages
- π¦ Node.js 18+ and npm
- π Google Gemini API key (Get your API key here)
- Clone the repository:
git clone <your-repo-url>
cd invoice-processor- Install dependencies:
npm install-
Add your Google Gemini API key:
For Local Development:
- Create a
.env.localfile in the root directory - Add:
NEXT_PUBLIC_GEMINI_API_KEY=your-api-key-here - Get your API key from: Google AI Studio
For Production (GitHub Pages):
- Add the environment variable as a GitHub Secret (see Deployment section)
- Create a
-
Run the development server:
npm run dev- Open http://localhost:3000 in your browser π
-
π€ Upload Invoices:
- Navigate to the "Upload Invoices" tab
- Click or drag and drop invoice images (JPG, PNG) or PDF files
- Files must be under 10MB
- Click "Start Processing" to analyze invoices
-
π View Invoices:
- Navigate to the "Invoice List" tab
- Search invoices by invoice number or vendor name
- Toggle approval status by clicking the status button
invoice-processor/
βββ src/
β βββ app/
β β βββ page.tsx # Main page
β β βββ layout.tsx # Root layout
β βββ components/
β β βββ UploadInvoice.tsx # Invoice upload component
β β βββ InvoiceList.tsx # Invoice list component
β β βββ Tabs.tsx # Tab navigation component
β βββ lib/
β βββ storage.ts # Client-side storage service
βββ public/ # Static assets
This app uses client-side localStorage to store invoices. Data is saved in the user's browser and persists across sessions.
This app is configured for static export and can be deployed to GitHub Pages for free! π
- Initialize Git (if not already done):
git init
git add .
git commit -m "Initial commit: Invoice processor"-
Create a GitHub Repository:
- Go to GitHub.com and sign in
- Click the "+" icon β "New repository"
- Repository name:
invoice-processor(or your preferred name) - Choose Public
- DO NOT initialize with README
- Click "Create repository"
-
Push to GitHub:
git remote add origin https://github.com/YOUR_USERNAME/invoice-processor.git
git branch -M main
git push -u origin main- Go to your repository on GitHub
- Click Settings β Pages (in the left sidebar)
- Under Source, select:
- Source:
GitHub Actions
- Source:
- Click Save
- In your repository, go to Settings β Secrets and variables β Actions
- Click "New repository secret"
- Name:
NEXT_PUBLIC_GEMINI_API_KEY - Value: Your Google Gemini API key
- Get your API key from: Google AI Studio
- Click "Add secret"
- The GitHub Actions workflow will automatically run when you push to
main - Or manually trigger it: Go to Actions tab β Deploy to GitHub Pages β Run workflow
If your repository name is NOT invoice-processor, you need to update the base path:
- Open
next.config.ts - Uncomment and update these lines:
basePath: '/YOUR_REPO_NAME',
assetPrefix: '/YOUR_REPO_NAME',- Replace
YOUR_REPO_NAMEwith your actual repository name - Commit and push the changes
Once deployment completes (usually 2-3 minutes):
- Your website will be available at:
https://YOUR_USERNAME.github.io/YOUR_REPO_NAME/ - Or if you have a custom domain, configure it in Settings β Pages
Every time you push changes to the main branch, GitHub Actions will automatically rebuild and redeploy your site! β¨
NEXT_PUBLIC_GEMINI_API_KEY- Your Google Gemini API key (required)- For local development: Add to
.env.localfile - For production: Add as GitHub Secret (see Deployment section)
- For local development: Add to
- Check GitHub Actions logs in the Actions tab
- Verify
NEXT_PUBLIC_GEMINI_API_KEYsecret is set correctly - Make sure all dependencies are in
package.json
- Wait a few minutes after deployment
- Check that GitHub Pages is enabled in repository settings
- Verify the build completed successfully in Actions tab
- Verify the secret name is exactly:
NEXT_PUBLIC_GEMINI_API_KEY - Check that the API key is valid
- Re-run the workflow after updating the secret
Contributions are welcome! Please feel free to submit a Pull Request. π‘
See LICENSE file for details.