/react-base

🚧 work in progress

Primary LanguageTypeScript

🚧 work in progress 🚧

warning: People are still working here. The features in this repository may not be completed and bugs can be found.


NodeJS Webpack Babel ESLint ReactJavaScript TypeScript Jest Testing-Library Styled Components Nginx Visual Studio Code Git

🔍 React Base

example workflow Netlify Status

📖 Tabe of contents

  1. 💡 Motivation
  2. 📋 Requirements
  3. 🛠️ Installation and usage
  4. 🗂️ Component Structure (general)
  5. 🧑🏻‍💻 Contributing

Motivation

Intro:

The main objective of this repository is to be used as a template-like to your react projects with many technologies already setted up from scratch.

Fork this repository and start working over it...

Technologies used:

Requirements

  • NodeJs
  • yarn
  • nvm

or

  • docker
  • docker-compose

Installation and usage

Create a copy .env file from .env.example and populate the variables.

cp .env.example .env

Using yarn

Using nvm? change local node version to project's node version on .nvmrc.

nvm install

Install dependencies:

yarn install

Run project on development mode:

yarn dev

Open new browser window on localhost:4000.

Run unit tests:

yarn test

Run linter:

yarn lint

Build for production:

yarn build

Start server with built code:

yarn start

Using Docker

create a docker network:

docker network create react-base

build image:

make build

Run project on development mode:

make up

Open new browser window on localhost:4000.

stop container:

make down

Run unit tests:

make test

Run linter:

make lint

Component Structure (general)

└─ component
    ├─ component.container.tsx
    ├─ component.schema.ts
    ├─ component.styles.tsx
    ├─ component.tsx
    └─ types.ts

Contributing

Follow the next steps to contribute

Branch names

Name your branch with a meaningful name that represents the changes you have done.

Examples:

chore/updating-changelog
fix/user-authentication
feat/add-card

Commit messages

Use the format {type}({scope}): {message}.

Eg: feat(login): added remember me.

See conventional commit guideline.