Inspiration
Financial fraud and corporate non-compliance are increasingly sophisticated, costing enterprises billions of dollars annually. Traditional auditing methods rely heavily on manual spot-checks and rule-based software that easily miss complex, multi-layered anomalies.
We realized that detecting fraud is fundamentally a mathematical problem of identifying statistical outliers in a high-dimensional space of financial transactions. For example, if a transaction amount x deviates significantly from the historical mean μ, the standard score (z-score) z= σ x−μ spikes. However, calculating these deviations across thousands of vendors in real-time is impossible for human auditors. We were inspired to build an ecosystem that automates this heavy mathematical lifting while leveraging blazing-fast AI to explain the anomalies in plain English. Thus, Ledger AI was born.
What it does
Ledger AI is an end-to-end, privacy-first corporate financial auditing platform. It bridges the gap between raw financial ledgers and actionable corporate intelligence by providing:
Automated Anomaly Detection: A backend pipeline that ingests corporate ledgers, calculates statistical outliers, and generates visualization clusters. Explainable AI (XAI) Auditing: Instead of just flagging a transaction, Ledger AI pipes the anomalous data into the Groq API (Llama 3.1). The AI acts as a forensic auditor, instantly generating a human-readable explanation for why the transaction was flagged. Dual-Platform Access: A stunning, glassmorphism Web Dashboard for desk-bound System Administrators and Analysts to monitor the global network. A Mobile Field Command App for on-the-go compliance officers to track fraud intelligence from anywhere in the world.
How we built it
We architected Ledger AI to be fast, modular, and secure:
The AI & Data Pipeline: Built with Python, Pandas, and NumPy. We used Seaborn and Matplotlib to dynamically generate R 2 scatter plots of fraud clusters. For the AI, we integrated the Groq API running Meta's Llama 3.1 (8B) model for ultra-low latency inference. The Web Dashboard: We opted for a dependency-free stack using HTML5, CSS3, and Vanilla JavaScript. This allowed us to build custom, high-performance canvas animations and a beautiful glass UI without the overhead of heavy frameworks. The Mobile App: Built using React Native and Expo, utilizing Expo Router for seamless navigation. Security & Infrastructure: We implemented strict Role-Based Access Control (RBAC) across both platforms using Firebase Authentication. User profiles and login tracking are synchronized in real-time via Cloud Firestore. The web platform is hosted globally on Firebase Hosting with automated CI/CD pipelines via GitHub Actions.
Challenges we ran into
Building a unified, cross-platform system introduced several complex hurdles:
UI Blocking and Database Latency: Initially, our strict Firebase Authentication flow caused the login screen to freeze. The app was waiting to synchronously write O(1) timestamp updates to Firestore before transitioning the UI. We overcame this by restructuring our database calls using a "fire-and-forget" asynchronous pattern, allowing the UI to transition instantly while the database syncs silently in the background. API Secret Management: To get the Explainable AI working quickly, we initially hardcoded the Groq API key into our Python script. GitHub's Secret Scanning algorithms intercepted and blocked our push. We had to completely wipe our local Git history to purge the compromised commit, refactor the code to use secure environment variables, and re-initialize the repository. Cross-Platform Synchronization: Synchronizing the state and UI between a Vanilla JavaScript web dashboard and a React Native mobile app required a massive refactor to integrate the official Firebase Auth SDKs on both fronts simultaneously, ensuring unified, secure access.
Accomplishments that we're proud of
Lightning-Fast AI Insights: Successfully integrating Groq to generate real-time, professional auditing notes in milliseconds. Transforming raw JSON transaction data into actionable forensic insights is incredibly satisfying. Unified Security: Building a seamless authentication layer that securely connects completely different tech stacks (Vanilla JS and React Native) under one roof. The Aesthetic: Crafting a premium, futuristic "cyber-auditor" aesthetic from scratch without relying on pre-built UI component libraries.
What we learned
The Power of Asynchronous State Management: We learned firsthand how synchronous network calls can destroy User Experience (UX), and how to leverage background promises to keep applications feeling instantaneous. Prompt Engineering for Strict Personas: We learned how to carefully constrain a Large Language Model with system prompts to ensure it outputs concise, professional auditing explanations rather than conversational filler. DevOps & Hosting: We gained deep experience in configuring firebase.json routing, managing Git histories, and writing GitHub Action .yml workflows for automated deployments.
What's next for ledger-ai
This is just the beginning. In the future, we plan to:
Live Bank Integrations: Connect directly to enterprise banking APIs (like Plaid or Stripe) to ingest transaction streams in true real-time. Graph Neural Networks (GNNs): Upgrade our statistical anomaly detection to use Graph Neural Networks, calculating the probability of fraud P(fraud∣transaction) based on complex vendor relationship webs. Biometric Security: Integrate FaceID and fingerprint biometric authentication into the Mobile Field Command app for an added layer of Zero-Trust security.
Built With
- cdn
- ci/cd
- css3
- expo.io
- firebase
- gorqapi
- html5
- javascript
- matplotlib
- nosql
- numpy
- pandas
- python
- react-native
- seaborn
- vanilla
Log in or sign up for Devpost to join the conversation.