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
Kredeum Factory is splitted in various modules listed bellow :
- sveltekit : SvelteKit main app (svelte)
- svelte : Svelte UI components (svelte)
- contracts : Smartcontrats (solidity)
- wordpress : WordPress Kredeum NFTs Factory Plugin (PHP/js)
- gulp : Static UI (html, css)
- config : Configuration files with network settings (json)
- common : Common libraries (typescript)
- misc : Other tools, datas and archives
In each of these specific directories you will access more advanced commands
-
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.exampleto start with, it also includes optional environment variables for deployments. Then you cansourceorshyour.envfile (to set these variables in your environment) before runningpnpmtasks. 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