★ saikarun-ai/Compliance-assessor-PayPal
1 / 12
PayPal AI Hackathon 2026

Compliance Assessor

The right tax code for every international payment — classified automatically, invoiced through PayPal, on a laptop that costs less than a phone.

Runs offline ~1.15 GB RAM No cloud fees Windows + Linux Zero credentials in repo
★ View on GitHub

The Problem

When an Indian freelancer gets paid from abroad, the bank wants to know: what was this money for?

The answer has to be a specific RBI code. Pick the wrong one and the payment gets held, delayed, or questioned. Miss the EDF filing deadline and it gets worse.

😰 Freelancers & Startups

  • • Don't know which code applies
  • • Fear missing the EDF deadline
  • • No clear record for the bank

😰 Influencers

  • • Sponsorship income is confusing
  • • Don't know what to charge
  • • No idea what's trending

What It Does

You describe the work in plain English. It does the rest.

1
You type: "React dashboard for a US client, $2000"
2
It finds the right code: P0802 — Software Consultancy
3
It tells you the deadline: 30 days from end of invoice month
4
It creates a PayPal invoice with the code stamped into the invoice number (P0802-2026-001), ready to send.

Live Output — SaaS Subscription

Input: "Monthly SaaS subscription revenue from an EU customer, 40 subscribers"

localhost:3000
Purpose Code
P0807
Off-Site Software Exports · EDF due 2026-11-30
Sale/licensing of software, SaaS subscription or digital product to an overseas buyer.
EDF requiredYes
Deadline type30-days-after-month-end
EDF deadline2026-11-30
RuleSoftware export: eForm B2 / RBD within 30 days from end of month of receipt (FR-8).
Confidence0.95
Decided byrules + llama.cpp (rules+llm)
RationaleOff-Site Software Exports · matched: saas, subscription, licence | model: Off-site software exports
PayPal Sandbox credentials not configured. Use POST /api/invoice/preview to inspect the payload.
✓
Deterministic and traceable. Every field — code, deadline, rule, confidence, decision path — is surfaced to the user. No guessing.

Live Output — Ambiguous Case

Input: "Online Revenue through content writing" — genuinely ambiguous. The tool says so.

localhost:3000
Purpose Code
P1007
Advertising, Marketing & Market Research · EDF due 2026-10-07
Promotion, advertising, sponsorship and influencer brand collaborations.
EDF requiredYes
Deadline typeon-or-before-payment-receipt
EDF deadline2026-10-07
RuleNon-software service: eForm B2 within 15 days of receipt (FR-9).
Confidence0.30 — flagged as ambiguous
Decided byrules + llama.cpp (llm)
RationaleAdvertising, Marketing & Market Research | model: Content promotion, advertising income
⚠
Honest about uncertainty. A 0.30 confidence is surfaced, not hidden. The tool recommends confirming with the bank — instead of guessing confidently.

Live Output — Non-Export Income

Input: "YouTube AdSense payout for my channel" — platform income, not an export of services.

localhost:3000
Purpose Code
NON_EXPORT
Non-Export of Services (platform income) · no EDF — non-export
Income earned on an Indian platform for foreign audience consumption; no export of services, hence no EDF.
EDF requiredNo
Deadline typen/a
EDF deadlinen/a
RuleNo eForm B2 / RBD filing required for this category.
Confidence0.95
Decided byrules + llama.cpp (rules)
RationaleNon-Export of Services | matched: adsense, ad revenue, youtube revenue, youtube payout | model: Advertising, marketing & content promotion
Platform income — no cross-border invoice required.
ⓘ
The rule engine wins here. The LLM proposed "Advertising, marketing & content promotion" — the rule engine overrode it with the correct non-export status. That is the design working as intended.

Live Output — Influencer Trend Report

Niche: "AI based Web Development" — 12 YouTube videos + 8 RSS articles, analyzed locally.

localhost:3000 · influencer trend report
AI based Web Development

AI-driven web development is experiencing a surge in popularity, with recent videos highlighting the rapid adoption of AI tools for code generation, automation, and application development — particularly focusing on React and JavaScript enhancements — creating a significant demand for accessible learning resources and practical application tutorials.

