SHARD
Shard: Fast, sharp, and cuts through data.
The problem SHARD solves
The Problem: The "Manual Data Trap"
In the modern business landscape, data is the most valuable asset, yet billions of dollars remain trapped in unreadable PDFs and physical receipts. Small to Medium Enterprises (SMEs) and accounting departments face a massive "Manual Data Trap":
The 10-Minute Bottleneck: Manually entering data from a single invoice into an accounting system takes an average of 5–10 minutes. For a company handling 500 invoices a month, that is over 80 hours of lost productivity.
The "Human Error" Tax: Typographical errors in tax amounts, vendor names, or bank details lead to payment disputes, late fees, and financial audit nightmares.
Unstructured Chaos: Traditional OCR (Optical Character Recognition) often fails when invoice layouts change. It "reads" text but doesn't "understand" context, leading to broken data pipelines.
Lack of Visibility: Until an invoice is manually typed into a database, the business has zero visibility into their real-time liabilities or spending patterns.
🛠️ What can people use it for?
Shard is designed for anyone who handles financial documentation, from freelance consultants to enterprise finance teams.
-
Automated Accounts Payable
Instead of a clerk sitting and typing data into an ERP, they simply drop a batch of PDFs into Shard. The AI extracts the vendor, line items, and totals, pushing them directly into the company's database.
IT AUTO_APPROVES INVOICES WHOSE CONFIDENCE SCORE > 90% -
Expense Management & Auditing
Freelancers and small business owners can upload photos of receipts captured on the go. Shard’s Image Quality Check ensures the photo is clear enough for tax purposes, and the AI categorizes the spend automatically. -
High-Stakes Financial Verification
For firms where 100% accuracy is non-negotiable, the Review Queue allows a human supervisor to quickly verify "Low Confidence" extractions. This ensures the speed of AI combined with the safety of human oversight.
🚀 How it makes tasks easier and safer
⚡ From Minutes to Milliseconds
Shard reduces the task of data entry by 95%. Users move from "Typing" to "Reviewing." The AI does the heavy lifting, and the user only interacts with the data to provide a final "Approve" or "Reject."
🛡️ Built-in Safety Gates (Image Quality & Confidence)
Most automation tools fail silently when given a blurry image. Shard makes the process safer by:
Pre-processing checks: Automatically rejecting blurry or low-contrast images before they reach the AI.
Confidence Scoring: Every extraction is given a percentage. If the AI is unsure (e.g., < 90% confidence), it is quarantined in the Review Queue rather than being pushed to the database as "correct."
📊 Real-time Financial Intelligence
Because Shard pushes data to a central MongoDB instance immediately, the Analytics Dashboard provides an instant snapshot of:
Total spend by vendor.
Monthly volume trends.
AI vs. Human processing efficiency.
☁️ Centralized & Permanent
By removing the reliance on LocalStorage and moving to a Database-First architecture, Shard ensures that financial records are permanent, searchable, and accessible from any device, making audits and tax season a breeze.
Challenges we ran into
- The "Single Source of Truth" Dilemma (State Syncing)
The Hurdle: Initially, I used Zustand with Persistence (LocalStorage) to keep the UI snappy. However, this created a "Ghost Data" problem. If a user approved an invoice on one device, the other device would still show it as "Pending" because the local cache was out of sync with the MongoDB database.
The Solution: I pivoted to a Database-First Architecture. I removed the persistence middleware and implemented a Hydration Pattern. Now, the app uses optimistic UI updates for instant feedback but performs a "Silent Background Sync" on every page load. This ensures the UI always reflects the actual state of the MongoDB database while maintaining a fast, native-app feel.
- The 401 Unauthorized & Token Parsing Trap
The Hurdle: I encountered a persistent 401 Unauthorized error when communicating between the React frontend and the Flask backend. The issue was twofold:
The frontend was inconsistent with user identifiers (switching between email, name, and username).
The backend json.loads() function was failing because the Authorization header wasn't receiving a properly stringified JSON object.
The Solution: I standardized the Axios Interceptor. I created a robust identity payload that bundles the user's UID and Email into a single stringified JSON token. On the backend, I wrote a recursive JSON parser that handles double-encoded strings, ensuring the user's identity is verified before any database operation occurs.
- "Garbage In, Garbage Out" (AI Extraction Quality)
The Hurdle: Large Language Models (LLMs) are powerful but sensitive. If a user uploaded a blurry or low-contrast photo, the AI would hallucinate values or fail to extract line items, leading to corrupted data in the database.
The Solution: I built an Image Quality Pre-processor using OpenCV-inspired logic. Before the image ever hits the Groq/Grok API, the backend analyzes the Laplacian variance for blurriness and the histogram distribution for contrast. If the image fails these benchmarks, the system rejects it immediately with a specific error message, saving API costs and maintaining database integrity.
- Deployment & CORS on Render
The Hurdle: Everything worked perfectly on localhost, but once deployed to Render, the frontend couldn't talk to the backend. The "Pre-flight" OPTIONS requests were being blocked because of strict Cross-Origin Resource Sharing (CORS) policies regarding custom headers like Authorization.
The Solution: I reconfigured the Flask-CORS middleware to explicitly whitelist the production domain and allowed the Authorization and Content-Type headers. I also implemented a Health Check endpoint (/api/health) that the frontend pings on startup to "wake up" the Render free-tier instances, ensuring a smooth user experience from the first click.
Tracks Applied (2)
Best Innovation
AWS
AWS
Technologies used
