Giter Site home page Giter Site logo

zap-tech / recipebounty Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 131 KB

dApp for placing bounties on cooking ideas, an example project

Makefile 22.17% Clojure 69.98% HTML 4.85% JavaScript 3.01%
district0x blockchain clojurescript figwheel-main nodejs

recipebounty's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.