ToDo App with 2 roles: manager and employee
The project has Front-End and Back-End
To start the app:
Consult README in db folder to spin up Postgres and connect to the server
- git clone https://github.com/codalife/roletodo.git
- Install yarn if not installed alredy: npm install -g yarn
- Run yarn to install dependencies. In the app's root folder: yarn
- Start server: yarn start
- Go to http://localhost:3000 to see the app
There are 2 users in the DB: Rane with a role of a manager and Anuar - employee. Use those names to login. The rest is as descibed in the prompt.
Stack:
- React
- Redux
- Yarn + NPM
- Webpack
- Babel
- Node/Express
- Postgres
- Sequelize
- Axios
- React-Bootstrap
- Heroku
Justification for choosing technologies: Yarn - making sure application is not dependant on local machine’s environment. React - scalability, eaze of development and maintainance Redux - not really justifiable for an app this size, simplifies state management Postgres - relational db for relational data
Additional tooling:
- Prettier - fixes code, including indentations, new lines, semicolons and etc
- ESLINT by AirBnB - checks for proper use of variables, some code styling and etc
Notes:
Todo, Edit and Create routes are rendered if a user is authenticated. However, it is not a enough for security. A user needs to be authenticated by the back-end service and then given a token, which is consequenly checked from requests. If token does not match session, we should not send any user data. Dealing with authentication on the client side is not safe, as data is already in a browser. Current solution does a basic check if a user exists.