GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - AnkitRajCode/AI-powered-Invoice-Management-System: AI-powered invoice management app that extracts data from PDF, image & Excel files using Google Gemini organized into Invoices, Products & Customers with editing, search, and CSV/Excel export.

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
public
public
 
 
src
src
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
components.json
components.json
 
 
eslint.config.mjs
eslint.config.mjs
 
 
next.config.ts
next.config.ts
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
postcss.config.mjs
postcss.config.mjs
 
 
tailwind.config.ts
tailwind.config.ts
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

AI-Powered Invoice Management System

Banner

An intelligent invoice management web app that uses AI to extract, organize, and manage invoice data from PDFs, images, and Excel files. Extracted data is automatically structured into three connected views โ€” Invoices, Products, and Customers โ€” with real-time editing, search, sorting, pagination, and one-click export.

Preview

๐Ÿ”— Live demo: https://aipims.vercel.app/


โœจ Features

AI-powered data extraction

  • Upload PDF, PNG/JPG, or Excel (.xlsx) files.
  • PDFs and images are parsed by Google Gemini to extract invoice information, line items, charges, totals, and bank details.
  • Excel files are parsed server-side and grouped into invoices automatically.
  • Per-file upload progress with success/error status and one-click retry for failed files.

Organized, connected views

  • Invoices โ€” invoice number, customer, editable date, line items, and an auto-calculated total per invoice.
  • Products โ€” a flat, sortable list of all line items with an aggregate totals row.
  • Customers โ€” customers grouped by name/phone with total purchase amount and bank details.
  • Editing a value in one view updates it everywhere instantly via centralized Redux state.

Productivity tools

  • ๐Ÿ” Search across each view.
  • โ†•๏ธ Sorting on the Products table (product, quantity, rate, amount).
  • ๐Ÿ“„ Pagination for large datasets.
  • ๐Ÿ—‘๏ธ Delete individual invoices/items or clear all data (with confirmation).
  • ๐Ÿ“ค Export to CSV or Excel.
  • ๐Ÿ’พ Local persistence โ€” data is saved to localStorage and survives page reloads.
  • โœ… Inline validation for numeric fields with automatic total recalculation.

Modern UI

  • Clean, minimal, responsive interface built with Tailwind CSS v4.
  • Reusable component system (navbar, page headers, toolbars, dialogs).
  • Toast notifications for key actions.

๐Ÿ› ๏ธ Tech Stack

Area Technology
Framework Next.js 16 (App Router, Turbopack)
Language TypeScript 5
UI Library React 19
Styling Tailwind CSS v4, shadcn/ui (Radix primitives)
State Redux Toolkit + React-Redux
AI Google Gemini (@google/generative-ai)
Files SheetJS (xlsx)
Icons lucide-react
Toasts react-hot-toast
Linting ESLint 9 (flat config)
Hosting Vercel

๐Ÿš€ Getting Started

Prerequisites

  • Node.js v18.18 or higher
  • npm (or yarn/pnpm)
  • A Google Gemini API key โ€” get one here

Installation

  1. Clone the repository:
    git clone https://github.com/thekavikumar/ai-powered-invoice.git
    cd ai-powered-invoice
  2. Install dependencies:
    npm install
  3. Create a .env.local file in the project root:
    API_KEY=your_gemini_api_key
  4. Start the development server:
    npm run dev
  5. Open http://localhost:3000.

Available scripts

Command Description
npm run dev Start the development server (Turbopack)
npm run build Create an optimized production build
npm run start Run the production build
npm run lint Lint the project with ESLint

๐Ÿ“ Project Structure

