Skip to content

ashutoshm97/recora-x

Repository files navigation

🧾 Recora-X

AI-Powered Receipt Management with Agentic Intelligence

Autonomous β€’ Scalable β€’ Production-Ready

Next.js Convex Inngest Claude TypeScript License: MIT

Live Demo β€’ Documentation β€’ Report Bug β€’ Request Feature


🎯 Overview

Recora-X is an intelligent SaaS platform that transforms receipt processing through autonomous AI agents. Upload a PDF receipt, and watch as our multi-agent system extracts, validates, and structures financial data in real-time β€” no manual entry required.

Built with Anthropic Claude Sonnet 4.5 for intelligent extraction, orchestrated by Inngest Agents for reliable workflows, and powered by Convex for instant data synchronization.

"Think of it as your personal receipt accountant β€” powered by autonomous AI."

🎬 See It In Action

πŸ“€ Upload πŸ€– AI Processing βœ… Structured Output
Drop any PDF receipt Claude extracts merchant, items, totals Get structured JSON in seconds

✨ Key Features

πŸ€– Agentic AI Architecture

Multi-agent coordination system where specialized AI agents handle scanning, validation, and storage autonomously.

πŸ“„ Intelligent PDF Parsing

Claude Sonnet 4.5 extracts merchant names, transaction dates, line items, and totals with high accuracy.

⚑ Event-Driven Workflow

Inngest orchestrates agent operations through reliable event triggers and state management.

πŸ”„ Real-Time Updates

Convex ensures your UI reflects processing status instantly β€” no polling required.

πŸ” Enterprise Security

Clerk authentication with user-isolated data ensures privacy and compliance.

🎨 Modern Interface

Sleek UI built with Next.js 15, Tailwind 4, and Radix UI components for exceptional UX.


πŸ—οΈ System Architecture

graph TB
    subgraph "πŸ–₯️ Frontend Layer"
        UI[Receipt Upload UI]
        Dashboard[Dashboard & Analytics]
    end

    subgraph "βš™οΈ Backend Layer"
        API[Convex API]
        DB[(Receipts Database)]
        Storage[(File Storage)]
    end

    subgraph "πŸ€– AI Agent Layer"
        Network[Agent Network]
        Scanner[Receipt Scanner Agent]
        DBAgent[Database Agent]
        Claude[Claude Sonnet 4.5]
    end

    subgraph "πŸ” Auth Layer"
        Clerk[Clerk Auth]
    end

    UI -->|Upload| API
    API -->|Store File| Storage
    API -->|Trigger| Network
    Network -->|Initialize| Scanner
    Scanner -->|Parse| Claude
    Claude -->|Extract| Scanner
    Scanner -->|Validate| DBAgent
    DBAgent -->|Save| DB
    DB -->|Subscribe| UI
    Clerk -->|Authenticate| UI
    
    style Claude fill:#9b87f5
    style Network fill:#7c3aed
    style UI fill:#3b82f6
    style DB fill:#10b981
Loading

🧩 Tech Stack

Frontend

  • Framework: Next.js 15 (React 19)
  • Styling: Tailwind CSS 4
  • Components: Radix UI, Shadcn/ui
  • Icons: Lucide React
  • Forms: React Hook Form + Zod

Backend & AI

  • Database: Convex (Real-time)
  • Storage: Convex File Storage
  • Auth: Clerk
  • AI: Anthropic Claude Sonnet 4.5
  • Orchestration: Inngest Agent Kit

πŸ“Š Data Model

