Skip to content

LeeAaron702/ParcelParse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParcelParse

OCR-powered shipping label scanner that extracts parcel data and syncs it to Google Sheets automatically.

Screenshot

Features

  • AI-Powered OCR -- Snap a photo of any shipping label and extract sender, recipient, tracking numbers, and carrier info using GPT-4o Vision
  • Google Sheets Sync -- Automatically creates a Google Drive folder and spreadsheet per user, appending parsed data with each scan
  • Credit System -- Pay-as-you-go credit packs and monthly subscription plans with Stripe billing
  • Real-Time Camera -- In-browser camera capture with device selection and live preview
  • Account Management -- Full account lifecycle: signup, settings, usage history, and account deletion (cascades across Clerk, Google, and database)
  • Editable Results -- Review and correct AI-parsed fields before submitting to your spreadsheet

Tech Stack

Python FastAPI React Vite PostgreSQL Docker Stripe MUI

Architecture

┌─────────────────────┐     ┌──────────────────────┐     ┌──────────────┐
│   React 19 + Vite   │────▶│   FastAPI Backend     │────▶│ PostgreSQL   │
│   MUI 7 · Clerk Auth│     │   Python 3.13         │     │ 17.5         │
│   Port 3000         │     │   Port 8000           │     │ Port 5432    │
└─────────────────────┘     └──────────┬───────────┘     └──────────────┘
                                       │
                          ┌────────────┼────────────┐
                          ▼            ▼            ▼
                    ┌──────────┐ ┌──────────┐ ┌──────────┐
                    │ OpenAI   │ │ Stripe   │ │ Google   │
                    │ GPT-4o   │ │ Billing  │ │ Drive +  │
                    │ Vision   │ │          │ │ Sheets   │
                    └──────────┘ └──────────┘ └──────────┘

Frontend: React 19 with MUI 7 component library. Clerk handles authentication with Google OAuth (provides Drive/Sheets scopes). Camera capture, OCR results editing, credit balance display, and account settings.

Backend: FastAPI with SQLAlchemy ORM. Clerk JWT verification on all protected routes. OpenAI GPT-4o-mini for label OCR. Stripe for credit pack purchases and subscription management. Google Drive/Sheets API for per-user data export.

Database: PostgreSQL 17.5 with UUID primary keys. Models: Users, ScanUsage, CreditTransactions, StripeProducts, SubscriptionPlans, PaymentFailures.

Setup

Prerequisites

  • Docker and Docker Compose
  • Clerk account (with Google OAuth provider configured for Drive + Sheets scopes)
  • OpenAI API key
  • Stripe account (test or live)

Quick Start

# Clone the repo
git clone https://github.com/LeeAaron702/ParcelParse.git
cd ParcelParse

# Copy environment files
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env

# Fill in your API keys in both .env files

# Start all services
docker compose up --build

The app will be available at:

Stripe Product Setup

After configuring your Stripe keys, seed the product catalog:

docker compose exec backend python scripts/setup_stripe.py

This creates the credit packs (20/50/100 credits) and subscription plans (Basic/Pro/Enterprise) in your Stripe account and syncs them to the local database.

Live Demo

https://parcels.leeseaver.com (coming soon)

License

MIT

About

OCR document processing SaaS with Stripe billing and FastAPI backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors