Pact is a lightweight web demo that turns an informal “WhatsApp handshake” into a structured agreement in minutes.
This repo contains only the frontend (React + Vite + Tailwind). It simulates link-sharing and state on the client for a live demo.
npm installCreate .env in the project root:
echo VITE_GEMINI_API_KEY=your_key_here> .envRun the app:
npm run devBuild (optional sanity check):
npm run build-
Open the app at
http://localhost:5173/ -
Click Start an Agreement
-
Paste a prompt like:
I'm paying Chioma ₦75,000 to build my e-commerce website by May 30, 2026. -
Submit → wait for analysis → review extracted terms → click Looks good
-
On Review and share:
- Confirm currency shows ₦ (not
#) - Tap Whatsapp (demo shortcut to open the receiver link)
- Or tap Copy shareable link and open it in another tab/device
- Confirm currency shows ₦ (not
-
Receiver opens
/agreement/:id:- Toggle Plain English / Legal Jargon
- Click Accept terms
-
Executed state:
- Click Download agreement PDF (exports
Pact_Agreement.pdf)
- Click Download agreement PDF (exports
- No authentication: anonymous session only.
- No backend DB: agreements are stored in browser localStorage to simulate link-sharing.
- Chat-to-doc extraction: uses Gemini Flash via
@google/generative-aiwith a strict JSON-only schema:partyA,partyB,amount,deliverable,deadline
- Pact does not collect accounts or store drafts on a server in this MVP.
- Chat prompts are sent to the Gemini API for extraction.
- Do not include passwords, bank details, national IDs, or other highly sensitive data in prompts.
Pact provides general information to help parties clearly document terms. It is not a law firm and does not provide legal advice. For complex agreements, consult a qualified lawyer.
For demo support: hello@pact.app