Welcome to the CLN community app repo. We're building a dApp that will interact with the smart contracts of the CLN ecosystem. For now, we have a small api server that communicates with an IPFS node (because exposing an IPFS node might be unsafe) and replicates the data into mongodb.
copy the confige file and start the docker compose:
cp .env.dist .env
docker network create cln-community
docker-compose up -d
the .env.dist
is the config template while .env
is the actual file used for environment variables. The .env
is gitignored so fill free to tweak it.
Then open localhost:9000 in your browser. The IPFS node needs time to sync, so for the first time part of the data may not be fetched on time. Refresh the browser if this is the case.
For the best experience, stop the client docker container and start it natively as described here.
Optional:
Start a mongodb daemon with default settings.
Start a IPFS daemon with default settings.
ipfs daemon
Then define following environment variables for the server's shell
cp ./server/config/defaults.json ./server/config/local.json
You can edit the ./server/config/local.json
file as you like.
IPFS lacks permissions so all access to the IPFS node is done through the IPFS proxy.
Learn how to install and configure the proxy in the fuse-ipfs-proxy repo.
You can start your own Ethereum node:
geth --testnet --rpc --rpcapi="db,eth,net,web3,personal,web3"
Or use Infura (or other provider) as your provider, just change it in the config file (./server/config/local.json
)
cd
to project's directory, then:
cd server
npm install
npm run dev --NODE_ENV=local
Load the relevant environment variables from the .env file.
cd
to project's directory, then:
cd client
npm install
npm start
If your browser has an MetaMask extension, that should be enought.
Take a look into server/config directory.
If you plan to work only on the frontend you can use our QA servers as a backend infrastucture. For this setup just run:
cd client
npm install
NODE_ENV=QA npm start
Though you still need a web3 provider like MetaMask.
Please open an issue for requests, ideas or bugs.
MIT