0.9.0 • Published 2 years ago

@r3l/app v0.9.0

Weekly downloads
103
License
MIT
Repository
github
Last release
2 years ago

Relevant

This is the monorepo for the Relevant app. The repo includes server code, website and react-native apps.

Running the Web Version:

install npm dependencies

npm install

rename .envExample file to .env

install MongoDB to run a local version of the database

start the mongod instance

npm run startDB

uncomment #SEED_DB in .env in order to populate the database with some initial data on startup. (Don't forget to comment out the line, otherwise the database will be cleared each time)

run dev version (offers hot reloading):

npm run dev

navigate to localhost:3000

some user accounts you can use on the local db: username / password alice / test bob / test carol / test

(alice has global admin priveleges)

to stop the mongod instance, run

npm run stopDB

Production Build

build the production js bundle:

npm run build

test the build in production-like environment (client uses built bundle, offers faster server reloads, but client code won't reload)

npm run native

Tests

run tests (runs both client and server tests)

npm run test

run tests in watch mode (runs both client and server tests)

npm run test:watch

Running Native Code:

install Relevant's packages

npm install

rename app/.publicenvSample.js file to app/.publicenv

install Pod files of ios

cd ios
pod install

start the app

npx react-native start

Talking to contracts from react

This repo uses Statesauce for web3 managagement, contract interactions, caching, and side-effects. Initialized in app/core/contracts.js and consumed by files in app/modules/contract/ which contain the reusable hocs, hooks, helpers, and propTypes for talking to Relevant Token contracts in a reliable way while staying synced to a strictly-defined reactive data store.

app/modules/contract/contract exports hooks and selectros that expose a RelevantToken-specific implementation of Statesauce's read/write semantics.

The mapDispatch function cacheMethod is used for pure contract methods that don't mutate contract state in anyway. It takes arguments method and args, and dispatches an action to announce a requested contract call, updating the store, and triggering the saga that makes the contract call that ultimately updates the store with the result.

The mapState function methodCache runs selector functions that derive state from the store for the method specified. It will force an update to the react component whenever any of the arguments or store keys change. It's the compliment to cacheMethod that tells you what's going on - it does reading, whereas cacheMethod does writing.

@apollo/react-hooks@babel/plugin-syntax-flow@babel/runtime@emotion/react@emotion/styled@ethersproject/abstract-signer@ethersproject/bignumber@ethersproject/contracts@ethersproject/providers@ethersproject/units@loadable/component@metamask/inpage-provider@r3l/common@theme-ui/color@theme-ui/components@types/bs58@web3-react/core@web3-react/injected-connector@webscopeio/react-textarea-autocompleteapollo-cache-inmemoryapollo-clientapollo-linkapollo-link-contextapollo-link-httpapollo-link-schemaapollo-link-wsapollo-utilitiesawesome-debounce-promiseaws-sdkbabel-plugin-react-native-webbase-64body-scroll-lockbs58buffercheeriocheerio-without-node-nativecompressioncompression-webpack-plugindata-uri-to-bufferdayjsdayjs-precise-rangedebugdotenvdripsyexifreaderfinal-formgraphql-taghistoryimmutablejest-environment-jsdom-sixteenjwt-decodelernalinkify-itlinkifyjsmd5memoizeemomentmulticodecmultipartynormalizrpathpellpost-message-streamprop-typesqrcode.reactquery-stringqueueraw-loaderreactreact-activityreact-artreact-burger-menureact-domreact-dropzonereact-facebook-pixelreact-final-formreact-gareact-isreact-markdownreact-mdereact-native-markdown-displayreact-native-webreact-native-web-linear-gradientreact-native-web-svgreact-primitivesreact-reduxreact-routerreact-router-configreact-router-domreact-selectreact-smartbannerreact-textarea-autosizereact-toastifyreact-tooltipreduxredux-auth-wrapperredux-formredux-socket.ioredux-thunkrequestreselectsocket.io-clienttwittertype-festtypescriptuniversal-cookievoucher-code-generatorwhatwg-fetch
0.9.0

2 years ago

0.8.5

2 years ago

0.8.4

2 years ago

0.8.6

2 years ago

0.7.16

2 years ago

0.8.1

2 years ago

0.8.3

2 years ago

0.8.2

2 years ago

0.7.11

2 years ago

0.7.10

2 years ago

0.7.13

2 years ago

0.7.15

2 years ago

0.7.14

2 years ago

0.7.9

2 years ago

0.7.8

2 years ago

0.7.2

2 years ago

0.7.4

2 years ago

0.7.3

2 years ago

0.7.6

2 years ago

0.7.5

2 years ago

0.7.7

2 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.19

3 years ago

0.4.17

3 years ago

0.4.16

3 years ago

0.4.15

3 years ago

0.4.14

3 years ago

0.4.13

3 years ago

0.4.12

3 years ago

0.4.10

3 years ago

0.4.11

3 years ago

0.4.9

3 years ago

0.4.8

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.1

3 years ago

0.4.2

3 years ago

0.4.0

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.3.0-alpha.3

3 years ago

0.3.0-alpha.2

3 years ago

0.2.1

3 years ago

0.3.0-alpha.1

3 years ago

0.2.0

3 years ago

0.1.46

4 years ago

0.1.45

4 years ago

0.1.44

4 years ago

0.1.43

4 years ago

0.1.42

4 years ago

0.1.41

4 years ago

0.1.40

4 years ago

0.1.39

4 years ago

0.1.38

4 years ago

0.1.37

4 years ago

0.1.36

4 years ago

0.1.35

4 years ago

0.1.33

4 years ago

0.1.32

4 years ago

0.1.31

4 years ago

0.1.30

4 years ago

0.1.28

4 years ago

0.1.27

4 years ago

0.1.23

4 years ago

0.1.24

4 years ago

0.1.25

4 years ago

0.1.26

4 years ago

0.1.22

4 years ago

0.1.21

4 years ago

0.1.20

4 years ago

0.1.19

4 years ago

0.1.18

4 years ago

0.1.17

4 years ago

0.1.16

4 years ago

0.1.15

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.4

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.39

4 years ago

0.0.37

4 years ago

0.0.36

4 years ago

0.0.35

4 years ago

0.0.34

4 years ago

0.0.33

4 years ago

0.0.32

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.26

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.20

4 years ago

0.0.21

4 years ago

0.0.19

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.18

4 years ago

0.0.14

4 years ago

0.0.15

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.8-alpha.0

4 years ago

0.0.7-alpha.0

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago