Giter VIP home page Giter VIP logo

mostro-web's Introduction

Mostro Web

Super early version of a web client for the Mostro P2P System.

This project is a web interface that facilitates peer-to-peer bitcoin trading over the lightning network โšก๏ธ using nostr ๐Ÿฆฉ. The lightning network is a layer 2 scaling solution for bitcoin that enables fast and low-cost transactions.

Configuration - (Dev only ๐Ÿง‘โ€๐Ÿ’ป)

Create a .env file with these 3 environment variable defined:

RELAYS=<comma-separated-list-of-relay-urls>
MOSTRO_PUB_KEY=<public-key-of-your-mostro-instance>
SECRET_KEY=<the-user-secret-key>

Prerequisites

Polar

Mostro

  • Clone the Mostro App
  • Install Rust
  • Install the Rust SQL toolkit cargo install sqlx-cli
  • Install CMake
  • Then run from the CMake GUI: "Tools->Install For Command Line Use"
  • Create a new environment file by cp .env-sample .env
  • Copy the paths for LND cert file and MACAROON file from polar. You can find them in the polar UI under the node's settings > file paths.

Mostro Web

  • Install Node latest LTS version
  • Create a new environment file by cp .env-sample .env
  • Generate som nsec and npub keys using nostrtool or Rana and paste it in a new .env file under MOSTRO_PUB_KEY and SECRET_KEY keys
  • Set RELAYS to ws://localhost:7000 in the .env file
  • Run yarn install

You're now ready to go.

With docker and polar already running then do...

  1. In mostro folder
    $ ./init_db.sh
    $ cargo run
    $ cd relay
    $ docker compose up -d
  2. In mostro-web folder
    $ yarn dev

That's it! ๐ŸŽ‰

Build Setup

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate

For detailed explanation on how things work, check out the documentation.

Features

  • Posts Orders (Buy & Sell)
  • Displays order list
  • Decodes DMs from mostro
  • Buy flow (maker / market rate)
  • Buy flow (maker / fixed price)
  • Sell flow (maker / market rate)
  • Sell flow (maker / fixed price)
  • Buy flow (taker / market rate)
  • Buy flow (taker / fixed price)
  • Sell flow (taker / market rate)
  • Sell flow (taker / fixed price)
  • Handling multiple relays
  • NIP-07 for key management
  • Persisting old events?

License

This project is licensed under the MIT License ๐Ÿ“œ. See the LICENSE file for more information.

mostro-web's People

Contributors

bilthon avatar diazemiliano avatar grunch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.