• Stars
    star
    694
  • Rank 64,992 (Top 2 %)
  • Language
    Clojure
  • License
    GNU General Publi...
  • Created almost 8 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ethlance is the first job market platform built entirely on the Ethereum blockchain. Free to use forever!

Ethlance V.2 (Newlance)

CircleCI

Ethlance Version 2 is Currently in Development and is subject to change before final release

Development

Prerequisites

  1. Node.js >= 16.15.1
  2. Java JDK >= 18 (for Clojure)
  3. Babashka
  4. PostgreSQL (tested with 14.6)
  5. IPFS daemon
  6. Ethereum testnet (e.g. ganache)

Running the system

  1. Start IPFS
  2. Start ganache
  3. Migrate Solidity contracts to testnet: npx truffle migrate --network ganache --reset
  4. Start server build bb watch-server
  5. Start server (to serve the API) bb run-server
  6. Start UI build bb watch-ui
  • this also starts serving the UI assets & smart contract assets on port 6500

First steps, showing example data

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])
  • this will show a pop up and using MetaMask you can create a transaction
  • after doing this successfully the UI graphql requests will have proper Authorization: Bearer ... header

Then 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")
  • for that the test namespace must be included in the server build (e.g. by adding [tests.graphql.generator :as test-data-generator] to ethlance.server.core)
  • alternatively you can submit the data manually through the forms

Tips & troubleshooting

Postgres setup

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;

IPFS Server

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

Contributing

