Inspiration

A client asks for “one more thing.” The awkward part is deciding what was already agreed, what needs a separate quote, and what still needs a question. ScopeLock gives independent designers and developers a small change desk before a request becomes an invoice. It does not assume that a request is consent to charge.

What it does

Paste an agreed brief and a new request. An actual local AI model suggests included work, additional scope, or a point to clarify, with short source quotes. Exact quotes are checked against the supplied documents; the classification still needs human review. Only additional-scope rows can be selected. The operator enters hours, rate and a sandbox customer, then records the exact quote.

The server creates a real PayPal sandbox Invoicing v2 draft and reads it back, matching the amount, currency, recipient and each line against the review. A separate action makes a payable PayPal link without email notifications. Customers check out through PayPal; the app refreshes the actual invoice status. The AG Grid invoice ledger distinguishes reviewed quotes, unpaid invoices, paid sandbox invoices and requests requiring investigation.

How we built it

React and AG Grid Community provide the editable review table and invoice workspace. A Node.js 24 server stores analyses and immutable review snapshots in SQLite. Money uses bounded decimal inputs and integer-cent totals. Runtime AI uses Ollama 0.40.13 with the installed gemma4:e2b model and schema-constrained JSON. AI suggests scope classifications; it never chooses hours, prices, recipients, permissions or payment state.

PayPal OAuth and Invoicing v2 are central: create, show details, send without notifications, search for recovery, and status readback. The API base is intentionally fixed to api-m.sandbox.paypal.com. This prototype cannot switch to live money. Secrets and SQLite records are excluded from the public source.

Challenges we ran into

External creation can finish while a local response is lost. We encountered an interrupted creation during development. The persisted review became REVIEW_REQUIRED, and an invoice-number search found no match. It remains blocked rather than automatically issuing another invoice. Reconciliation accepts exactly one exact invoice-number match only after verifying its full contents; zero or multiple matches require investigation. Repeating creation for an already attached invoice returns the same invoice.

Accomplishments

Actual local-model comparisons ran through the API and the production browser UI. A USD 160.00 sandbox invoice was created, made payable, and paid through PayPal using an official generated sandbox test card. PayPal displayed “Payment successful!”; a fresh API readback returned PAID with paid_amount USD 160.00 and a transaction record. This is test money, not revenue or a contest prize. Five focused tests cover quote grounding, excluded/duplicate work, decimal money, approval-versus-invoice mismatches and unambiguous recovery candidates.

Public source: https://github.com/tokuitao/scope-lock-paypal-ai-2026 Read-only paid sandbox example: https://www.sandbox.paypal.com/invoice/p/#XCTTBB4XTE28P2WE

What we learned

A plausible AI interpretation is a proposal. Source evidence, operator decisions, a matching external invoice, and confirmed payment are different facts. Preserving those differences made the workflow easier to explain and safer to recover after interruption.

What's next for ScopeLock

First-time freelancer feedback, clearer handling of disputed or revised scope, more currencies, additional model counterexamples, and deployment with appropriate access controls and quotas. The current prototype supports USD, local desktop setup and fictional sandbox accounts only. Classification accuracy and user demand have not been established by the engineering checks.

Try it locally

A hosted backend is not required by the Official Rules; the public repository contains the working build and complete local run instructions. Requires Node.js 24+, Ollama and a structured-output model (verified with gemma4:e2b), plus your free PayPal sandbox application with Invoicing enabled. Model download size and inference time depend on the chosen model and hardware. Follow README.md to install, configure the git-ignored .env and run the server. Open http://127.0.0.1:5159 after npm run build. The initial brief and request are fictional. Use a PayPal sandbox personal account email for the customer. No live payment, account upgrade or paid AI service is needed.

Built With

Share this project:

Updates

Submission history