Inspiration

“One small change” can become hours of unplanned work. Freelancers and small studios need a shared understanding of what was agreed, what is being delivered, and which requests require a new price. Clients need the same clarity before receiving an unexpected invoice.

ScopePay connects those decisions in one workspace: from a clear brief to an approved change and a PayPal invoice.

What it does

Companies create projects, define deliverables and acceptance criteria, set exclusions and revision allowances, and plan a private delivery budget. Clients review and approve the exact scope version before work begins.

After approval, the original scope becomes a locked baseline. Companies track delivery progress and actual costs, while clients see agreed prices and progress without seeing internal company costs.

When a new request arrives, Scope review runs Qwen3:4b locally through Ollama to compare it with the baseline and accepted changes. The same model reviews saved draft scope for missing or ambiguous acceptance criteria before approval. Findings distinguish proposed extras, likely included work, and requests needing clarification, with supporting agreement excerpts. The company reviews each finding and sets prices. Included and unclear items are not charged.

Clients approve a versioned change proposal. Only accepted extras add deliverables and increase the agreed price. Both sides retain a shared record of the original agreement and subsequent approvals.

Accepted paid changes can become PayPal sandbox invoices. ScopePay opens hosted checkout and verifies payment status through a server-side PayPal read. Approval and payment are separate events.

How we built it

The application uses React and Vite, a Node.js server, and SQLite persistence. Company and client roles are enforced server-side. Passwords use salted scrypt hashes; session tokens are hashed in storage and carried in HttpOnly cookies. Approval records bind to a version and content fingerprint.

PayPal's Invoicing REST API is central to the payment flow: OAuth, invoice creation, send, hosted payment links, and verified status refresh. Creation intent is persisted before dispatch. Uncertain responses are reconciled by the stored invoice number instead of blindly creating another invoice. Provider responses are checked against the accepted change, amount, currency, seller and buyer.

AI runs inside the finished application: the Review saved scope and Compare with approved scope actions call the authenticated Node server, which invokes a downloaded Qwen3:4b model through Ollama on loopback. Structured model output supplies findings, reasoning, classifications and clarification questions. Exact evidence is validated against supplied agreement clauses; model name, timestamp and source fingerprint are preserved. Conservative checks downgrade detected conflicts and revision uncertainty to clarification. Humans review every finding, enter prices and obtain client approval. No paid AI API is used, and no cloud fallback exists. Codex assisted development and testing, separately from the runtime model.

Challenges and lessons

Scope approval, additional-work approval, and payment must remain separate. We built version-bound approvals so an edited proposal cannot silently reuse earlier consent. We also separated client prices from company costs and preserved the original baseline when changes are approved.

Payment retries were another challenge: a lost response is not evidence that an invoice was never created. Durable operation records and reconciliation prevent blind duplicate creation.

What we verified

All 41 automated tests pass, covering scope rules, approval versions, access control, private-cost isolation, budget gates and payment recovery. The production build passes. Eight real local-model evaluation cases pass, including scope readiness, included work, explicit extras, ambiguity, unknown revision usage, instruction attacks, accepted additions and conflicting clauses. These synthetic cases are limited validation, not a claim of general model accuracy. Company/client flows have been exercised in the browser. A genuine $1 PayPal sandbox checkout was completed, and the server independently confirmed PAID, including a fresh status check for this submission.

The video is a live browser recording of the running local application with synthetic projects, edited for pace with processing waits explicitly shortened. The $1 payment example is a separate completed sandbox integration test. No real money or customer data is used.

Try it and what's next

The public MIT-licensed repository includes complete local setup and PayPal sandbox configuration instructions. Judges can install Ollama, start it with OLLAMA_NO_CLOUD=1, download qwen3:4b once, then run the app with Node.js 22.13+ using npm ci and npm run dev. The README contains full commands and npm run evaluate:ai reproduces the model checks. A model download and suitable local hardware are required, but no AI subscription or API key is needed. Without sandbox configuration, invoice controls are explicitly simulated.

This is a local hackathon prototype. Next steps include verified email ownership, account recovery, production hosting, multi-merchant onboarding and automatic payment updates. Initial project fees are not yet invoiced; the implemented PayPal flow bills accepted scope changes.

Built With

Share this project:

Updates

Submission history