Skip to content

pure-js/auth-components

Repository files navigation

React Auth Components

Tech Stack

Core

  • React
  • TypeScript
  • Vanilla Extract CSS (best of CSS-in-JS and css modules combined)

Bundling

  • Vite

Links

Storybook published to Chromatic with UI components

App Deployed as Static SPA

Available Scripts

In the project directory, you can run:

Please note that we are using pnpm but you can also use npm and everything will work fine, just a bit slower

pnpm start

Runs the app in the development mode.
Open http://localhost:5173 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

pnpm test | Not working at the moment - please check back later

Launches the test runner in the interactive watch mode.\

pnpm run 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!

CSS naming convention

/*-- For CSS Modules --*/

.beautiful_input {} /* Block */
.beautiful_input.ivalid_txt {} /* Element */
.beautiful_input.m_invalid {} /* Modificator */
.beautiful_input.--large {} /* Size Modificator */

ESLint Notes

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
   parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json'],
    tsconfigRootDir: __dirname,
   },
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list