Skip to content

CheesecakeLabs/cupcaker-web-challenge

Repository files navigation

CupcakerChallenge

This project was bootstrapped with Create React App using the Typescript template.

Project Architecture

You can check the project architecture here

Requirements

We suggest use of NVM to manage your node versions.

Getting Started

Env vars config

The environment variables are in src/config. You can use the .env.example as a base to create your .env.local config file

Install dependencies

npm install

Running in development environment

npm run start:dev

The project will be running at http://localhost:3000/

Running tests

  • We use the React Testing Library to develop our tests.
  • You can use the MSW to mock your request to do integration tests in your pages.
    • An example is available at src/tests/request_mocks
npm run test

Creating a production build

The following command will generate an optimized production build. The statics files will be generated at build/ folder.

npm run build

You can read more about how to serve the statics here

Storybook

This boilerplate already has the storybook configured with some addons.

  • The storybook's configs are in the .storybook directory.

How to run it

  • To run the storybook at development version, you can use the command:

    • npm run storybook
    • The command above must open your browser at [http://localhost:6006]
  • How to build it for production:

    • npm run build-storybook
    • A directory with name storybook-static will be generated with all storybook statics.

Scripts

In the project directory, you can run all of react-scripts commands.

Learn More

To learn React, check out the React documentation.