Skip to content

dApp for placing bounties on cooking ideas, an example project

Notifications You must be signed in to change notification settings

Zap-tech/RecipeBounty

Repository files navigation

Recipe Bounty - Prove that good taste!

https://travis-ci.org/Zap-tech/RecipeBounty.svg?branch=master

A example ethereum dApp project employing district0x technologies.

1 Development

1.1 Getting Started

1.1.1 Prerequisites

Requires a Linux or MacOSX Environment. This might change in the future.

1.1.2 First-time Setup

make init

1.2 Starting the Environment for Server Development

Server-side requires ganache-cli, so in a terminal run:

$ ganache-cli

Then from another terminal:

$ make dev

This should bring up a clojure repl. While in the clojure repl:

(start!) ;; Starts builds for both the server and ui.

At this point, you will want to deploy the smart contracts for the ganache-cli testnet:

(cljs-server) ;; Connect to CLJS-Server Repl

;; Wait for the CLJS-Server Repl to instantiate...

(deploy!)

2 Starting the Environment for UI Development

Client-side requires the same facilities as the server-side until release. After you follow the steps suggested:

Exit the CLJS-Server Repl

:cljs/quit ;; Brings you back to the Clojure Repl

Connect to the CLJS-UI Repl

(cljs-ui) ;; Connect to the CLJS-UI Repl

;; Open a local browser at http://localhost:9500 to connect

(open-tests) ;; Open a separate browser tab for the test runner

3 Testing

3.1 UI

Browser UI tests run along-side the main development server, and can be accessed at http://localhost:9500/test-runner.html when the dev-ui build is active.

3.2 Server

Run Server Tests with make test

Alternatively, you can run the server tests from the CLJS-Server Repl development environment with (run-tests)

4 Distributing

To make a production build:

$ make build

Building does several things:

  • Makes a production build of the browser UI code, and places it in ./dist/resources/cljs-out/
  • Makes a production build of the node server code, and places it at ./dist/rbounty_server.js
  • Copies the ./resources to ./dist/resources
  • fixes the index.html file to reference the appropriate browser code.

The Production Build can be run as:

$ cd ./dist
$ node rbounty_server.js

5 Future Changes

  • use `docker compose` to simplify development even more
  • will be including additional technologies as seen fit for the dummy project.
  • re-use this dummy project to generate district templates.