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.
- Receipt upload and preview for PDFs and images.
- OCR and structured receipt extraction.
- Policy PDF ingestion, chunking, embeddings and retrieval.
- AI audit decisions:
approved,rejectedorneeds_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.
- 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
git clone https://github.com/AaronKurian/Auditra.git
cd AuditraInstall dependencies:
cd backend && npm install
cd ../frontend && npm installCreate local env files:
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.envStart the API:
cd backend
npm run devStart the web app:
cd frontend
npm run devOpen:
http://localhost:3000
API health check:
curl http://localhost:4000/healthAuditra needs these services configured in backend/.env:
MONGODB_URICLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRETUNSTRUCTURED_API_KEYRESEND_API_KEYJWT_ACCESS_SECRETJWT_REFRESH_SECRET- One AI provider key:
OPENROUTER_API_KEYOPENAI_API_KEYFIREWORKS_API_KEYGEMINI_API_KEY
Frontend configuration:
NEXT_PUBLIC_API_URL=http://localhost:4000
NEXT_PUBLIC_SITE_URL=http://localhost:3000Select an AI provider:
AI_PROVIDER=openrouterSupported 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.
Backend:
cd backend
npm run dev
npm run build
npm run startFrontend:
cd frontend
npm run dev
npm run build
npm run startfrontend/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.
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
Build both apps before opening a pull request:
cd backend && npm run build
cd ../frontend && npm run buildDo not commit .env files or service credentials.
This project is proprietary software unless otherwise specified. License terms are available in LICENSE.md. All rights reserved.
Made with ❤️ by Aaron Kurian Abraham.
