ikemHood / Safetrust_Backend

Supports a decentralized platform for secure and trusted P2P cryptocurrency transactions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🌟 SafeTrust 🌟

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. πŸ’ΈπŸ”’


πŸš€ Why Choose SafeTrust?

πŸ” 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.


🌟 Key Features

πŸ› οΈ 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.


βš™οΈ How It Works

  1. Create Escrow: The renter creates a secure escrow account. πŸ—οΈ
  2. Fund Escrow: The deposit is funded by the renter. πŸ’΅
  3. Rental Agreement: Terms are agreed upon and stored on the blockchain. πŸ“ƒ
  4. Completion or Cancellation: Funds are released based on contract outcomes. 🎯

πŸ“‹ Getting Started

Prerequisites

  1. Install Docker and Docker Compose
  2. Download the Hasura global binary. See steps here
  3. Run
docker compose up -d
  1. Connect with database. For this run hasura console and follow this guide

Connect using an environment variable and just type PG_DATABASE_URL

Name your database as safetrust (instead of default) when prompted to do so.

Now, run the migrations.

hasura migrate apply --admin-secret myadminsecretkey
  1. Adding migrations.

You can add migrations either with the hasura console or by the command:

hasura migrate create [enable_postgis] --admin-secret myadminsecretkey

where enable_postgis is the name of the migration. Please make sure to use descriptive names with verbs about what the migration is doing!

Then to apply them:

hasura migrate apply --admin-secret myadminsecretkey

If you wanna use the hasura web console and access it on http://localhost:9695/:

hasura console --admin-secret myadminsecretkey

And you should be good to go to start and work on this.

πŸ“‹ Known Issues

πŸ“ Title

Error Running Docker Compose

❌ Error Message

Rosetta error: Rosetta is only intended to run on Apple Silicon with a macOS host using Virtualization.framework with Rosetta mode enabled

πŸ” Error Description

  1. Run docker compose up -d.
  2. If the Backend postgres-1 module can't start and shows the error above:
    • This is due to an issue with Rosetta settings on Apple Silicon devices.
  3. βœ… Solution:
    • Go to Docker Settings and disable the:
      Use Rosetta for x86_64/amd64 emulation on Apple Silicon selection button.
    • πŸ”„ Restart Docker.
    • πŸš€ It should now run great!

About

Supports a decentralized platform for secure and trusted P2P cryptocurrency transactions.


Languages

Language:JavaScript 78.8%Language:PLpgSQL 18.1%Language:Dockerfile 3.1%