kzndzhiro / react_mobx

Testing out Mobx and React
MIT License
0 stars 0 forks source link

Determine the routes based on requirements #5

Open kzndzhiro opened 7 years ago

kzndzhiro commented 7 years ago

Based on requirements this seems to be a secure system that has no guest viewing functionality. I will need several routes to begin with: All routes will be protected and if the user is not authenticated it will redirect him to the /login route to input some data

I will have: / - root path that will show a table with all the products. Page should show a message if a user has no permissions at all. /login - a login form /create - this will be triggered by the Create button for new product. /delete/:productId - this will be triggered by the Delete button for new product /permissions/:userId - will be called internally by a component to hydrate users permissions it will not be accessible from the app

When you create or delete a product you will be redirected to the main page / to see your changes.

Also there will be a no match route.

It will be good to have a /view/:productId path if we have a lot of columns for the product and could not see them all but it is not the case here. I could added for future expansion