Inspiration

Freelancers often hear a client say, "It's just one more small change." However, what seems like a minor request can introduce hours of additional work. Freelancers may find it difficult to explain why the request falls outside the original agreement, estimate its cost, and negotiate additional payment without making the client relationship uncomfortable.

I wanted to build a platform that makes these conversations more transparent and structured. This inspired ScopePay AI — a tool that helps freelancers identify scope changes, evaluate additional work, negotiate fairly with clients, and collect approved payments through PayPal Sandbox.

What it does

ScopePay AI compares a client's new request with the original project agreement using Google Gemini.

It can:

  • Identify whether a request is within or outside the agreed project scope.
  • Explain its reasoning using relevant excerpts from the original agreement.
  • Estimate additional work hours and provide an effort breakdown.
  • Suggest three negotiation alternatives: full implementation, a lean alternative, and a scope exchange.
  • Generate a professional response that freelancers can use when communicating with clients.

The freelancer reviews the AI-generated recommendations, finalizes the proposed options and prices, and publishes them through a private client invitation link. Clients can accept an option or submit a counteroffer, which the freelancer can review and resolve.

Once both parties agree on a paid change order, the client can proceed to PayPal Sandbox checkout. The backend creates and captures the PayPal order and verifies the completed payment and expected amount before marking the change order as paid.

The application also includes a freelancer dashboard, project management, activity history, a client negotiation portal, and an integrations panel.

How I built it

I built ScopePay AI using a combination of AI, backend development, database management, and payment integration technologies.

  • Google Gemini API: Analyzes project agreements and new client requests, identifies scope changes, estimates additional effort, provides supporting evidence, and generates negotiation suggestions.
  • Node.js: Handles application logic, API endpoints, anonymous visitor sessions, negotiation workflows, and payment processing.
  • Supabase PostgreSQL: Stores projects, analyses, negotiations, change orders, activity records, and visitor-specific data.
  • PayPal Developer Platform: Uses PayPal Sandbox Orders v2 and the PayPal JavaScript SDK for checkout, order creation, capture, and payment verification.
  • HTML, CSS, and JavaScript: Used to build the responsive freelancer dashboard, negotiation studio, client portal, and checkout interface.

I also implemented visitor-specific workspaces so multiple visitors can use the public application without accessing one another's project data. Integration credentials are encrypted on the server using AES-256-GCM.

Challenges I faced

One of my biggest challenges was deciding how AI should interact with financial operations. AI can help interpret client requests and recommend additional work, but it should not independently decide what a client must pay.

To address this, Gemini recommends additional work hours, while the backend calculates estimated prices using the project's agreed hourly rate. The freelancer reviews and finalizes the proposed prices, and the client must explicitly approve an option before a paid change order is created.

Another challenge was making the PayPal integration meaningful rather than simply displaying a payment button. I connected the negotiation workflow to PayPal Sandbox so an approved change order can proceed through an actual checkout flow. Payment status is determined through server-side capture verification rather than trusting a client-side success message.

I also worked on isolating visitor workspaces, securely storing integration credentials, handling counteroffers, and ensuring that client invitation and payment links only provide access to their intended actions.

What I learned

Through this project, I learned how to integrate a generative AI API into a practical application, design structured AI outputs, validate AI-generated evidence, and separate AI recommendations from trusted backend calculations.

I gained hands-on experience with PayPal's developer APIs, OAuth authentication, order creation and capture, PostgreSQL persistence, secure session handling, and multi-visitor application design.

Most importantly, I learned that a useful AI-powered product is not just about generating intelligent responses. It is about combining AI with clear workflows, human approval, security, and real integrations to solve an actual problem.

What's next

I plan to extend ScopePay AI with registered user accounts, multi-factor authentication, improved estimation based on historical project data, webhook-based payment reconciliation, invoice exports, and support for additional currencies.

My long-term vision is to make project scope management and change negotiation simpler, more transparent, and fairer for independent freelancers and their clients.

Built With

Share this project:

Updates

Submission history