PlatformsYouTube, News / RSS
Sentimentpositive score 1
Content angleA practical, hands-on tutorial series demonstrating how to build a simple web application using AI-powered tools like ChatGPT and other AI assistants, emphasizing code snippets and real-world examples.
Engagementtop quartile = 71.7% of views (7× median of 79,043)
Sponsor CTADownload our free AI Web Development Starter Kit: [link]
Brand deal band: 1225–2363 USD
Median 79,043 views at ~$22 blended RPM, rounded to a sponsorship band.
Sources: 12 YouTube, 8 RSS, 0 Exa, 0 transcripts · 31671 ms · llm used
Skipped: exa — mcporter installed, exa server not registered (optional)
TitleChannelViews
Web Development Roadmap 2026 (No BS Guide!)CodeWithHarry7,45,386
How to Build & Sell Web Apps With AI Without Coding (FULL COURSE)Liam Ottley7,12,672
Web Development Has Changed in 2027 🔥 Full Stack + AI RoadmapTechnical Suneja1,94,657
AI Course for Developers – Build AI-Powered Apps with ReactProgramming with Mosh1,78,895
How to Build a Website Using AIError Makes Clever1,58,052
✓
Real data, real price band. An influencer considering a $1,000 offer now sees a data-backed band of $1,225–$2,363 — from 20 live sources, computed locally in 31 seconds.

How It Decides

Two brains vote on every payment. If one is unavailable, the other keeps working.

🧮 The Rulebook

Fast, deterministic, always on.

Matches keywords like "saas", "adsense", "consulting" to a known RBI code. Authoritative.

🤖 The Local AI

gemma-3-1b, ~900 MB, works offline.

Reads the full sentence and proposes a code — but only if it agrees with a valid code the rulebook already admits.

🛡
Deadlines are never decided by the AI. They are computed in code. The six acceptance cases pass with llama.cpp switched off.

Why It Runs On Your Laptop

❌ Cloud AI Tools

  • • Send your invoices to someone else's server
  • • Monthly subscription fees
  • • Stop working when the internet does
  • • Need an expensive laptop or GPU

✅ Compliance Assessor

  • • Your data never leaves the machine
  • • Zero recurring cost
  • • Works fully offline
  • • Runs on 4 GB RAM, no GPU
🔐
No credentials in the public repository. .env is gitignored; tokens are held in memory only and never logged. Anyone adding their own Sandbox credentials to .env unlocks the live invoice flow — without any code change.

What We've Measured

~1.15 GB
Memory used
2.5 s
Slowest response
6 / 6
Codes correct
0
Cost per month

✓ 55 automated checks

6 classification + 19 invoice (mock PayPal) + 30 E2E — all passing.

✓ 0 vulnerabilities

npm audit across 68 packages. One runtime dependency: express.

✓ 26 + 5 requirements

Specified to IEEE 29148 with full forward + backward traceability.

Data-Misuse Safeguards

Every safeguard is a traced requirement with an executed test.

🔒 No credentials committed

.env gitignored, empty .env.example, boot-log redaction. NFR-4.

🧠 LLM cannot act alone

Rule engine authoritative. Hallucinated codes are discarded. FR-2, FR-3.

🛡 Escaped output

Every remote/LLM field passes esc(); links pass safeUrl(). NFR-5.

💾 Atomic writes

Write-then-rename. A crash cannot corrupt the records file. NFR-5.

🚦 Rate limited

12 req/min on the expensive trend endpoint. NFR-3.

🔌 Loopback only

Server binds 127.0.0.1. No CORS. 256 kB body cap. NFR-3.

What This Means

Every Indian freelancer billing overseas can stop guessing at tax codes and stop paying cloud fees for tools that should run on their own laptop.

Real PayPal Integration Real AI — Fully Local Real Problem Zero Secrets Committed

MIT Licensed · Windows + Linux installers in /scripts · Docs in /docs

Specified to IEEE 29148 · 26 functional + 5 non-functional requirements · 55 automated checks