Skip to content

fabohax/mostro-web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Here's a revised version of the README.md with improved clarity, formatting, and readability:


Mostro Web

A super-early version of a web client for the Mostro P2P system.

This project provides a web interface for peer-to-peer Bitcoin trading over the Lightning Network ⚡️, leveraging nostr 🦩. The Lightning Network is a layer 2 solution for Bitcoin that enables fast and low-cost transactions.


Prerequisites

Node.js and NPM

  • Node.js: Recommended version: v20.15.1
  • NPM: Recommended version: 10.7.0

Mostro

  • Clone the Mostro repository.
  • Follow the detailed setup instructions here.

Installation

1. Clone the Repository

git clone git@github.com:MostroP2P/mostro-web.git

2. Install Dependencies

npm install

3. Configure Environment Variables

  1. Create a new .env file by copying the sample file:

    cp .env-sample .env
  2. Set the following environment variables:

    • RELAYS: A comma-separated list of relay URLs. Example:
      RELAYS=wss://relay.mostro.network,wss://relay.nostr.net
    • MOSTRO_PUB_KEY: The public key of the Mostro daemon to interact with. This should match the private key (nsec) used in Mostro. Example:
      MOSTRO_PUB_KEY=npub19m9laul6k463czdacwx5ta4ap43nlf3lr0p99mqugnz8mdz7wtvskkm5wg

    Read how to get a Mostro Pub Key at the Mostro daemon repository.

  3. Load the environment variables:

    source .env

Note: It’s also possible (and sometimes preferable) to run a private relay. Instructions for doing this using Docker are available in the Mostro documentation.

4. Start the Development Server

npm run dev

Features

  • ✅ Post buy and sell orders.
  • ✅ View order lists.
  • ✅ Decode direct messages (DMs) from Mostro.
  • ✅ Buy flow:
    • Maker/market rate
    • Maker/fixed price
    • Taker/market rate
    • Taker/fixed price
  • ✅ Sell flow:
    • Maker/market rate
    • Maker/fixed price
    • Taker/market rate
    • Taker/fixed price
  • ✅ Handle multiple relays.
  • ✅ Key management using NIP-07.
  • ✅ Persist old events.
  • ✅ Direct messaging with peers.
  • ✅ Dispute management.
  • 🔲 NIP-59 support (Coming soon!)

Nuxt.js Scripts

This is a Nuxt 3 project, which includes the following scripts for development, production builds, and static site generation:

  • Run in development mode (hot reload):
    npm run dev
  • Build for production:
    npm run build
  • Start the production server:
    npm run start
  • Generate a static release:
    npm run generate

Tip: Run npm run build at least once before starting development with npm run dev.


License

This project is licensed under the MIT License 📜. For more information, see the LICENSE file.

Packages

No packages published

Languages

  • Vue 57.7%
  • TypeScript 41.3%
  • Other 1.0%