npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

conversion-flow

v1.18.1

Published

Conversion flow is a web application that an Avon applicant is redirected to via email or SMS to verify their information and accept Avon terms and conditions.

Downloads

2

Readme

Conversion Flow

AVON Recruitment Program - Conversion Flow

Conversion flow is a web application that an Avon applicant is redirected to via email or SMS to verify their information and accept Avon terms and conditions.

Available Scripts

    npm run dev
    npm run start
    npm run start:docker
    npm run build
    npm run build:env:dev
    npm run build:env:prod
    npm run storybook
    npm run storybook:build
    npm run test
    npm run test:coverage
    npm run test:clear
    npm run lint
    npm run lint:fix
    npm run create-component

Install

npm i

Run local dev server

First update your .env.development file with a valid API URL and default Access Token.

npm run dev

Build production ready app and run it

npm run build npm run start -p $PORT

Run storybook locally

Using storybook you can take a look at all the different components we have created for Avon Grow. -> With storybook you can interact with a component and see how it works -> Using knobs you customise the components and see how different scenarios will act out

`npm run storybook`

Once storybook is running you can access it through port 6006 - http://localhost:6006/

Run linting checks (without and with fixing errors)

npm run lint # Done by ESLint
npm run lint:fix # Done by ESLint

## Git

update your local branch with master and replay your changes on top. makes for cleaner git history.

git pull --rebase origin master

Development mode.

Conversion flow needs to receive certain querystring parameters

Open http://localhost:3000/RU/ru?link=8734534543 to view it in the browser.

  • market, language, and device are the same as PRP/MRA
  • link is the unique email token provided by RGA

Dockerised setup

We have created a docker-compose within this repo that will spin up both MRA and RGA within Docker. It supports hot reloading of the code, and uses a lightweight container approach for local development.

Run using:

docker-compose up

Kill using:

docker-compose down

We have also created a dockerfile that will be used for deployments throughout the different Azure environments.

You can build it using:

docker build -t conversion-flow .

and run it using:

docker run -p 3000:3000 conversion-flow

We're currently investigating using environment variables at runtime, which will vastly speed up the deployment and pipeline process, and make it much more stable.

### runtime env vars

verify docker-compose config

docker-compose -f docker-compose.yaml config

to start from the address step visit: http://localhost:3000/RU/ru?link=877773a9-b6e8-47f9-a8a8-157f0a853987

Husky and lint-staged

Git good at git:

pre-commit hook working with .git partially staged files and hunks via lint-staged

Commit only part of a file

lint-staged

Testing

This project mainly uses React Testing Library to create the Unit Tests. The tests run through the Jest testing framework. Note: Some Enzyme testing is used for certain tests that aren't applicable for RTL.

You can run the tests by using npm run test. You can run the test and get coverage at the same time by using npm run test:coverage.

  • If you do this, you can see a report of the percentage of test coverage inside:
    • coverage -> lcov-report -> index.html

In this project we have a requirement for 100% test coverage.

Each file or component needs to have been tested completely before you can commit code to the repo.

Local DNS

To simulate the domain location (.ru, .co.uk etc.) you will need to add a host mask to your etc host file

This can be done by doing the following in your terminal: sudo nano /etc/hosts

Below all of the current entries, add the following line: 127.0.0.1 reg.nabor.avon.ru. Make sure the local.reg.avon.ru bit lines up with the other items in the column.

Now go to http://reg.nabor.avon.ru:3000/RU/ru?link=877773a9-b6e8-47f9-a8a8-157f0a853987. This will allow you to test locally with .ru in the url.

UI Guideline

UI Guidelines, styleguide and examples are available at: https://app.zeplin.io/project/5cc068f9866b9b265424dddb/dashboard

Branch naming

This repository consists only of a master branch, with no develop branch. All new code should be merged straight to master from the branches.

Branch names should follow the [feature]/[category]/[jira ticke tnumber]-name-with-dashes convention. The names should explain the purpose of the branch.

The categories are:

  • major - Breaking changes, large new features
  • minor - Features being added or expanded
  • patch - Resolving bugs or broken functionality

For example: feature/minor/avrp-1-button-component