Inspiration

Freelance marketplaces often break down at two critical points: trust before payout and fair opportunity discovery. Clients worry about paying for milestone deliverables that don't actually match acceptance criteria, while freelancers struggle to find projects tailored to their skills, prove their track record, and grow without pay-to-win ranking algorithms.

We built PayPilot AI to close that gap—pairing AI-assisted deliverable verification and career guidance with secure PayPal milestone checkout and transparent social impact.

What it does

PayPilot AI is a full-stack freelance milestone collaboration platform with separate Client and Freelancer workspaces:

  • Role-Based Project & Milestone Workflows: Clients publish briefs with structured acceptance criteria, invite freelancers or review incoming requests, and manage multi-milestone contracts. Freelancers discover open projects, accept invitations, submit milestone deliverables, and track their verified work history.
  • ProofFlow Deliverable Evaluation (/api/evaluate): When a freelancer submits milestone work, our ML evaluator analyzes the deliverable against the project request and milestone acceptance criteria, returning a 0–100 relevancy breakdown (relevance, completeness, and technical quality).
  • Tamper-Resistant 50/50 Review Scoring: During milestone review, the backend enforces a transparent 50% ProofFlow ML score + 50% Client review score weighting (final_score), ignoring any client-forged scores.
  • PayPal Sandbox Milestone Checkout (/api/payments/*): Once a milestone is accepted, clients pay securely via embedded PayPal buttons. Orders are created and captured server-side using the authoritative milestone amount stored in the database, updating the milestone to Paid via Sandbox and logging it in the client's transaction ledger.
  • ProofFlow Career & Learning Recommender (/api/recommend): Matches freelancers with relevant opportunities, surfaces high-demand skill gaps, and generates a paced learning roadmap of recommended courses.
  • PayPilot Impact: Automatically allocates 30% of platform fees from captured milestone payments and 20% of Spotlight purchases into verified social impact initiatives (with contribution tracking, reputation badges, and auditable disbursements).
  • PayPilot Spotlight: Offers temporary paid visual prominence (Quick, Featured, Priority) for projects and proposals while keeping visibility strictly isolated from ML matching scores and client ratings.

How we built it

  • Frontend: Built with React 18, TypeScript, Vite, Tailwind CSS, React Router, and @paypal/react-paypal-js (PayPalScriptProvider + PayPalButtons), using centralized environment-based API routing (src/services/apiConfig.ts) and credentials: 'include' for session requests.
  • Backend & Database: Built with Python 3.12, FastAPI, Uvicorn, SQLAlchemy, SQLite, and Pydantic v2, secured with HS256 PyJWT tokens stored in HttpOnly session cookies (paypilot_session) and Passlib/bcrypt password hashing.
  • PayPal Integration: Connected directly to the PayPal Developer Sandbox (https://api-m.sandbox.paypal.com) via httpx, using OAuth 2.0 (/v1/oauth2/token) with cached tokens and the PayPal Orders v2 REST API (/v2/checkout/orders and /capture).
  • AI / Machine Learning: Powered by two custom scikit-learn models:
    • ProofFlow-Relevance-Ridge (TF-IDF vectorizer + Ridge regression + requirement-assessment rules) for deliverable evaluation.
    • ProofFlowRecommender (TF-IDF cosine similarity + canonical skill taxonomy) for project/course recommendations and skill-gap analysis.
  • Cloud Deployment (Render): Deployed on Render with the FastAPI backend running as a Render Web Service and the React frontend served as a Render Static Site, configured with explicit CORS (FRONTEND_URL) and cross-origin SameSite=None; Secure cookies.

Challenges we ran into

  • Cross-Origin Authentication on Render: Because Render Static Sites and Render Web Services live on separate *.onrender.com subdomains (cross-site under the Public Suffix List), standard SameSite=Lax cookies are blocked on cross-origin fetch() calls. We solved this by dynamically switching paypilot_session cookies to SameSite=None; Secure in HTTPS production while keeping SameSite=Lax for local HTTP development, and updating logout to clear cookies with matching attributes.
  • PayPal Sandbox Currency & Security Guarantees: Testing USD milestone checkouts surfaced regional Sandbox account currency restrictions (solved by using US Sandbox Business/Personal accounts), and we ensured all order amounts are read directly from SQLite on the server and cross-checked on capture rather than trusting browser payloads.
  • Trustworthy AI Scoring: To prevent client-side score tampering, we moved deliverable evaluation persistence and 50/50 final score calculation strictly to the backend, with safe fallbacks if an evaluation fails.

Accomplishments that we're proud of

  • End-to-end PayPal Sandbox Orders v2 milestone checkout connected directly to an auditable PayPilot Impact fund ledger.
  • Two integrated, domain-specific ProofFlow ML models serving real-time deliverable relevancy scores and personalized learning roadmaps.
  • Ethical monetization via PayPilot Spotlight, engineered so paid boosts never alter ML relevance rankings or client star ratings.
  • Clean 29-test backend regression suite covering scoring integrity, PayPal Sandbox amount guards, Impact solvency checks, Spotlight expiration, CORS, and cross-origin cookie behavior.

What we learned

  • Designing server-authoritative financial & AI pipelines: never trust browser-supplied prices, scores, or evaluation results—compute and verify them server-side from database records.
  • How browser Public Suffix List rules affect HttpOnly session cookies across separate cloud subdomains (*.onrender.com), and how to configure CORSMiddleware + SameSite=None; Secure cleanly across local and production environments.
  • How to keep AI scoring, payments, and visibility features modular so each system reinforces marketplace trust without compromising fairness.

What's next for RES

  • Supporting PayPal Payouts / Marketplace Split Payments to disburse funds directly to freelancers and verified social impact nonprofits automatically.
  • Adding multimodal deliverable analysis (evaluating code repositories, live URLs, and UI screenshots via vision-language adapters) to expand ProofFlow beyond text deliverables.
  • Migrating SQLite to managed PostgreSQL with persistent object storage for uploaded deliverables and verifiable impact receipts.
  • Fixing security features to make it more secured.

Built With

Share this project:

Updates

Submission history