Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stellar Mart

Borderless Commerce. Powered by Stellar.

License: MIT Next.js Stellar Freighter

Stellar Mart is a decentralized digital marketplace built on the Stellar network, enabling users to buy and sell goods or digital assets with fast, low-cost, and borderless payments. The platform bridges traditional e-commerce with blockchain infrastructure to deliver a seamless global trading experience.


The Problem

Cross-border commerce today is held back by:

  • High transaction fees eating into seller margins
  • Slow payment settlements across borders
  • Currency conversion barriers and exchange rate losses
  • Limited access for users in emerging markets without traditional banking

There is a clear need for a marketplace that enables instant, low-cost global transactions without relying on banks or payment intermediaries.


Objective

Build a decentralized commerce platform that:

  • Enables global buying and selling without intermediaries
  • Supports multi-currency payments via Stellar
  • Reduces transaction costs and settlement time to near-zero
  • Improves access for underserved and unbanked markets

Core Features

1. Decentralized Marketplace

  • Product listings for physical and digital goods
  • Seller storefronts with trust scoring
  • Search and category filtering

2. Stellar-Powered Payments

  • Instant transactions with near-zero fees
  • Multi-currency support — XLM, USDC, EURC, and other Stellar-based assets
  • Built-in currency conversion via Stellar's DEX

3. Wallet Integration

  • Connect with Freighter browser wallet
  • Secure client-side transaction signing (private keys never leave your device)
  • Balance and transaction history management

4. Escrow & Buyer Protection

  • Funds held in multi-sig escrow until order is confirmed
  • Dispute resolution mechanism
  • Trust scoring system for sellers

5. Order & Inventory Management

  • Real-time order tracking
  • Seller dashboards with inventory updates
  • Order status: pending → escrowed → confirmed → completed

Tech Stack

Layer Technology
Frontend Next.js 14, React, Tailwind CSS
Backend Node.js, Express, PostgreSQL
Blockchain Stellar SDK, multi-sig escrow accounts
Wallet Freighter API
Storage Cloud / IPFS for product media

Project Structure

Stellar-Mart/
├── frontend/                          # Next.js web app
│   └── src/
│       ├── app/
│       │   ├── page.jsx               # Homepage
│       │   ├── marketplace/           # Browse listings
│       │   ├── product/[id]/          # Product detail & buy
│       │   ├── sell/                  # Create a listing
│       │   └── orders/                # Order history
│       ├── components/
│       │   ├── Navbar.jsx
│       │   ├── ProductCard.jsx
│       │   ├── ProductGrid.jsx
│       │   └── WalletButton.jsx
│       └── context/
│           └── WalletContext.jsx      # Freighter wallet state
├── backend/                           # Express REST API
│   └── src/
│       ├── routes/
│       │   ├── products.js            # CRUD for listings
│       │   ├── orders.js              # Order management
│       │   ├── users.js               # User profiles
│       │   └── payments.js            # Stellar tx builder
│       ├── stellar/
│       │   └── transactions.js        # Payment & escrow logic
│       └── db/
│           └── schema.sql             # PostgreSQL schema
└── contracts/
    └── escrow.md                      # Escrow design doc

Getting Started

Prerequisites

Backend

cd backend
npm install
cp .env.example .env   # fill in your values
npm run dev

Frontend

cd frontend
npm install
cp .env.example .env.local   # fill in your values
npm run dev

Open http://localhost:3000 in your browser.


Environment Variables

Backend (backend/.env)

PORT=4000
DATABASE_URL=postgresql://user:password@localhost:5432/stellar_mart
STELLAR_NETWORK=testnet
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
ESCROW_SECRET_KEY=your_escrow_account_secret

Frontend (frontend/.env.local)

NEXT_PUBLIC_API_URL=http://localhost:4000/api
NEXT_PUBLIC_STELLAR_NETWORK=testnet

Escrow Flow

Stellar Mart uses multi-signature accounts on Stellar for trustless escrow — no smart contracts required.

Buyer places order
      ↓
Funds sent to escrow account (multi-sig: buyer + platform)
      ↓
Seller ships / delivers
      ↓
Buyer confirms receipt → funds released to seller
      ↓
(or) Dispute raised → platform reviews → refund or release

See contracts/escrow.md for full technical details.


API Reference

Method Endpoint Description
GET /api/products List products (supports search, category, page)
GET /api/products/:id Get product by ID
POST /api/products Create a listing
PUT /api/products/:id Update a listing
DELETE /api/products/:id Delete a listing
GET /api/orders List orders for authenticated user
POST /api/orders Place an order
PATCH /api/orders/:id/confirm Confirm receipt, release escrow
PATCH /api/orders/:id/dispute Raise a dispute
POST /api/payments/build Build unsigned payment transaction
POST /api/payments/escrow Build escrow transaction
POST /api/payments/submit Submit signed transaction
POST /api/users/register Register with wallet address
GET /api/users/:wallet Get user profile
GET /api/users/:wallet/storefront Get seller storefront

Target Users

  • Small and medium-sized businesses selling globally
  • Freelancers selling digital goods and services
  • Cross-border traders looking for cheaper alternatives
  • Users in emerging markets without access to traditional banking

Value Proposition

  • Near-zero transaction fees compared to traditional payment processors
  • Instant global payments — no 3–5 day bank settlement windows
  • No reliance on traditional banking systems
  • Accessible and inclusive commerce infrastructure for everyone

Roadmap

  • Product listings and marketplace UI
  • Freighter wallet integration
  • Stellar payment transaction builder
  • Multi-sig escrow logic
  • Order management (place, confirm, dispute)
  • Seller storefronts
  • Mobile app experience
  • AI-powered product recommendations
  • Integration with logistics providers
  • NFT-based product authenticity verification

Contributing

Pull requests are welcome. For major changes, open an issue first to discuss what you'd like to change.


License

MIT — free to use, modify, and distribute.


Related Projects

About

Borderless Commerce. Powered by Stellar. A decentralized marketplace on the Stellar network.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages