Skip to content

Make Forter onboarding easy to understand and fun

License

Notifications You must be signed in to change notification settings

lirown/onboarder

Repository files navigation

This project is currently in development.

CI Built with onborder-starter

🦸‍♀️ Onborder

onborder is the official platform to expose how we do merchant onboarding @ Forter.

onborder

👨‍🏭 Installing

Clone from the current repo and then run the following command inside the root folder:

npm i

🧙‍♂️ CLI

npm are included as follows:

  • build runs build command to pack onborder
  • start runs client using rollup in the root directory
  • test runs the unit and e2e test suites
  • lint runs ESLint with --fix flag to fix problematic patterns in code. Ignore warnings.
  • format runs prettier with --fix flag to auto format code.
  • coverage runs nyc to produce a test coverage report
  • check-outdated runs david which check if package npm dependencies are out of date
  • check-vulnerabilities" runs nsp which check if package npm dependencies have security issues

👨‍🏭 Installing

Clone from the current repo and then run the following command inside the root folder:

npm i

🤵 Directory Layout

├─ images/
├─ patches/
├─ server/
├─ client/
│  ├─ components/
│  │  └─ ···
│  ├─ helpers/
│  │  ├─ page-element.js
│  │  └─ ···
│  ├─ pages/
│  │  ├─ page-home.js
│  │  └─ ···
│  ├─ router/
│  │  └─ routes.js
│  └─ config.js
├─ app.js
├─ app.css
├─ index.html
├─ manifest.webmanifest
├─ package.json
├─ robots.txt
├─ rollup.config.js
└─ tsconfig.json

👩‍💻 Using locally

This command serves the app at http://localhost:8000:

    npm start

👨‍⚕️ Linting

ESLint comes already installed, extending eslint-recommanded. Don't forget to install the appropriate plugin for your editor.

 npm run fix-lint

👨‍🔬 Testing

Testing is done using mocha and chai. chai-as-promised is included to test promise-based code. Mocks, stubs, etc. can be done using sinon. nock is used to test HTTP requests. Nock also disables your app from performing any HTTP requests during tests (see test/setup.js).

There are examples for each library in test/foo.spec.js.

npm test

🚀 Deployment

The service knows to auto-deploy itself using firebase automatically. If you still need to manually deploy, run the following commands:

  1. Globally install firebase tools:
npm install -g firebase-tools
  1. Run in root folder:
npm run build
  1. Run in root folder:
firebase deploy

Alternatively to 3, you could also make a preview, which is parralel to the production deploy and will be auto-deleted.: Note this is a beta feature and will later on be automatically created in PRs.

firebase hosting:channel:deploy YOUR_PREVIEW_NAME_HERE

💂 Coverage

Istanbul is used to produce a test coverage report. Look inside the coverage folder after running npm run coverage to see the results.

npm run coverage

👨‍🚀 Deploying

The app will be deployed to Github pages once merged to main branch

About

Make Forter onboarding easy to understand and fun

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published