Demo application developed for security module of PASHA Coding Bootcamp in 2020. The goal was to demonstrate different approaches to registration, authorization, and authentication mechanisms on a website. At the same time, the application should not be complete, so students could not use the provided code for their projects.
The source code and the application itself were used for live stream for students.
If you want to run the application, you can do the following:
git clonethe repository- Run
npm install - Build application with
npm run build - In two different windows:
- Start back-end part with
npm run server - Start front-end part with
npm run start
- Start back-end part with
After the successful execution the application should be available at http://localhost:3000
Back-end REST API should be available for calls from a REST client at http://localhost:3001
Back-end provides a number of REST API endpoints. Some of them are not used by the front-end and are only accessible by Insomnia, Postman, or similar client. That was done intentionally for educational purposes.
Expects user credentials JSON body:
{
"login": "...",
"pass": "..."
}
Returns login on successful registration.
Expects user credentials JSON body:
{
"login": "...",
"pass": "..."
}
Returns login on successful authentication and set token cookie.
Returns list of credits. Authentication is not required.
Returns one credit by provided id. Authentication is not required.
Creates a new credit. Expects following JSON body:
{
"name": "...",
"purpose": "...",
"sum": "...",
"date": "..."
}
Returns new entity on success or 401 status on invalid authentication.
Creates a credit by id.
Returns deleted entity on success or 401 status on invalid authentication.
- React 16 (documentation)
- Express 4.17 (documentation)
- Insomnia
- Postman