erDiagram
    RECEIPTS ||--o{ ITEMS : contains
    RECEIPTS {
        string _id PK
        string userId FK
        string fileName
        string status
        string merchantName
        string transactionDate
        decimal transactionAmount
        string currency
        timestamp createdAt
        timestamp processedAt
    }
    ITEMS {
        string _id PK
        string receiptId FK
        string name
        int quantity
        decimal price
        decimal subtotal
    }
Loading

Receipt States

  • pending β†’ Upload complete, awaiting AI processing
  • processing β†’ AI agent actively extracting data
  • processed β†’ Successfully extracted and stored
  • error β†’ Processing failed, retry available

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ or Bun 1.0+
  • pnpm, npm, or yarn
  • Accounts: Clerk, Convex, Inngest, Anthropic

Installation

# Clone repository
git clone https://github.com/ashutoshm97/recora-x.git
cd recora-x

# Install dependencies
pnpm install

# Copy environment template
cp .env.example .env.local

Environment Setup

# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...

# Convex
CONVEX_DEPLOYMENT=dev:...
NEXT_PUBLIC_CONVEX_URL=https://...

# Inngest
INNGEST_EVENT_KEY=...
INNGEST_SIGNING_KEY=...

# Anthropic
ANTHROPIC_API_KEY=sk-ant-...

Development

# Start Convex dev server
pnpm convex dev

# Start Next.js (in new terminal)
pnpm dev

# Start Inngest dev server (in new terminal)
pnpm inngest:dev

Visit http://localhost:3000 πŸŽ‰


πŸ”„ Agent Workflow

sequenceDiagram
    participant πŸ‘€ User
    participant πŸ–₯️ UI
    participant πŸ“¦ Convex
    participant 🎯 Inngest
    participant πŸ” Scanner
    participant 🧠 Claude
    participant πŸ’Ύ DBAgent

    πŸ‘€->>πŸ–₯️: Upload PDF Receipt
    πŸ–₯️->>πŸ“¦: storeReceipt(file, userId)
    πŸ“¦->>πŸ“¦: Save to File Storage
    πŸ“¦->>🎯: Emit "receipt.extract" event
    🎯->>πŸ”: Initialize Scanner Agent
    πŸ”->>🧠: Send PDF + Prompt
    🧠-->>πŸ”: Return Structured JSON
    πŸ”->>πŸ”: Validate Extraction
    πŸ”->>πŸ’Ύ: Pass Data to DB Agent
    πŸ’Ύ->>πŸ“¦: updateReceipt(data)
    πŸ“¦-->>πŸ–₯️: Real-time Subscription Update
    πŸ–₯️-->>πŸ‘€: Show Processed Receipt
Loading

πŸ“‚ Project Structure

recora-x/
β”œβ”€β”€ app/                    # Next.js 15 App Router
β”‚   β”œβ”€β”€ (auth)/            # Authentication routes
β”‚   β”œβ”€β”€ (dashboard)/       # Protected dashboard
β”‚   └── api/               # API routes
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ ui/               # Shadcn/ui primitives
β”‚   β”œβ”€β”€ receipts/         # Receipt-specific components
β”‚   └── layout/           # Layout components
β”œβ”€β”€ convex/               # Convex backend
β”‚   β”œβ”€β”€ schema.ts         # Database schema
β”‚   β”œβ”€β”€ auth.config.ts    # Clerk integration
β”‚   └── receipts.ts       # Receipt operations
β”œβ”€β”€ inngest/              # Inngest agents
β”‚   β”œβ”€β”€ client.ts         # Inngest client config
β”‚   β”œβ”€β”€ agents/           # Agent definitions
β”‚   β”‚   β”œβ”€β”€ scanner.ts    # Receipt scanner agent
β”‚   β”‚   └── database.ts   # Database agent
β”‚   └── functions/        # Inngest functions
β”œβ”€β”€ lib/                  # Utilities
β”‚   β”œβ”€β”€ utils.ts          # Helper functions
β”‚   └── validations.ts    # Zod schemas
└── public/               # Static assets

πŸ”§ Core API Reference

Convex Functions

// Upload and trigger processing
uploadReceipt(file: File, userId: string): Promise<ReceiptId>

// Fetch user receipts
getReceipts(userId: string): Promise<Receipt[]>

// Get download URL
getFileDownloadUrl(fileId: string): Promise<string>

// Update with extracted data
updateReceiptWithExtractedData(
  receiptId: string, 
  data: ExtractedData
): Promise<void>

// Delete receipt
deleteReceipt(receiptId: string): Promise<void>

Inngest Agents

// Receipt Scanner Agent
receiptScannerAgent({
  pdfUrl: string,
  receiptId: string
}): Promise<ExtractedData>

// Database Agent
databaseAgent({
  receiptId: string,
  extractedData: ExtractedData
}): Promise<void>

🎨 Screenshots

Dashboard Overview

Clean, intuitive interface for managing all your receipts

AI Processing

Watch in real-time as AI extracts your receipt data

Receipt Details

Structured, searchable receipt information


πŸ§ͺ Testing

# Run unit tests
pnpm test

# Run E2E tests
pnpm test:e2e

# Type checking
pnpm type-check

# Linting
pnpm lint

πŸš€ Deployment

Vercel (Recommended)

# Deploy to Vercel
vercel deploy --prod

# Configure environment variables in Vercel dashboard

Manual Deployment

  1. Build the application: pnpm build
  2. Deploy Convex: npx convex deploy
  3. Configure Inngest production keys
  4. Deploy to your hosting platform

πŸ—ΊοΈ Roadmap

  • Batch Processing - Upload and process multiple receipts simultaneously
  • Smart Categories - AI-powered expense categorization
  • Analytics Dashboard - Spending insights and visualizations
  • Export Options - Google Sheets, Excel, Notion integrations
  • Mobile App - Native iOS/Android applications
  • Voice Upload - Speech-to-data receipt entry
  • OCR Enhancement - Support for photographed receipts
  • Multi-language - Support for international receipts

🀝 Contributing

Contributions make the open-source community amazing! Any contributions you make are greatly appreciated.

# Fork the repository
# Create your feature branch
git checkout -b feature/AmazingFeature

# Commit your changes
git commit -m 'feat: add some AmazingFeature'

# Push to the branch
git push origin feature/AmazingFeature

# Open a Pull Request

We follow Conventional Commits specification.


πŸ“ License

Distributed under the MIT License. See LICENSE for more information.


πŸ§‘β€πŸ’» About the Creator

πŸ‘‹ Ashutosh Mishra

Full-Stack Engineer β€’ AI Systems Architect β€’ Cloud Solutions Developer

Building scalable agentic workflows that integrate cutting-edge LLMs with real-time databases.

LinkedIn Portfolio Email


πŸ™ Acknowledgments


Recora-X β€’ Automating Receipts. Empowering Agents.

Built with ❀️ using Next.js β€’ Convex β€’ Inngest β€’ Claude AI

⭐ Star this repo if you find it helpful!

About

An Agentic Approach to Receipts Tracking and Insights Miner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors