Skip to content

Kredeum/kredeum

Repository files navigation

Kredeum NFTs

Instructions

Before installation, you need node, pnpm, some environment variables and a local WordPress (for plugin only). For detailed instructions, check pre-installation section.

First install npm packages:

pnpm install

To launch Dapp in dev mode:

pnpm dev:dapp

To build Dapp, then launch it in production mode:

pnpm build:dapp
pnpm preview:dapp

To build WP Plugin, then lauch it inside your browser:

pnpm build:plugin
open http://localhost:8000/wp-admin/admin.php?page=nfts

Modules :

Kredeum Factory is splitted in various modules listed bellow :

  1. sveltekit : SvelteKit main app (svelte)
  2. svelte : Svelte UI components (svelte)
  3. contracts : Smartcontrats (solidity)
  4. wordpress : WordPress Kredeum NFTs Factory Plugin (PHP/js)
  5. gulp : Static UI (html, css)
  6. config : Configuration files with network settings (json)
  7. common : Common libraries (typescript)
  8. misc : Other tools, datas and archives

In each of these specific directories you will access more advanced commands

GitHub Action

Deploy to WordPress.org

Pre installation

  • NODE v20 : Install node v20, for example via node download page or with brew (on MacOS):

    brew install node
    
  • PNPM package manager : Install via pnpm installation page : https://pnpm.io/fr/installation

  • ENV environment variables : You have to keep these variables in your environment

    • INFURA_API_KEY=""
    • COVALENT_API_KEY=""
    • NFT_STORAGE_KEY=""

    You can get free API_KEYs from these different providers

    You can use .env.example to start with, it also includes optional environment variables for deployments. Then you can source or sh your .env file (to set these variables in your environment) before running pnpm tasks. Another option can be to use direnv to automatically load these variables.

  • WORDPRESS To iInstall WordPress locally, we higly recommend Local WP

Then link wordpress/kredeum-nfts directory of this repo to the plugin directory of your WordPress installation:

ln -s /path/to/this/repo/wordpress/kredeum-nfts /path/to/your/wordpress/wp-content/plugins/kredeum-nfts