bitman310 / fractal-ordinals-marketplace

This is an Ordinal/NFT marketplace built on the Fractal Bitcoin network, allowing users to list their Ordinals for sale. Buyers can browse and purchase Ordinals in accordance with Ordinal Theory within the Fractal ecosystem.
0 stars 0 forks source link
bitcoin fractal nft nft-marketpplace ordinals-nft

Fractal Ordinals Marketplace

This is an Ordinal/NFT marketplace operating on the Fractal Bitcoin network, where users can list their Ordinals for sale. Buyers can explore and purchase listed Ordinals according to Ordinal Theory within the Fractal ecosystem.

Table of Contents

Configuration

Configuration settings are sourced from a .env file and a config module. Ensure you have the necessary environment variables set up in your .env file.

Installation

  1. Clone the repository:

    git clone https://github.com/bitman310/fractal-ordinals-marketplace.git 
    cd fractal-ordinals-marketplace
  2. Install the dependencies:

    npm install
  3. Create an .env file and add your environment variables:

    NETWORKTYPE=TESTNET
    PORT=3000
    MONGODB_URI=mongodb://localhost:27017/fractal-ordinals-marketplace

    You can reference .env.example file configuration.

  4. Start the server:

    npm start

Usage

After starting the server, the application will be running on the specified port. By default, it is set to port 3000. You can access the backend running status at http://localhost:3000 and see the Swagger API documentation at http://localhost:3000/api-docs.

API Endpoints

The following routes are available in the application:

MongoDB Schema

The MongoDB schema used in this project is as follows:

import mongoose from "mongoose";

const OrderSchema = new mongoose.Schema({
  ordinalId: { type: String, required: true, unique: true },
  price: { type: Number, required: true },
  sellerPaymentAddress: { type: String, required: true },
  sellerOrdinalPublicKey: { type: String, required: true },
  status: { type: String, required: true },
  ordinalUtxoTxId: { type: String, required: true },
  ordinalUtxoVout: { type: Number, requred: true },
  serviceFee: { type: Number },
  signedListingPSBT: { type: String, required: true },
});

const OrderModel = mongoose.model("order", OrderSchema);

export default OrderModel;

Swagger Documentation

Swagger UI is integrated to provide an interactive API documentation. You can access it at http://localhost:3000/api-docs. This documentation will dynamically reflect the API endpoints of the application.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -m "Add new feature").
  4. Push your branch (git push origin feature-branch).
  5. Create a new Pull Request.

Additional Informations

Tags

Endpoints

Create Listing

Save Listing

Relist

Confirm Relist

Delist

Create Offer

Submit Offer

Contact Info

I have developed a fractal ordinal marketplace, based on previous ordinal marketplace developments on the Bitcoin mainnet. The initial functionalities are showcased in this public repository for the fractal ordinal marketplace. For further technical support or development assistance, please contact me here.

Telegram: @dwlee918

X: @derricklee918

Discord: @muratcanbey.

Thanks.