SafeTrust is a decentralized platform designed to revolutionize P2P transactions, providing secure deposits and payments powered by blockchain and trustless technologies. 🌐✨ Experience transparency and reliability in every cryptocurrency transaction. 💸🔒
🔐 Trustless Technology: Secure and block deposits without intermediaries.
💾 Blockchain-Powered Transparency: Immutable, auditable, and verifiable transactions.
💱 Crypto-Payment Support: Manage cryptocurrency payments safely and efficiently.
✅ Automated Refunds: Streamlined processes ensure refunds and payment releases happen automatically.
🛠️ Trustless Escrow:
Funds are securely held in blockchain-based escrow accounts until all terms are met.
🔎 Blockchain Transparency:
Every transaction is logged on the blockchain for full visibility and accountability. 📜
💰 Crypto Payments:
Supports irreversible and secure cryptocurrency payments while reducing risks of fraud or disputes.
🔗 Trustline Process:
Verified trustlines between parties add an extra layer of transaction security. 🔒
📤 Automated Refund System:
Ensures funds are automatically released based on the terms of the agreement, with no manual intervention required.
- Create Escrow: The renter creates a secure escrow account. 🏗️
- Fund Escrow: The deposit is funded by the renter. 💵
- Rental Agreement: Terms are agreed upon and stored on the blockchain. 📃
- Completion or Cancellation: Funds are released based on contract outcomes. 🎯
- Node.js v14 or later 🖥️
- A blockchain wallet like Albedo for secure cryptocurrency transactions. 🔐
- Trustless Work API access (details here). 📖
1️⃣ Fork this repository
2️⃣ Navigate to the project directory:
git clone https://github.com/<your_user>/Frontend
3️⃣ Add the remote repository upstream:
git remote add upstream https://github.com/safetrustcr/Frontend
4️⃣ Navigate to the project directory:
cd /Frontend
5️⃣ Set up environment variables (make sure the .env file was created)
echo "NEXT_PUBLIC_API_URL=https://api.trustlesswork.com" > .env
6️⃣ Install the app and start the development server:
npm install
7️⃣ Execute the app:
npm run dev
/escrow/initiate
: Start the escrow process and create agreements./escrow/fund
: Securely fund the escrow account./escrow/complete
: Complete the process and release funds to the appropriate party.
- Frontend: 🧑💻 Built with TypeScript and styled using Tailwind CSS for rapid UI development.
- Blockchain: 🛡️ Utilizes smart contracts for secure, immutable transactions.
- API Integration: 🌐 Interacts with the Trustless Work API for seamless escrow management.
- Wallet Integration: 🪙 Compatible with wallets like Albedo for secure payment handling.
This project uses Jest, React Testing Library, and Cypress for comprehensive testing of our Next.js application with App Router.
- Run unit and integration tests:
npm test
- Run E2E tests:
npm run test:e2e
- Generate test coverage report:
npm run test:coverage
- Unit and integration tests are located in
__tests__
directories or as.test.ts(x)
files next to the code they're testing within theapp
directory. - E2E tests are located in the
cypress/e2e
directory.
We use Mock Service Worker (MSW) to mock API requests, including GraphQL queries. Mock handlers are defined in mocks/handlers.ts
.
We use GitHub Actions for CI. The workflow is defined in .github/workflows/test.yml
.
Test coverage reports are generated using Jest's built-in coverage tool and uploaded to Codecov in the CI pipeline.
- Server Components: For testing Server Components, focus on integration and E2E tests rather than unit tests.
- API Routes: Use MSW to mock API responses in your tests.
- App Router: Ensure your tests account for the new file-based routing system in the App Router.
Check out our Figma design here: SafeTrust Figma.
🌟 Join SafeTrust today and revolutionize the way you manage P2P transactions! 🌟