Inspiration
International freelance software development often involves trust issues between clients and developers.
- Clients worry about paying for incomplete, buggy, or abandoned projects.
- Freelancers face delayed payments, unpaid invoices, and changes in project requirements.
- Payment platforms have to deal with disputes where both parties may have different interpretations of the agreed work.
We wanted to explore how payment systems and software development workflows could work together to make freelance agreements more transparent.
This led to RasoTrustBridge, a platform that connects freelance contracts, milestone-based payments, and code verification.
What it does
RasoTrustBridge helps clients and freelancers manage software development contracts through predefined milestones and payment conditions.
Its main features include:
- Contract Negotiation: Client and freelancer agents help establish project requirements, budgets, deadlines, and milestone distributions within predefined limits.
- PayPal Integration: Uses PayPal payment APIs to handle payment authorization, capture, and payouts.
- Milestone Verification: Connects with GitHub to track pull requests, commits, and automated test results against agreed acceptance criteria.
- Currency Risk Management: Provides three configurable exchange-rate policies:
LOCKED_AT_SIGNING,SPOT_AT_RELEASE, andSPLIT_RISK. - Dispute Documentation: Collects contract details, GitHub commit information, test results, and verification records to help both parties review disagreements.
How we built it
- Backend: FastAPI with Python 3.12.
- Database: PostgreSQL 16, SQLAlchemy, and Alembic migrations.
- Payment Integration: PayPal Orders API v2, Payouts API v1, and webhook handling.
- AI Models: Ollama with Llama 3.2 for agent-based contract negotiation.
- GitHub Integration: GitHub Webhooks with HMAC-SHA256 signature verification.
- Data Validation: Pydantic v2.
- Infrastructure: Docker and Docker Compose.
- Testing: Pytest with a mock mode for testing payment workflows without live PayPal credentials.
Challenges we ran into
Payment Reliability: Preventing duplicate payment operations and handling repeated webhook events required careful use of idempotency keys and transaction tracking.
Milestone Verification: Converting project requirements into measurable acceptance criteria was challenging, especially when deciding whether submitted work met the agreed conditions.
Currency Fluctuations: International payments involve exchange-rate changes between the time a contract is agreed upon and when a milestone is completed.
Third-Party Integrations: Coordinating PayPal payment events and GitHub development events required handling asynchronous updates and maintaining consistent contract states.
Accomplishments that we're proud of
- Built a platform connecting freelance contracts, payment workflows, and GitHub activity.
- Implemented agent-based contract negotiation.
- Integrated PayPal payment APIs and webhook handling.
- Developed GitHub-based milestone tracking and verification.
- Created a mock payment environment for testing without live credentials.
- Implemented database migrations and financial transaction tracking.
What we learned
- Working with payment APIs and webhook-based integrations.
- Managing financial transactions and preventing duplicate operations.
- Connecting GitHub development workflows with contract milestones.
- Using local language models in structured application workflows.
- Designing backend systems that maintain consistent records across multiple services.
What's next for RasoTrustBridge
- Complete and test the PayPal integration for production use.
- Add isolated environments for running client-defined tests against submitted code.
- Extend milestone payments to support multiple freelancers working on the same project.
- Improve currency risk management options.
- Expand contract management and dispute documentation features.
Built With
- alembic
- artificial-intelligence
- autonomous-agents
- docker
- fastapi
- github
- github-api
- javascript
- llama3
- ollama
- paypal
- postgresql
- pydantic
- pytest
- python
- repository:
- rest-api
- sqlalchemy
- uvicorn
- webhooks