React + Typescript + Next.js
Frontend that allows borrowers to apply for loans from a pool of lenders, if they can bring one or more supporters willing to derisk the loan by lending at less favorable terms and taking the first loss in case of partial defaults Product Demo
Check out branch /algorandCore for our algorand-integration:
(DEPRECATED:)
full diagram here diagram
example.env.local
to .env.local
and fill in the necessary env vars. At least one authentication provider is needed.yarn dev
to start serverModify package.json
to debug: "dev": "NODE_OPTIONS='--inspect' next",
Can't change source after debug has started.
Debugging test example:
node --inspect node_modules/.bin/jest "--testPathIgnorePatterns=[]" --watch --runInBand tests/src/scenarios/simple.integration.test.ts
docker-compose stop swarmai
and run the usual make dev-api
/src/gql/queries/<query_type>/<query_name>.graphql
yarn graphql-codegen
cd tests; make test
cd tests; make test-watch
To use the swarmai docker, you will first need to login to github package repository as described here.
cat ~/TOKEN.txt | docker login https://docker.pkg.github.com -u USERNAME --password-stdin
Linting automatically happen during commits. We use husky and lint-staged to achieve that. Configuration in package.json
To run manually:
yarn eslint .
yarn build
If there are changes to migrations, make sure the down migration file works well.
To automatically create seeds from the current db state:
hasura seeds create user_seed --from-table user
hasura seeds create loan_request_seeds --from-table loan_requests
etc.