This is the front repository of the project 13 of the Openclassrooms' course React JavaScript.
-
Clone the back repository:
git clone https://github.com/Redshark61/Project-13-Bank-API.git
-
Clone the current front repository
-
Install dependencies for both repositories:
npm install
- Create the mongo database using the mongodb website.
- Once done, click on the connect button and choose Drivers.
- Finally, copy the connection string and paste it in the .env file of the back repository.
- Run the back server:
npm run dev:server
- Open a new shell, while the server is running.
- Run the following command:
npm run populate-db
User can log in with his email and password. In order to be logged in, email and password must be valid and present in the database.
User has the ability to remember me in order to stay connected. Beneath are the different possibilities of the login submission:
remember me | Is connected | Action | Result |
---|---|---|---|
true | true | Going from profile -> Home by clicking the logo | User is kept logged in and redirected to the home page |
true | true | Going from profile -> Home by typing the url | User is logged out since the token is not stored in the local storage |
true | false | Going from Home -> Profile by clicking the profile button | User is kept logged in and redirected to the profile page without having to log in |
true | false | Going from Home -> Profile by typing the url | User is redirected to the login page since the token is not stored in the local storage |
false | true | Going from profile -> Home by clicking the logo | User is logged out |
false | true | Going from profile -> Home by typing the url | User is logged out |
false | true | Going from profile -> Home by clicking the logout button | User is logged out |
false | false | Going from Home -> Profile by clicking the sign-in button | User is redirected to the login page |