Skip to content

ereynier/NFT-PhotoPrint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

NFT Printer

A smart contract coupled with a printer
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

Product Name Screen Shot

This project is composed of a smart contract and a script. The smart contract is deployed on the blockchain, it handle teh NFTs and the blockchain part of the printer. The script is able to listen to the blockchain and send a request to print the photo from Creativehub.

  • The users can buy an NFT with multiple tokens
  • The users can claim a free print of the photo buy burning the NFT
  • The users can mint a certificate for the printed photo

(back to top)

Built With

  • Solidity
  • Next
  • React
  • TypeScript
  • Foundry

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

Installation

  1. Creativehub
  • Get a free API Key at https://creativehub.io
  • Upload your photo to Creativehub
  • Set the photo as a product
  • Get the product ID buy using the API
  1. Get a free API Key for the rpc node at https://alchemy.com

  2. Clone the repo

    git clone https://github.com/ereynier/NFT-PhotoPrint.git
  3. Go to the frontend folder

    cd frontend
  4. Install NPM packages

    npm install
  5. Enter the local variables in .env.local file based on .env.local.example

  6. Go to the backend folder

    cd backend
  7. Install NPM packages

     npm install
  8. Enter the local variables in .env file based on .env.example

  9. Go in blockchain folder

    cd blockchain
  10. Install NPM packages

    npm install
  11. Enter the local variables in .env file based on .env.example

  12. Deploy the smart contract (you can use ARGS=(--network mumbai) or ARGS=(--network polygon) to deploy on the public blockchains instead of the local blockchain)

    make deploy
  13. Copy the contract address in the differents .env files

  14. (optional) You can find the command to get the json file to verify the contract on polygonscan in contract-verify.txt

  15. start the backend

    cd scripts && node index.js
  16. start the frontend

    cd frontend && npm next dev
  17. Go to http://localhost:3000 (or the port displayed in the terminal)

(back to top)

Usage

You can find a detailed arcticle about the smart contract on medium

You can use the testnet website at https://nft-prints.ereynier.me

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Estéban Reynier - @EstebanReynier - esteban@ereynier.com

Project Link: https://github.com/ereynier/NFT-PhotoPrint

(back to top)

Acknowledgments

(back to top)