Link Search Menu Expand Document

A tool known as Create React App (documented at can be used to create a new React web application.

Here’s how you use it:

npx create-react-app my-app-name

This create a new directory my-app-name that is also a git repo (note: plain git, not GitHub, though you can link it to a GitHub repo by defining a remote). This repo contains the code for a basic React app.

The repo contains an example of the application you get by running the sequence of commands:

npx create-react-app demo-cra-plain
cd demo-cra-plain
git remote add origin
git checkout -b main
git push origin main

The only modification is to add a few lines to the top of the explaining this fact.

The file in that repo explains how to start up the application on http://localhost:3000.

Modified versions of the Create-React-App base

The staff of CMPSC 156 have created several modified version of the basic Create React App application that illlustrate how to incorporate additional conventions and tools into the basic structure.

  • adds:
    • directory structure with everything in frontend so that it can live inside a repo that follows Maven directory conventions
    • has a directory structure mirroring that of Maven (with separation of main and test) for consistency between front and backend code.
    • has GitHub actions scripts for tests (Jest), test coverage (also Jest), and linting (ESLint).

Later versions also add

  • Storybook
  • Stryker Mutation testing