ParseFlow is an AI-powered document automation app for uploading invoices, extracting structured data, and sending the results into workflows such as CSV downloads, Google Sheets, webhooks, and billing-aware usage limits.
The project is built with Next.js App Router, Supabase, Gemini, Stripe, and Google Sheets OAuth.
- Upload PDF and image invoices
- Extract invoice fields with Gemini
- Track document status from upload to parsed result
- Export parsed invoice data to CSV
- Export parsed invoice data to Google Sheets
- Add webhook integrations for downstream automation
- Stripe checkout, billing portal, and usage limits
- Supabase-backed auth, storage, documents, organizations, and integrations
- Next.js 16 App Router
- React 19
- TypeScript
- Supabase Auth, Database, and Storage
- Google Gemini API
- Stripe Checkout, Billing Portal, and Webhooks
- Google Sheets API
- Sonner toast notifications
Install:
- Node.js 20 or newer
- npm
- A Supabase project
- A Google Gemini API key
- A Stripe account
- A Google Cloud project with Google Sheets API enabled
Clone the repository and install dependencies:
git clone https://github.com/YOUR_USERNAME/parseflow.git
cd parseflow
npm installCreate your local environment file:
cp .env.example .env.localFill in the required values:
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
GOOGLE_GEMINI_API_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_PRO_PRICE_ID=
GOOGLE_SHEETS_CLIENT_ID=
GOOGLE_SHEETS_CLIENT_SECRET=Run the development server:
npm run devOpen http://localhost:3000.
The Supabase SQL files live in supabase. Apply the schema files in your Supabase SQL editor or through your preferred migration workflow.
At minimum, configure:
- Auth
- Database tables from the SQL files
- Storage bucket for uploaded documents
- Row-level security policies appropriate for your deployment
Never expose SUPABASE_SERVICE_ROLE_KEY in client-side code. It should only be used in server routes and backend helpers.
Create a Stripe product and recurring price for the Pro plan, then set:
STRIPE_PRO_PRICE_ID=For local webhook testing, use the Stripe CLI:
stripe listen --forward-to localhost:3000/api/stripe/webhookCopy the webhook signing secret into:
STRIPE_WEBHOOK_SECRET=In Google Cloud Console:
- Enable the Google Sheets API.
- Create OAuth credentials.
- Add this redirect URI:
http://localhost:3000/api/integrations/sheets/callback
For production, also add your deployed callback URL.
Useful commands:
npm run dev
npm run lint
npm run buildThis project uses a newer Next.js version with breaking changes. Before changing Next.js-specific APIs, check the local docs in:
node_modules/next/dist/docs/
Contributions are welcome. Good places to start include:
- Documentation improvements
- UI polish
- Bug fixes
- Tests
- Supabase setup improvements
- Stripe or Google Sheets integration improvements
Please read CONTRIBUTING.md before opening a pull request.
Do not commit secrets, .env.local, private keys, service-role keys, webhook secrets, or OAuth credentials.
If you find a security issue, please do not open a public issue with exploit details. Contact the maintainers privately instead.
This project is licensed under the MIT License. See LICENSE.