edgarinhm / ols-react-challenge

Apache License 2.0
0 stars 0 forks source link

React Project Manager + TypeScript + Vite

This project was bootstrapped with Vite.

In a nutshell

This app works as a handmade template for React Typescript.

Design can be found in: SKYDASH TEMPLATE.

Usage

Development

Env File

You are going to need a .env file like this one:

VITE_API_HOSTNAME=http://your-api-url.com

Environment variables

Technologies

Tech Description
React 18 Fast, composable client-side components.
React Router 6 A complete routing library for React
Zustand Enforces unidirectional data flows and immutable, hot reloadable store. Supports time-travel debugging.
Vitest Automated tests with built-in expect assertions and Enzyme for DOM testing without a browser using Node.
ESLint Lint JS. Reports syntax and style issues. Using eslint-config-airbnb for the airbnb style guides.
SASS Compiled CSS styles with variables, functions, and more.
Custom UI/CORE Custom UI/CORE is the components & styles library to build user interfaces

Testing framework

React Testing Library Testing Library documentation

Available Scripts

In the project directory, you can run:

npm dev

Runs the app in the development mode.\ Open http://localhost:3000 to view it in the browser env file config.

The page will reload if you make edits.\ You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.\ See the section about running tests for more information.

npm build

Builds the app for production to the build folder.\ It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\ Your app is ready to be deployed!

See the section about deployment for more information.

More info

React, Design, and Data Standards

Naming Conventions

Date Standards

CSS Standards

Testing Standards

React Testing Library Good-to-Knows

Folder structure

├── dist                    # Compiled files (auto-generated)
├── node_modules            # Node libraries (auto-generated)
├── public                  # Config files, images
├── src                     # Source files
|   ├── common              # Reusable components (e.g., modals, styles, buttons, dropdowns...)
|   └── components
|       ├── body
|       |   ├── page        # Specific page of the app (e.g., user, role, project)
|       |        ├── components   # component/folder (e.g., project.tsx)
|       |        |    ├── sub-components   # sub-component(s)/folder(s) (e.g., reports.tsx)
|       |        |    ├── stylesheets      # styles for the component (e.g., reports.module.scss)
|       |        |    └── tests            # Unit testing (e.g., reports.test.tsx)
|       |        ├── stylesheets  # styles for the component (e.g., reports.module.scss)
|       |        └── tests        # Unit testing (e.g., reports.test.tsx)
|       └── other-layout-segments
|           └── components
|           ├── stylesheets  # styles for the component (e.g., reports.module.scss)
|           └── tests        # Unit testing (e.g., reports.test.tsx)
├── configuration-files
├── package.json
└── README.md

Deployment CI/CD

Demo: