Skip to content
This repository was archived by the owner on Dec 17, 2021. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,49 @@

If you start working on an issue please assign it to yourself.

If you need help, please drop a message in `#project-drecruit` channel on Discord.

### Local dev environment setup

Clone the repo and follow these steps to get started with developing locally:

```bash
cd decruit

# Install dependencies
yarn install

# Copy the contents of .env.example to .env
cp packages/react-app/.env.example packages/react-app/.env
cp packages/backend/.env.example packages/backend/.env

# Generate a ceramic seed and copy it to the react app's .env
yarn ceramic

# Copy the contract's address to the backend's .env (the contract is deployed on the Mumbai testnet)
CONTRACT_ADDRESS=0x9486cB9438b3279D70c55681B41bf50b5c537Aa4

# (OPTIONAL) If you want to develop on the localhost network, do this:
yarn chain
yarn deploy --network localhost --reset
CONTRACT_ADDRESS=<deployed_contract_address> (in the backend .env)

# In the backend .env, set the following variables:
RPC_URL=https://rpc-mumbai.maticvigil.com/ (or you can get one from infura)
DB_URL=<any mongodb url> (you can run mongodb locally or get a free DB from MongoDB atlas)

# Grab a free token from https://web3.storage and set it in the React app .env
WEB3STORAGE_TOKEN=<your token>

# Start the backend
cd packages/backend
yarn install
yarn dev

# Start the React app (make sure you're at the root of the repo)
yarn dev
```

### Redeploying the contracts on Mumbai

```bash
Expand Down
11 changes: 6 additions & 5 deletions packages/backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
PORT=5000
COOKIE_NAME=drecruit-session
DB_URL=mongodb+srv://username:password@clusterurl/dbname?retryWrites=true&w=majority
# Generate your own keys using node crypto
COOKIE_KEY=5d8400bb232c1e7f38feadcac54e04aba5cd123b2047c2fdc3a1496d144fff89
DID_KEY=d13c018fd5c4d336f67b986d88f98baced3e071e2faedc58e7e1373b2c638cb6
CONTRACT_ADDRESS=
RPC_URL=
DB_URL=
CONTRACT_ADDRESS=0x9486cB9438b3279D70c55681B41bf50b5c537Aa4
RPC_URL=https://polygon-mumbai.infura.io/v3/REPLACE_WITH_YOUR_INFURA_ID
PORT=5000
HOST=localhost
8 changes: 0 additions & 8 deletions packages/backend/.example.env

This file was deleted.