Inspiration
Freelance software contracts suffer from a trust gap: clients risk paying for unfinished code, while developers risk scope creep and unpaid invoices. Traditional escrow relies on slow human arbitration, so we built MilestoneEscrow to replace manual disputes with objective AI code verification and instant fiat settlement.
What it does
Lock Funds: Sponsors create milestone contracts and fund them upfront via PayPal.
Verify Identity: Workers get a permanent, immutable cryptographic ME-ID bound strictly to their email and PayPal payout address.
AI Audit & Payout: Workers submit their GitHub PR/deliverable, and our Gemini AI Auditor verifies the code against contract acceptance criteria—automatically releasing escrowed funds to the worker's PayPal account upon approval.
How we built it
Frontend: Next.js, React, TypeScript, Tailwind CSS (Vercel)
Backend: Python FastAPI, SQLAlchemy ORM (Render)
Database & Auth: PostgreSQL relational ledger + Firebase Authentication
Payments & AI: PayPal Orders v2 & Payouts APIs + Google Gemini API for code forensics and criteria verification
Challenges we ran into
Identity Immutability & Cross-Validation: Preventing Firebase re-logins from overwriting generated ME-IDs and enforcing strict case-insensitive email-to-ME-ID matching before contract creation.
PayPal Sandbox & CORS Sync: Debugging 404 and Client Authentication errors across Next.js static builds and FastAPI endpoints until the frontend/backend order handshake worked seamlessly.
Accomplishments that we're proud of
Built an end-to-end AI-to-Fiat pipeline where Gemini code verification directly triggers automated PayPal payouts.
Engineered ME-ID locking to prevent unassigned or spoofed worker payouts.
What we learned
Designing defensive SQLAlchemy queries to guarantee immutable user identifiers and clean HTTP error boundaries between FastAPI and Next.js.
What's next for MileStone Escrow
GitHub Actions CI/CD Hooks: Automatically ingesting live unit test coverage and build logs into the Gemini audit.
On-Chain Crypto Option: Adding USDC/ETH settlement alongside PayPal using each user's derived wallet address.
Built With
- fastapi
- firebase
- firebase-authentication
- gemini
- github-api
- google-gemini
- next.js
- paypal
- postgresql
- python
- react
- render
- sqlalchemy
- tailwindcss
- typescript
- vercel