This application provides a simple webpage with two input fields and a send button. It was built using React and CSS (Flexbox and Grid) with Sass. On every keystroke on the username input, a custom Express API checks for matches in the .json files. If a username match is found, the email input cannot be edited, and the form cannot be submited. If no matches are found, however, the user can enter an email wich validates using a native HTML5 function. If the email entered is valid, the form can be submited.
- React.js and Sass (Flexbox and Grid) for the front-end
useReducer()to validate the entire form- Client-side requests with Node's fetch() API
- Express.js for the back-end
This project contains two folders, creatively named "apis" and "web".
Open the "apis" folder, install the dependencies and start the server:
cd ./apis
npm install
npm startYou can change environment variables in the
.envfile to best suit your needs.
Then open the "web" folder and run the same commands:
cd ./web
npm install
npm startAnd that's it. Enjoy!
The content of the project is written in Brazilian Portuguese. It was tested only on Firefox.