.
โ”œโ”€โ”€ public/                     # Static assets (preview.png, logo.png, svgs)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/                    # Next.js App Router
โ”‚   โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ extract/        # AI extraction endpoint (PDF/image โ†’ Gemini)
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ processXlsx/    # Excel parsing endpoint
โ”‚   โ”‚   โ”œโ”€โ”€ customers/          # Customers page
โ”‚   โ”‚   โ”œโ”€โ”€ invoices/           # Invoices page
โ”‚   โ”‚   โ”œโ”€โ”€ products/           # Products page
โ”‚   โ”‚   โ”œโ”€โ”€ favicon.ico
โ”‚   โ”‚   โ”œโ”€โ”€ globals.css         # Tailwind v4 + theme tokens
โ”‚   โ”‚   โ”œโ”€โ”€ layout.tsx          # Root layout + SEO metadata
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx            # Landing page
โ”‚   โ”œโ”€โ”€ assets/                 # Source images (banner, logo, preview)
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ ui/                 # shadcn/ui primitives (button, dialog, input, label)
โ”‚   โ”‚   โ”œโ”€โ”€ CustomLink.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ ExportButtons.tsx   # CSV/Excel export + clear all
โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.tsx          # Sub-route navigation
โ”‚   โ”‚   โ”œโ”€โ”€ PageHeader.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ Pagination.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ ReduxWrapper.tsx    # Redux provider + localStorage persistence
โ”‚   โ”‚   โ”œโ”€โ”€ SearchBar.tsx
โ”‚   โ”‚   โ””โ”€โ”€ UploadBtn.tsx       # Upload dialog with per-file status
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ export.ts           # CSV/XLSX export helpers
โ”‚   โ”‚   โ”œโ”€โ”€ ui.ts               # Shared className constants
โ”‚   โ”‚   โ””โ”€โ”€ utils.ts            # cn() helper
โ”‚   โ””โ”€โ”€ redux/
โ”‚       โ”œโ”€โ”€ slices/
โ”‚       โ”‚   โ””โ”€โ”€ invoicesSlice.ts
โ”‚       โ””โ”€โ”€ store.ts
โ”œโ”€โ”€ eslint.config.mjs           # ESLint 9 flat config
โ”œโ”€โ”€ next.config.ts
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ postcss.config.mjs
โ”œโ”€โ”€ tailwind.config.ts
โ””โ”€โ”€ tsconfig.json

๐Ÿ”Œ API Reference

POST /api/extract

Extracts structured data from a PDF or image using Google Gemini.

Request body

{
  "file": "<base64-encoded-file>",
  "mimeType": "application/pdf | image/png | image/jpeg"
}

Response

{
  "success": true,
  "data": "{ \"invoiceInformation\": {}, \"items\": [], \"chargesAndTotals\": {}, \"bankDetails\": {} }"
}

POST /api/processXlsx

Parses an Excel file and groups rows into invoices.

Request body

{
  "file": "<base64-encoded-xlsx>"
}

Response

{
  "success": true,
  "data": [
    {
      "invoiceInformation": {},
      "items": [],
      "chargesAndTotals": {}
    }
  ]
}

๐Ÿงช Tested Scenarios

  1. Single invoice PDF
  2. Invoice PDF + image together
  3. Single Excel file
  4. Multiple Excel files
  5. Mixed file types in one upload

Missing fields are left blank and can be edited manually; failed uploads can be retried individually.


โ˜๏ธ Deployment

The app is deployed on Vercel at https://aipims.vercel.app/.

To deploy your own instance:

  1. Push the repository to GitHub.
  2. Import it into Vercel.
  3. Add the API_KEY environment variable in the project settings.
  4. Deploy.

๐Ÿค Contributing

  1. Fork the repository.
  2. Create a feature branch:
    git checkout -b feature-name
  3. Commit your changes:
    git commit -m "Add new feature"
  4. Push the branch:
    git push origin feature-name
  5. Open a pull request.

About

AI-powered invoice management app that extracts data from PDF, image & Excel files using Google Gemini organized into Invoices, Products & Customers with editing, search, and CSV/Excel export.

aipims.vercel.app/

Topics

aidata-extractiondocument-aigoogle-geminiinvoice-managementnextjsocrpdf-parserreactjsreduxseoshadcn-uitailwindcsstoolkittypescriptvercelxlsx

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402775 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.