Quickstart

StellarRent: Redefining Rentals with Blockchain 🏠

STELLARRENT: πŸ’» Developer Guide

πŸš€ Quickstart for Developers

This guide is your all-in-one resource for integrating, deploying, and extending StellarRent. Whether you're a developer, a product team, or setting up an AI agent, this page provides everything you need.

Hello! This page is optimized for export and upload to your favorite AI agent. You can also use ours in the search bar! πŸš€


πŸš€ What is StellarRent?

StellarRent is a decentralized property rental platform built on the Stellar blockchain. It enables secure and intermediary-free listing, renting, and management of properties using smart contracts to:

  • List properties as an owner 🏠

  • Rent properties as a tenant πŸ”‘

  • Confirm rentals as an owner βœ…

  • Make secure payments with blockchain technology πŸ’Έ


πŸ§ͺ Step-by-Step

1. Install Bun

Bun is the JavaScript runtime used in this project. Visit bun.sh and run:

  • Unix:

    curl -fsSL https://bun.sh/install | bash
  • Windows:

    powershell -c "irm bun.sh/install.ps1 | iex"

Verify the installation with:

bun --version

You should see 1.1.29 or higher.


2. Clone the Repository

Clone the StellarRent repository and navigate to the project folder:

git clone https://github.com/your-username/stellar-rent.git
cd stellar-rent

3. Install Dependencies

Install all necessary dependencies by running:

bun install

4. Set Up Freighter

Freighter is the digital wallet used to interact with the Stellar blockchain:

  • Download Freighter from freighter.app 🌐

  • Create a new wallet and securely save your recovery phrase πŸ”’

  • Obtain test funds at laboratory.stellar.org for the Stellar testnet πŸ’°


5. Configure Environment Variables

Set up environment variables for the frontend and backend:

  • Frontend (apps/web/.env.local):

    NEXT_PUBLIC_STELLAR_NETWORK=testnet
    NEXT_PUBLIC_STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
    NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
  • Backend (apps/backend/.env):

    SUPABASE_URL=your_supabase_url
    SUPABASE_ANON_KEY=your_supabase_anon_key
    JWT_SECRET=your_jwt_secret
    REDIS_URL=redis://localhost:6379

Ensure you replace your_supabase_url, your_supabase_anon_key, and your_jwt_secret with the appropriate values for your project.


6. Start the Application

You can start the application in two ways:

  • With Docker:

    cd apps/backend
    docker-compose up
  • Local Development (requires two terminals):

    • Terminal 1 (Backend):

      cd apps/backend && bun run dev
    • Terminal 2 (Frontend):

      cd apps/web && bun run dev

🧩 Monorepo Structure

StellarRent is organized as a monorepo with the following main structure:

stellar-rent/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/              # Next.js Frontend
β”‚   β”œβ”€β”€ backend/          # Bun/Express Backend
β”‚   └── stellar-contracts/ # Soroban Contracts
  • apps/web: Frontend developed with Next.js 🌐

  • apps/backend: Backend built with Bun and Express βš™οΈ

  • apps/stellar-contracts: Smart contracts implemented with Soroban πŸ“œ


With these steps, you're ready to start working with StellarRent! πŸš€

Last updated