Skip to content

patelmanan112/trust_layer

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

image

πŸ›‘οΈ TrustLayer: The Future of Outcome-Based B2B Payments

A successful payment does not guarantee a successful service β€” TrustLayer ensures both.

A B2B SaaS Fintech Platform for Secure Escrow Payments, Dispute Resolution, and Trust Verification.


Resource Link
🎨 Figma Design View Design
🌐 Live Project Visit Website
πŸš€ Postman Docs API Documentation
βš™οΈ Backend API API Server
πŸ“Ί YouTube Demo Watch Video

React Node.js MongoDB Redux Express.js License: MIT


πŸ›‘ The Problem: The Trust Gap in B2B Services

In the current global digital economy, B2B service transactions (freelance, consulting, software development) are plagued by a fundamental lack of security:

  1. Payment Risks: Clients are often forced to pay 50-100% upfront to "lock in" a provider, with no guarantee of quality.
  2. Delivery Risks: Providers often complete work only to face "scope creep" or clients who vanish without paying the final invoice.
  3. Complex Disputes: When things go wrong, there is no centralized, evidence-based system to resolve issues fairly.
  4. Opaque Reliability: General review systems are easily manipulated; there is no data-driven "Trust Score" linked to actual financial outcomes.

βœ… The Solution: TrustLayer's Outcome-Based Escrow

TrustLayer redefines how businesses interact by acting as a neutral, automated intermediary. Our platform ensures that trust is built into the protocol, not just the contract.

How it Works:

  1. Smart Escrow: When a contract starts, the client's funds are moved into a secure "Held" state.
  2. Verified Delivery: The provider submits their work through the platform.
  3. Outcome Verification: The client reviews the output. Only upon explicit verification are the funds released.
  4. Automated Arbitration: If a dispute arises, the funds remain locked until a resolution is reached based on submitted evidence.

✨ Core Features

πŸ” Enterprise-Grade Security

  • Multi-Factor Authentication: Secure login using JWT and Google OAuth 2.0.
  • Role-Based Access Control (RBAC): Distinct interfaces and permissions for 'Clients', 'Freelancers', and 'Admins'.

πŸ’° Escrow & Financial Lifecycle

  • Escrow-as-a-Service: Automated holding and releasing of funds based on milestone verification.
  • Transaction History: Immutable record of all financial movements for auditing and tax purposes.

βš–οΈ Dispute Resolution Center

  • Evidence Vault: Securely upload screenshots, contracts, and documents as proof during a dispute.
  • Resolution Tracking: Transparency into the status of active disputes and historical outcomes.

πŸ“Š Dynamic Trust Engine

  • Trust Scores: A mathematical reliability score calculated from successful project completion rates and dispute history.
  • Service Marketplace: A curated directory where providers can list specialized services and clients can initiate secure contracts instantly.

🎨 Premium User Experience

  • Sleek UI/UX: A modern, dark-themed interface built for professionals.
  • Real-time Notifications: Stay updated on escrow status, new messages, and dispute updates.

πŸ› οΈ Detailed Tech Stack

Layer Technologies Used Key Purpose
Frontend React 19, Redux Toolkit, Tailwind CSS 4 Core UI, State Management, Styling
Backend Node.js, Express.js API Architecture, Business Logic
Database MongoDB Atlas, Mongoose NoSQL Data Persistence
Auth JWT, Bcrypt.js, Passport.js Secure Sessions & Hashing
Storage Multer File Handling for Evidence
DevOps Vercel (Frontend), Render (Backend) CI/CD and Hosting

πŸ“ Project Architecture & Folder Structure

We follow a modular, scalable architecture to ensure the codebase remains maintainable as the platform grows.

TrustLayer/
β”œβ”€β”€ πŸ“‚ frontend/               # React + Vite Application
β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ components/     # UI Atoms (Navbar, Cards, Modals, Buttons)
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ pages/          # Main Views (Dashboard, Escrow, Dispute, Settings)
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ store/          # Redux Slices (authSlice, transactionSlice)
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ services/       # API Interceptors & Axios Instance
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ hooks/          # Custom Hooks (useAuth, useEscrow)
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ layouts/        # Shared Layout Wrappers
β”‚   β”‚   └── App.jsx            # Routing & Global Providers
β”‚   └── index.html             # Entry Point & SEO Meta Tags
β”‚
β”œβ”€β”€ πŸ“‚ backend/                # Node.js + Express API
β”‚   β”œβ”€β”€ πŸ“‚ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ controllers/    # Route Handlers (Auth, Escrow, Dispute logic)
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ models/         # Mongoose Data Schemas
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ routes/         # API Endpoint Definitions
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ middleware/     # Auth Protection & Error Handlers
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ config/         # MongoDB Connection & Env Validation
β”‚   β”‚   └── app.js             # Middleware Orchestration
β”‚   └── index.js               # Entry Point (Server Startup)
β”‚
β”œβ”€β”€ πŸ“‚ uploads/                # Local Storage for Dispute Evidence
β”œβ”€β”€ .gitignore                 # Root Git Ignore Rules
β”œβ”€β”€ LICENSE                    # MIT License Terms
└── README.md                  # Comprehensive Documentation

πŸš€ Getting Started

Prerequisites

  • Node.js (v18+)
  • MongoDB Atlas Account
  • Google Cloud Console Project (for OAuth)

1. Installation

git clone https://github.com/patelmanan112/TrustLayer.git
cd TrustLayer

2. Backend Setup

cd backend
npm install
# Create a .env file:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_signing_key
CLIENT_ORIGIN=http://localhost:5173

Run development server: npm run dev

3. Frontend Setup

cd frontend
npm install
# Create a .env file:
VITE_API_URL=http://localhost:5000

Run development server: npm run dev


πŸ” SEO & Visibility

TrustLayer is built with SEO best practices:

  • Semantic HTML5: Using <header>, <main>, <footer>, and <section> tags.
  • Meta Tags: Optimized descriptions and keywords for indexing.
  • Open Graph: Professional sharing previews for LinkedIn and Twitter.
  • Performance: Optimized asset delivery for fast initial load times.

πŸ“Έ Project Gallery

Professional Landing Page

First impression for potential B2B partners. image

Unified Dashboard

One view for all your active escrows and trust metrics. image

Dispute Evidence Upload

Transparent and secure evidence submission. image


πŸ—ΊοΈ Roadmap & Future Enhancements

  • Smart Contract Integration: Moving escrow logic to Ethereum/Solana for decentralization.
  • Multi-Currency Support: Allowing payments in USD, EUR, and Crypto.
  • AI-Assisted Arbitration: Using AI to analyze evidence and suggest resolution paths.
  • Mobile App: Dedicated iOS and Android applications.

πŸ‘€ Built By

Manan Patel


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


⭐ Star this repo if you find it useful!

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 98.7%
  • Other 1.3%