Ethlance is the first job market platform built entirely on the Ethereum blockchain. Free to use forever!
GPL-3.0 License
Ethlance Version 2 is Currently in Development and is subject to change before final release
npx truffle migrate --network ganache --reset
bb watch-server
bb run-server
bb watch-ui
6500
In order for the front-end to be able to have the JWT token (kept in LocalStorage), you must sign a transaction. Currently it can be done manually. Open REPL for UI:
lein repl :connect 54200
(shadow/repl :dev-ui)
(in-ns 'ethlance.ui.event.sign-in)
(re/dispatch [:user/sign-in])
Authorization: Bearer ...
headerThen to generate some example data you can use server REPL:
lein repl :connect 54100
(shadow/repl :dev-server)
(in-ns 'tests.graphql.generator)
(generate-for-address "0xafcf1a2bc71acf041c93012a2e552e31026dfeab")
[tests.graphql.generator :as test-data-generator]
to ethlance.server.core
)Start postgres console psql -d postgres
CREATE USER ethlanceuser WITH ENCRYPTED PASSWORD 'pass';
CREATE DATABASE ethlance WITH OWNER ethlanceuser;
-- alternatively if you created the database earlier, give access with:
GRANT ALL PRIVILEGES On ethlance TO ethlanceuser;
Might require additional configuration for CORS if IPFS is running on a different host
ipfs config --json Gateway.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST", "OPTIONS"]'
ipfs config --json Gateway.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
ipfs config --json Gateway.HTTPHeaders.Access-Control-Allow-Headers '["X-Requested-With"]'
ipfs config --json Gateway.Writable true
The ethlance smart contracts should (for now) be deployed manually. As a result of the compilation process, the environment specific clojure files with contract addresses get written (e.g. shared/src/ethlance/shared/smart_contracts_qa.cljs
for QA) and must be committed to git to make them available for deployment of browser & server applications.
During clojure application deployment (browser, server), the contracts must only be compiled, which will generate JSON ABI files under <ethlance-root>/resources/public/contracts/build/
Compilation:
ETHLANCE_ENV=qa npx truffle compile
(replacing the network with one suitable for the env)<ethlance-root>/resources/public/contracts/build/
[:smart-contracts :contracts-build-path]
http://d0x-vm:6500/contracts/build/TestToken.json
To build Server (consists mainly of graphql API):
export ETHLANCE_ENV=qa
clj -A:dev:shadow-clj release dev-server
out/ethlance_server.js
(and accompanying ethlance_server.js.map
source map)ETHLNCE_CONFIG_PATH
at EDN path [:smart-contracts :contracts-build-path]
Running server:
:config :env-name
. As for now it is ETHLANCE_CONFIG_PATH
./config
endpoint from a location pointed to ENV variable UI_CONFIG_PATH
(contents loaded at run time from the file system). Thus, starting the server:export ETHLANCE_ENV=qa
export SERVER_CONFIG_PATH=/path/to/server-config-qa.edn
export UI_CONFIG_PATH=/path/to/ui-config-qa.edn
node out/ethlance_server.js
export ETHLANCE_ENV=qa
clj -A:dev:shadow-clj release dev-ui
<ethlance-root>/ui/resources/public/main.js
<ethlance-root>/ui/resources/public
/contracts/build/<ABI JSON FILE>.json
(e.g. /contracts/build/Ethlance.json
)Anyone is welcome to contribute to the ethlance project, here are some brief guidelines:
git remote add upstream https://github.com/madvas/ethlance.git
) master before pushing (git pull --rebase upstream master
)improve-readme
Here's a brief overview of the sequence of actions that different user types can take to create, find and arbiter jobs.
Ethlance#createJob
is called and a new copy of Job
contract gets deployed/jobs/new
tx-workflow-fns-server-repl/set-quote-for-arbitration
tx-workflow-fns-server-repl/accept-quote-for-arbitration
Job#addCandidate
contract send
tx-workflow-fns-server-repl/add-candidate
JobStory
is created (DB model to track this user's interaction with this job)