/b2bit-app

Desafio técnico da B2Bit

Primary LanguageTypeScript

b2b-app

This project is a website that implements a login page, consuming an API and then showing a page with the user informations. This project is part of the b2bit company challenge.

https://b2bit-app.vercel.app/

How to run locally

git clone https://github.com/noefernandes/b2bit-app.git
cd b2bit-app
npm install
npm run dev

The result

The following screenshots show the final state of the site's pages, paying attention to responsiveness for both desktops and smartphones.

Image 1 Image 2

Details of the project's non-functional requirements

Checklist Done
Typescript
ReactJS
React Router
Formik
Interceptors
Unit Tests
Component Tests
e2e Tests
TailWind
Deploy

About the tests:

  • Unit tests were performed using the library Vitest, while e2e and component tests were performed using Cypress.
  • A github actions pipeline runs the application build and testing process with each push.

The application is deployed to Vercel with each push.

Functional requirements

1. As a user, I want to have a sign in page, so I can have access to my profile

Users can authenticate using their credentials, meanwhile the jwt tokens are stored in the browser's local storage.

video 1 (online-video-cutter com)

2. As a user, I want the system to keep me signed in, so I don't need to put my credentials every time I open the system

As the access is still on the browsers local storage, the user does not need to login. The application will always allow the user access while the token is still valid.

video 2

3. As a user, I want to have a feedback if I fill the wrong credentials, so I know that I did something wrong and I can fix it

In this case, formik deals with form errors, while submission errors are validated by an application function that expects to receive a valid access token.

video 3

4. As a user, I want to have a home page with my profile, so I can see my personal info

The following gif shows the user page with all user informations displayed. Also you can see that the tokens were registered after the login.

video 4

5. As a user, I want to have a logout button, so when I am finished, I can log out of my account

The logout functionality works fine as well. After pressing the logout button, you can see that the tokens are removed from local storage and now the user needs to authenticate again if he wants to use the site.

video 5

Contributors

  • Noé Fernandes