Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auditra

Auditra product banner

Auditra is an AI expense policy auditing platform. It reads receipts, retrieves relevant clauses from company policy PDFs and produces explainable approval decisions with evidence.

Features

  • Receipt upload and preview for PDFs and images.
  • OCR and structured receipt extraction.
  • Policy PDF ingestion, chunking, embeddings and retrieval.
  • AI audit decisions: approved, rejected or needs_review.
  • Organization workspaces, invitations, roles and admin review.
  • Password reset, session management, profile avatars and account cleanup.
  • Pluggable AI providers: OpenRouter, OpenAI, Fireworks and Gemini.

Stack

  • Frontend: Next.js, React, TypeScript, Tailwind CSS
  • Backend: Hono, TypeScript, MongoDB, Zod, JWT
  • Storage: Cloudinary
  • OCR: Unstructured
  • Email: Resend
  • AI/RAG: OpenRouter, OpenAI, Fireworks, Gemini, MongoDB Atlas Vector Search

Quick Start

git clone https://github.com/AaronKurian/Auditra.git
cd Auditra

Install dependencies:

cd backend && npm install
cd ../frontend && npm install

Create local env files:

cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env

Start the API:

cd backend
npm run dev

Start the web app:

cd frontend
npm run dev

Open:

http://localhost:3000

API health check:

curl http://localhost:4000/health

Configuration

Auditra needs these services configured in backend/.env:

  • MONGODB_URI
  • CLOUDINARY_CLOUD_NAME
  • CLOUDINARY_API_KEY
  • CLOUDINARY_API_SECRET
  • UNSTRUCTURED_API_KEY
  • RESEND_API_KEY
  • JWT_ACCESS_SECRET
  • JWT_REFRESH_SECRET
  • One AI provider key:
    • OPENROUTER_API_KEY
    • OPENAI_API_KEY
    • FIREWORKS_API_KEY
    • GEMINI_API_KEY

Frontend configuration:

NEXT_PUBLIC_API_URL=http://localhost:4000
NEXT_PUBLIC_SITE_URL=http://localhost:3000

Select an AI provider:

AI_PROVIDER=openrouter

Supported values:

openrouter
openai
fireworks
gemini

For policy retrieval in production, configure a MongoDB Atlas Vector Search index on policy_chunks.embedding using the index name in ATLAS_POLICY_VECTOR_INDEX.

Scripts

Backend:

cd backend
npm run dev
npm run build
npm run start

Frontend:

cd frontend
npm run dev
npm run build
npm run start

Architecture

frontend/Next.js
      |
      v
backend/Hono API
      |
      +-- MongoDB
      +-- Cloudinary
      +-- Unstructured OCR
      +-- AI provider abstraction
      +-- Atlas Vector Search

The backend keeps vendor integrations behind service boundaries. AI vendors are accessed through a single provider interface so audit, OCR, policy ingestion and retrieval workflows do not depend on provider-specific code.

Project Structure

backend/src/api        Hono routes and middleware
backend/src/auth       sessions, JWTs, password reset
backend/src/db         MongoDB connection and indexes
backend/src/services   product workflows and integrations
frontend/src/app       Next.js routes
frontend/src/components shared UI
frontend/src/lib       API and auth helpers

Development

Build both apps before opening a pull request:

cd backend && npm run build
cd ../frontend && npm run build

Do not commit .env files or service credentials.

License

This project is proprietary software unless otherwise specified. License terms are available in LICENSE.md. All rights reserved.

Made with ❤️ by Aaron Kurian Abraham.

About

Auditra is an AI expense policy auditing platform.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages