Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

smakosh/CRA-boilerplate

Repository files navigation

CRA boilerplate

Getting started

1- Clone the repository

git clone [email protected]:smakosh/CRA-boilerplate.git

2- Create an account on the following platforms if you'd like to use them

  • Google Recaptcha
  • Google Analytics
  • Twitter
  • Sentry
  • Vercel (Highly recommended to deploy your React app smoothly)

3- Create your .env file locally on dev environment

cp .env.development.template .env

Installation and kickstart

4- Install dependencies using Yarn

yarn

5- Start your React app

yarn start

Features

  • Uses a feature based file structure
  • Context API used effectively following Kent C. Dodds's article
  • Reusable logic with React hooks
  • UI elements separated from the features, so that you can push them as an UI library on NPM in the future as your project grow and you start to export features as their standalone apps
  • Authentication already built in
  • Code splitting of your Authenticated/Unauthenticated routes using Supense and React.lazy
  • Helpers functions
  • SEO component ready and configured for you
  • Interfaces per feature

TODO

  • Add react-query to handle server state
  • Replace useFetchUser with a useQuery
  • Move to cookies
  • Setup React testing library
  • Setup Cypress
  • Setup Ontwik-UI with react-flex-ready
  • Include the full auth flow with reset and forgotten password

License

This project is licensed under the MIT License - see the LICENSE.md file for more details