-
[react @18.2.0] - A JavaScript library for building user interfaces
-
[typescript @5.0.2] - Strongly typed programming language that builds on JavaScript
-
[tailwindcss @3.3.3] - Utility-first CSS framework for rapidly building modern websites
-
[cypress @13.3.0] - E2E testing framework
-
[vite @4.4.5] - Vite is a frontend tool that is used for building fast and optimized web applications
-
[react-query @4.36.1] - Hooks for fetching, caching and updating asynchronous data in React
-
[react-hook-form @7.47.0] - Performant, flexible and extensible forms with easy-to-use validation.
-
[storybook @7.4.6] - Frontend workshop for building UI components and pages in isolation
-
[@reduxjs/toolkit @1.9.7] - A set of tools that helps simplify Redux development
-
[axios @1.5.1] - Promise based HTTP client for the browser and node.js
-
[react-i18next @23.5.1] - Internationalization-framework
-
πΆ [husky @8.0.0] - Tool that allows us to run scripts especially while using version control like git
-
[react-router @6.16.0] - Routing library for React
-
React-toastify [react-toastify @9.1.3] - React-Toastify allows you to add notifications to your app with ease
-
Yup [yup @1.3.2] - Schema builder for runtime value parsing and validation
1. First of all you need to clone repository from github
git clone https://github.com/Saba-Var/Token-Based-Authentication.git
git clone [email protected]:Saba-Var/Token-Based-Authentication.git
2. Navigate to the repository
cd Token-Based-Authentication
3. Next step requires to install all the dependencies
npm install
4. copy .env.example
and create .env
file.
cp .env.example .env
5. Run application locally from the terminal:
npm run dev
Open localhost:3000 to view it in your browser.
In order to run tests you need start development server with the npm run dev
command.
After that you can run tests with the one of those options:
1. Run E2E tests using the Cypress GUI
npm run cypress:open
2. Run E2E tests in the terminal
npm run cypress:test
In order to run Storybook you need to execute the following command in the terminal
npm run storybook
You will be redirected automatically to localhost:6006
type | Description |
---|---|
feat | add new functionality |
chore | minor changes |
fix | fix any bugs |
refactor | the code quality has been improved without changing the functionality |
docs | improvement/addition of documentation |
tests | write new tests or refactor the existing ones |
wip | working in progress |
Commit example - chore: rename test workflow
chore: rename test workflow
ββββββ ββββββββββββββββββββ
β β
β βββ> Commit message in present tense.
β
ββββββββββ> Commit type: chore, docs, feat, fix, etc.
Branch names are quite the similar to commit types but with different syntax. Example feature branch name fix/password_change_request_redirect_uri
fix/password_change_request_redirect_uri
βββ ββββββββββββββββββββββββββββββββββββ
β β
β ββββββ> Feature branch name written in camel_case
β
ββββββββββ> Feature branch type
1. You need to install following extensions in VS Code Prettier - Code formatter and ESLint
1. open settings Ctrl + comma
2. search for Prettier and then select on save
. Don't forget to choose Prettier package
3. search for Eslint and make sure it is not disabled
4. go to Keymap and search Eslint
5. change the shortcut of FixEslintProblems
ββββ .github
β βββ workflows
ββββ .husky
ββββ .storybook
ββββ cypress
β βββ e2e
β βββ fixtures
β βββ support
ββββ publicΒ
β βββ assets
β βββ locales
β βββ en
β βββ ka
ββββ readme
β βββ assets
ββββ src
β βββ assets
β β βββ images
β βββ components
β β βββ icons
β β βββ layout
β β βββ shared
β β βββ storybook
β βββ config
β βββ data
β βββ hooks
β βββ pages
β β βββ 404
β β βββ account-activation
β β βββ home
β β βββ log-in
β β βββ new-password
β β βββ profile
β β βββ request-password-reset
β β βββ sign-up
β βββ router
β βββ services
β βββ store
β β βββ slices
β β βββ store.ts
β βββ types
β βββ utils
β βββ validation
β βββ env.d.ts
β βββ index.css
β βββ main.tsx
βββ .env
βββ .env.example
βββ .eslintrc
βββ .gitignore
βββ .prettierrc
βββ cypress.config.ts
βββ i18n.ts
βββ index.html
βββ package-lock.json
βββ package.json
βββ postcss.config.js
βββ README.md
βββ tailwind.config.js
βββ tsconfig.json
βββ tsconfig.node.json
βββ vercel.json
βββ vite.config.ts
- Production: token-based-authentication-demo.vercel.app
- Backend API base uri: token-based-authentication-api.vercel.app