PACTFLOW : Where Work Meets Trust

Inspiration

The inspiration behind PACTFLOW came from a problem that we believe almost everyone involved in freelance work has experienced: the lack of trust between clients and freelancers.

A client worries about paying for work that might be incomplete, broken, or not delivered as promised. At the same time, a freelancer worries about putting in hours of hard work, delivering their work, and still not receiving payment.

We explored how traditional escrow platforms address this issue, but they can involve high fees, complicated dispute resolution, and the challenges of holding other people's money.

We wanted to approach this problem differently. Instead of creating another platform that holds money, we decided to build a system that makes the entire working relationship more transparent and accountable.

That idea became PACTFLOW , a platform where agreements are clear, deliverables are evaluated against predefined requirements, and every important action leaves a verifiable record.

What it does

PACTFLOW is an AI-powered freelance milestone coordination and deliverable verification platform that helps clients and freelancers work together with greater transparency and confidence.

It manages the complete project journey, from creating an agreement to coordinating milestone payments.

The platform uses three specialized AI modules powered by Google Gemini 2.0 Flash:

Gemini Pact Architect : Converts simple project descriptions into structured agreements with clearly defined milestones, budgets, and measurable acceptance criteria. Gemini Evidence Inspector : Examines submitted deliverables, such as code repositories, demo links, and test logs, against the agreed requirements. It classifies evidence as satisfied, uncertain, or missing and provides a confidence score. Gemini Payment Coordinator : Monitors project progress, settled payments, upcoming milestones, budget consumption, and potential financial risks.

Once the freelancer submits the work, the AI prepares an evidence report, but the final approval always remains with the client.

PACTFLOW also uses a SHA-256 cryptographic Trust Ledger to maintain a tamper-evident history of agreements, deliverables, and payment events.

For payment coordination, we integrated PayPal's official REST Invoicing API v2 through its Developer Sandbox. Payments happen directly between the client and freelancer. PACTFLOW never holds or pools user funds.

Our goal is to make freelance collaboration more transparent, secure, and accountable.

How we built it

We built PACTFLOW using a modern full-stack architecture, keeping the frontend, backend, database, AI services, payment integration, and security components separate.

For the frontend, we used Next.js 14, React 18, and Tailwind CSS to create a responsive interface with a clean, light-beige glassmorphism design. We also used Recharts for displaying project and financial analytics.

The backend was developed using FastAPI and Python, with Pydantic for structured data validation and asynchronous API handling.

We used PostgreSQL with Supabase Row Level Security (RLS) to manage users, projects, agreements, milestones, deliverables, invoices, and Trust Ledger events while maintaining data isolation between clients and freelancers.

For the AI functionality, we integrated Google Gemini 2.0 Flash and developed three specialized modules for agreement generation, evidence inspection, and financial analysis. We used structured JSON outputs and validation schemas to maintain consistent responses.

One of our most important technical implementations was the SHA-256 Trust Ledger. Each project maintains its own hash chain, where every new event is linked to the previous event. We also implemented canonical JSON serialization to ensure consistent hash generation and make unauthorized changes detectable.

For payment coordination, we integrated PayPal Developer Sandbox using OAuth 2.0, REST Invoicing API v2, and webhook verification.

We also implemented security mechanisms such as JWT authentication, role-based authorization, SSRF protection, IDOR prevention, and webhook replay protection.

Challenges we ran into

Building PACTFLOW was not just about connecting APIs; the real challenge was making multiple complex components work together as one reliable system.

One of our biggest challenges was making AI-generated agreements practical and precise. We needed to ensure that vague project descriptions could be converted into measurable milestones and clear acceptance criteria, while making sure the milestone budget allocations added up to exactly 100% of the project budget.

Another challenge was deliverable verification. We didn't want the system to blindly accept screenshots or simple claims as proof that something worked. We designed the Evidence Inspector to distinguish between satisfied, uncertain, and missing evidence, especially when checking dynamic functionality.

Integrating PayPal was another major challenge. We had to understand OAuth authentication, invoice creation, invoice dispatch, and webhook verification while ensuring that payment notifications could not be processed repeatedly.

