GithubHelp home page GithubHelp logo

marzilli / minter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tqtezos/minter

1.0 0.0 0.0 3.54 MB

OpenMinter is dApp framework for enabling the creation and collection of non-fungible tokens (NFTs) on Tezos.

License: MIT License

Shell 2.14% JavaScript 1.38% HTML 0.68% CSS 0.11% TypeScript 59.00% Dockerfile 0.28% OCaml 36.42%

minter's Introduction

OpenMinter header

OpenMinter

OpenMinter is dApp framework for enabling the creation and collection of non-fungible tokens (NFTs) on Tezos. The dApp enables anyone to create an NFT by filling in just a few fields, create new collection contracts, see their NFTs across contracts, and enable marketplace capabilities to trade them.

Current version supports the following:

๐ŸŒ Mainnet and Delphinet (Edonet soon)

๐ŸŽจ Image-based NFTs

๐Ÿ‘› Beacon support

โš™๏ธ The latest FA2 spec

๐Ÿš€ IPFS support (locally and Pinata)

Dependencies

Usage

Installation

To install and build the dependences required for local development, run:

$ yarn install

The installation process will fetch toplevel NPM dependences and build the minter-ui-dev and minter-api-dev Docker images.

Configuration

The Minter can be configured to run on three different networks: sandbox, testnet (currently set to delphinet), and mainnet.

Each network has its own configuration file in the config folder under minter.<network>.json. The schema of these files can be defined as this TypeScript type:

type Config = {
  rpc: string,
  network: string,
  bcd: {
    api: string,
    gui: string
  },
  admin: {
    address: string,
    secret: string
  },
  pinata?: {
    apiKey: string,
    secretKey: string
  },
  contracts?: {
    nftFaucet?: string
  }
}

For example, the following minter.sandbox.json configuration defines the RPC url for the local sandbox node and the default alice address as the administrator during contract origination:

{
	"rpc": "http://localhost:8732",
	"admin": {
		"address": "tz1YPSCGWXwBdTncK2aCctSZAXWvGsGwVJqU",
		"secret": "edsk3RFgDiCt7tWB2oe96w1eRw72iYiiqZPLu9nnEY23MYRp2d8Kkx"
	}
}

Note: Since sandbox keys don't represent sensitive accounts, the config/ folder includes default configurations with admin wallets. To configure OpenMinter for the testnet or mainnet networks, update the definitions in config/minter.<network>.example.json and copy it to the proper path for the application to read it. For example:

cp config/minter.mainnet.example.json config/minter.mainnet.json

If the contracts key or its child nftFaucet keys is not specified, a new contract will be originated and its addresses saved in the configuration file when starting the OpenMinter development environment.

Pinata

Testnet and Mainnet instances of OpenMinter can include Pinata API keys in order to direct all file uploads through their service. This allows for ease of use while working with IPFS as running OpenMinter without Pinata will rely on using and maintaining a local IPFS node.

โš ๏ธ Note: The example testnet and mainnet configurations in the config/ folder have placeholder Pinata API keys as it's the most robust way to easily persist data on IPFS. Using OpenMinter on these networks without Pinata may cause data loss as the NFT metadata and artifacts must be resolved over IPFS. If you want to use OpenMinter on these networks without Pinata, remove the pinata key from the configuration, but be aware that this entails running and maintaining your own IPFS gateway in order for your NFT data token remain accessible.

Starting and Stopping

During its start process, OpenMinter will create or update Docker services for its specified environment and also bootstrap the required contracts if their addresses are not defined in the environment's configuration file.

Sandbox

To start Minter in a sandbox network, run:

$ yarn start:sandbox

This command will start the following services:

  • flextesa sandbox container
  • Better Call Dev indexer API, GUI, and its required backend services
  • Minter UI
  • Minter API
  • IPFS Node

To stop and teardown these services, run:

$ yarn stop:sandbox

Testnet

To start Minter on the testnet network, run:

$ yarn start:testnet

This command will start the following services:

  • Minter UI
  • Minter API
  • IPFS Node

To stop and teardown these services, run:

$ yarn stop:testnet

Mainnet

To start Minter on the mainnet network, run:

$ yarn start:mainnet

This command will start the following services:

  • Minter UI
  • Minter API
  • IPFS Node

To stop and teardown these services, run:

$ yarn stop:mainnet

Interacting with Minter

After starting Minter, you can now open:

Development

To see a list of services running after you've started the system, run:

$ docker service ls

Accessing Service Logs

To view each service's logs, the bin/log command is available. It can be run using yarn scripts yarn log or directly. It's a small wrapper around docker service logs that matches the first service you provide it:

$ yarn log:api

...which is a shorter way of doing the following:

$ docker service logs minter-dev-sandbox_api-server --follow --raw

To view the UI output, for example, run:

$ yarn log:ui

You may also override the script's default docker service logs arguments (--follow and --raw) by passing them at the end of the command. For example:

$ yarn log:api --since 5m

Editor Environments

Docker development images are set up to reload server and web UI on source code changes.

To setup this project for an IDE, you will want to install NPM dependencies outside of Docker. Make sure you have Yarn (version 1.22.x or above) installed:

$ pushd client; yarn; popd
$ pushd server; yarn; popd

Restarting Services

Individual services in docker stack can be restarted like so:

$ docker service scale minter-dev-sandbox_api-server=0
$ docker service scale minter-dev-sandbox_api-server=1

Or with a helper shell function

$ svc-restart api-server

where svc-restart is defined as

$ svc-restart(){docker service scale minter-dev-sandbox_$1=0 && docker service scale minter-dev-sandbox_$1=1}

Release Builds (WIP)

Development UI and API server builds can be swapped out for release builds:

$ bin/build-release-images

and then

STACK_API_SERVER_DEF=api-server STACK_UI_DEF=ui bin/start

minter's People

Contributors

lambdahands avatar alex-kooper avatar obstropolos avatar emmanueldenloye avatar emishur avatar tezit avatar

Stargazers

 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.