Anyone is welcome to contribute to the ethlance project, here are some brief guidelines:

  • Make sure to squash your commits
  • Reference issue numbers in your pull request
  • Rebase your changes on upstream (git remote add upstream https://github.com/madvas/ethlance.git) master before pushing (git pull --rebase upstream master)
  • Make changes in a separate well-named branch in your forked repo like improve-readme

Overview of workflows

Here's a brief overview of the sequence of actions that different user types can take to create, find and arbiter jobs.

  1. User arrives to the home page
  • http://d0x-vm:6500
  • picks which profile to create (freelancer = candidate, employer, arbiter)
  1. This takes the user to the sign-up page
  1. Employer (having first filled in employer data)
  • http://d0x-vm:6500/jobs/new
  • user can create new job by filling in the form
  • creating a new job requires sending a signed transaction together with the initial funds
  • smart contract method Ethlance#createJob is called and a new copy of Job contract gets deployed
  1. In case the employer invited arbiters during job creation /jobs/new
  • First: arbiter must send their quote (how much they want for their service for this job)
    • ... where can they do it (one or more pages)?
    • script helper: tx-workflow-fns-server-repl/set-quote-for-arbitration
  • Second: employer must accept the quote
    • ... where can they do it (one or more pages)?
    • script helper: tx-workflow-fns-server-repl/accept-quote-for-arbitration
  1. Employer can now invite candidates to participate in the new job
  • NB! implement & provide link
  • results in Job#addCandidate contract send
    • script helper: tx-workflow-fns-server-repl/add-candidate
  1. Candidate can search for available jobs
  1. Candidate chooses a job of interest from search results. To work on it, needs to send proposal
  1. All users can view job contract page at
  1. Candidate can create invoices (for any of their jobs)
  1. Candidate can then raise dispute
  • after raising dispute, arbiter can resolve it on the same page (http://d0x-vm:6500/invoices/new)
    • resolving dispute results in tokens getting transferred according to the resolution amount
  1. Employer can pay invoices
  • ... (add link, implement if needed)

More Repositories

1

district-proposals

Proposals for new districts to be built by the district0x Team.
214
star
2

district0x-network-token

Smart Contracts and web app for district0x contribution
Clojure
131
star
3

cljs-web3

Clojurescript API for Ethereum Web3 API
Clojure
112
star
4

name-bazaar

A peer-to-peer marketplace for the exchange of names registered via the Ethereum Name Service
JavaScript
90
star
5

memefactory

MemeFactory is a platform for the decentralized creation, issuance, and exchange of provably rare digital collectibles on the Ethereum blockchain.
JavaScript
74
star
6

district-ui-graphql

district UI module for GraphQL integration
Clojure
70
star
7

graphql-query

Clojure(Script) graphql query generation
Clojure
69
star
8

re-frame-web3-fx

⚠️ This code now resides at d0x monorepo
Clojure
60
star
9

d0x-INFRA

Tutorials and explanations of d0x-INFRA
39
star
10

district0x-landing-page

A network of decentralized markets and communities. Create, operate, and govern. Powered by Ethereum, Aragon, and IPFS.
HTML
32
star
11

cljs-web3-next

⚠️ This code now resides at d0x monorepo
Clojure
21
star
12

re-frame-window-fx

re-frame effects handlers related to browser window
Clojure
18
star
13

district-voting

district0x dapp for district voting
Clojure
16
star
14

re-frame-spec-interceptors

Reframe event interceptors for validating db and args with spec
Clojure
16
star
15

district-server-smart-contracts

⚠️ This code now resides at d0x monorepo
Clojure
13
star
16

cljs-orbitdb

cljs wrappers for ipfs orbitdb API
Clojure
12
star
17

district-registry

A community-curated registry of marketplaces on the district0x Network.
Clojure
12
star
18

cljs-ipfs-http-client

⚠️ This code now resides at d0x monorepo
Clojure
10
star
19

district-server-graphql

district0x server module for setting up GraphQL server
Clojure
9
star
20

cljs-ipfs-api

ClojureScript IPFS-API wrapper lib
Clojure
8
star
21

district-ui-web3-tx

⚠️ This code now resides at d0x monorepo
Clojure
8
star
22

district-designer

No-code platform for creating full-featured blockchain applications
Clojure
7
star
23

re-frame-google-analytics-fx

A re-frame effects handler for performing Google Analytics tasks
Clojure
7
star
24

re-frame-interval-fx

A re-frame effects handler for setting up intervals
Clojure
6
star
25

district-ui-web3

⚠️ This code now resides at d0x monorepo
Clojure
6
star
26

new_project_template

a template repo to use for new projects
Makefile
6
star
27

lein-solc

Leiningen plugin for compiling solidity contracts
Clojure
6
star
28

district-ui-router

⚠️ This code now resides at d0x monorepo
Clojure
5
star
29

re-frame-ipfs-fx

⚠️ This code now resides at d0x monorepo
Clojure
5
star
30

governance

Proposals for governance of the district0x Network and its districts
4
star
31

district-server-db

⚠️ This code now resides at d0x monorepo
Clojure
4
star
32

district-ui-web3-accounts

⚠️ This code now resides at d0x monorepo
Clojure
4
star
33

district-cljs-utils

Set of functions helpful for working with Clojurescript
Clojure
4
star
34

tcrfactory

JavaScript
4
star
35

survey-memefactory

CSS
3
star
36

district-graphql-utils

Set of functions helpful for working with GraphQL
Clojure
3
star
37

meme-factory-coming-soon

Coming soon page for Meme Factory
CSS
3
star
38

memefactory-contracts

zeppelinos integration of the MemeFactory smart contract suite
JavaScript
3
star
39

bignumber

Wrapper library for bignumber.js
Clojure
3
star
40

StreamTide

An open-source, Web3-based patronage tool amplifying community support for creators through grant matching. Transform small streams into tidal waves of support.
Clojure
3
star
41

district-server-config

⚠️ This code now resides at d0x monorepo
Clojure
3
star
42

hegex

Full-stack options exchange on the EVM platform
Clojure
2
star
43

ethlance-toshi

chat-bot
JavaScript
2
star
44

d0x-libs

district0x libraries (server, browser, shared)
Clojure
2
star
45

cljs-0x-connect

ClojureScript wrapper for 0x Connect library
Clojure
2
star
46

district-parsers

Set of functions helpful for parsing input
Clojure
2
star
47

cljs-solidity-sha3

⚠️ This code now resides at d0x monorepo
Clojure
2
star
48

district-ui-logging

district UI module to set up devtools logging
Clojure
2
star
49

district-ui-web3-account-balances

⚠️ This code now resides at d0x monorepo
Clojure
2
star
50

project-0x-connect-fx

re-frame effects library for cljs-0x-connect
Clojure
2
star
51

d0xperiments

d0x INFRA experiments
Clojure
2
star
52

name-bazaar-coming-soon

Coming soon page for Name Bazaar
CSS
2
star
53

ipfs-docker

ipfs docker images
Shell
2
star
54

district-ui-router-google-analytics

district UI module for reporting page views into Google Analytics
Clojure
1
star
55

district-web3-utils

⚠️ This code now resides at d0x monorepo
Clojure
1
star
56

district-server-web3

⚠️ This code now resides at d0x monorepo
Clojure
1
star
57

district-ui-smart-contracts

⚠️ This code now resides at d0x monorepo
Clojure
1
star
58

district-server-web3-watcher

⚠️ This code now resides at d0x monorepo
Clojure
1
star
59

district-ui-web3-tx-log

⚠️ This code now resides at d0x monorepo
Clojure
1
star
60

streamtide-smart-contract

Solidity
1
star
61

district-server-endpoints

district0x server component for setting up HTTP API endpoints
Clojure
1
star
62

district-format

Set of functions helpful for formatting
Clojure
1
star
63

district-ui-component-active-account-balance

⚠️ This code now resides at d0x monorepo
Clojure
1
star
64

discord-py-bots

Python chatbots for district0x discord
Python
1
star
65

district-server-logging

district0x server component for setting up logging
Clojure
1
star
66

district-sendgrid

⚠️ This code now resides at d0x monorepo
HTML
1
star
67

district-ui-component-active-account

⚠️ This code now resides at d0x monorepo
Clojure
1
star
68

district-ui-component-form

Clojure
1
star
69

district-encryption

Set of functions helpful for data encryption on blockchain based on public/private key
Clojure
1
star
70

FAQs

Self-service documentation to answer frequently asked questions
1
star
71

deployments

Dockerized deployment of districts
Io
1
star
72

district-ui-web3-balances

⚠️ This code now resides at d0x monorepo
Clojure
1
star
73

district-ui-conversion-rates

district UI module for handling conversion rates
Clojure
1
star
74

district0x-facts-db

District0x tools for working with web3 facts events architecture
Clojure
1
star
75

district-ui-reagent-render

⚠️ This code now resides at d0x monorepo
Clojure
1
star