Implementing the SHA-256 Trust Ledger also required careful attention. Even small differences in data formatting can produce different hashes, so we had to use consistent JSON serialization and maintain the correct relationship between consecutive blocks.

Security was equally important. We had to think beyond normal user authentication and protect the platform against unauthorized project access, malicious URLs, manipulated tokens, and duplicate webhook events.

Bringing all these components together while maintaining a clear separation of responsibilities was one of the most valuable challenges we worked through.

Accomplishments that we're proud of

What makes us proud of PACTFLOW is that we didn't stop at the idea or a simple frontend prototype. We developed an end-to-end platform combining AI, cryptographic verification, secure project management, and payment integration.

Some of our major accomplishments include:

  1. Developing three specialized AI modules using Google Gemini 2.0 Flash.
  2. Building an AI-powered agreement generation system with structured milestones and measurable acceptance criteria.
  3. Implementing evidence-based deliverable auditing with confidence scoring.
  4. Creating a project-specific SHA-256 hash-chained Trust Ledger.
  5. Integrating PayPal Developer Sandbox REST Invoicing API v2.
  6. Implementing webhook verification and duplicate-event protection.
  7. Developing multi-tenant access controls using PostgreSQL and Supabase RLS.
  8. Implementing security protections against SSRF, IDOR, JWT algorithm confusion, and webhook replay attacks.
  9. Completing all 10 development phases documented in our architecture guide.

We are also proud of our reported testing and build results:

  1. 33/33 automated test suites passing.
  2. 6 consecutive successful GitHub Actions builds.
  3. 20/20 endpoint probes returning HTTP 200.
  4. 11/11 Next.js production pages compiled successfully.

Most importantly, we built PACTFLOW around a principle we strongly believe in: AI should help people make better decisions, not take away their authority. That is why the final milestone approval always belongs to the client.

What we learned

Working on PACTFLOW taught us that building a reliable AI-powered application involves much more than integrating an AI model.

We learned how to turn real-world problems into practical technical solutions and how different technologies can work together to solve a single problem.

We gained hands-on experience with full-stack development using Next.js and FastAPI, integrating Google Gemini for structured AI workflows, and working with PayPal's OAuth 2.0 authentication, invoicing, and webhook systems.

We also developed a deeper understanding of cryptographic hashing, SHA-256 hash chaining, database security, multi-tenant authorization, and API protection.

One of our biggest takeaways was the importance of responsible AI. An AI-generated report should not automatically become a final decision, especially when money and professional work are involved. AI should provide useful evidence and recommendations while humans retain control.

We also learned that security cannot be added as an afterthought. It needs to be considered from the architecture and database design stages themselves.

Above all, this project helped us understand how to bring AI, security, payments, and software engineering together into one meaningful real-world solution.

What's next for PACTFLOW

We see PACTFLOW as a foundation that can grow into a broader trust and accountability infrastructure for digital work.

Our next goal is to move beyond the current PayPal Sandbox environment and work towards a properly configured production payment integration.

We also want to make deliverable verification more powerful by integrating GitHub and GitLab, allowing the platform to inspect repository activity, commits, pull requests, and automated test results.

Another important direction is introducing controlled automated testing environments where submitted code can be tested against agreed acceptance criteria instead of relying only on manually submitted evidence.

We plan to expand the platform with real-time communication, notifications, deadline tracking, and more advanced project analytics. We also want to improve AI-based risk detection so that clients and freelancers can identify possible project delays and financial issues earlier.

In the long run, our vision is to make PACTFLOW useful beyond traditional freelancing, extending its trust and verification model to software development teams, independent professionals, agencies, and other milestone-based digital collaborations.

We want to build a future where people don't have to rely on blind trust when working together online.

PACTFLOW – Clear Agreements. Verified Deliverables. Trusted Payments .

Built With

  • fastapi
  • google-gemini-2.0-flash
  • jwt-authentication
  • next.js-14
  • oauth-2.0
  • paypal-rest-api
  • paypal-sandbox
  • postgresql
  • pydantic
  • python
  • react-18
  • recharts
  • rest
  • role-based-access-control-(rbac)
  • sha-256
  • supabase
  • tailwind-css
  • typescript
  • webhooks
Share this project:

Updates

Submission history