link to the hosted platform -> https://frozen-caverns-73598.herokuapp.com/
I created a News platform with an integrated signup and login page in which users can enlist to see top trending news of country selected from the list given. The Platform involves three level of access hierarchy viz Admin, Editor and User dashboards. Admin have the permission to select who gets to edit text and which users have only view access i.e. admin grants access types. Editors will have the access to change a text.
I have used Node.js as my backend language and Postgressql database as per the rules of assignment.
Functionalities :
- SignUp & Login -> Anyone can signup to the platform chosing their role to get a suitable dashboard (Admin, Editor, User).
- Dashboard Creation -> Upon Sign-up every user gets a specific dashboard generated for them. EJS (Embedded JavaScript Templating) is employed for creation of dashboards.
- News -> Every user can view the trending news of any available country. I have used India News API (External API) as a third party widget to fetch the News and display it on our platform.
- Access Management -> All three type of users will get a specific dashboard suitable for their requirement. Admin dashboard has a section in which admin can manage the access of other users and can change their respective access. Admin and Editor dashboards comes with an input form to change the text section which a simple useris denied access to change i.e. can only view/read
Database Schema -> I need to create three tables for storing the data.
-
User Table -> This table will give a unique id to the users and will store all the data of user such as name, email, phonenumber, hash created using password, roll of the user (Admin, Editor or User).
-
Dashboard Table -> This table will give a unique id to all the generated dashboards and store data related to them like user_id which refers to user's id for whom the dashboard is generated and dash_type which is the type of dashboard as selected by the user (Admin, Editor or User).
-
Static Data Table -> This table just includes some text, one heading and little description as added/edited by user.
APIs -->
- "/" -> start point
- "/signup" -> POST API to signup the user.
- "/login" -> POST API to login the user.
- "/dashboard/:id -> GET API to create dashboards followed by dashboard id. "dashboard/1"
- "/change" -> POST API through which Admin can change the access of different users.
- "/textchange -> POST API through which Editor and admin can change the text.





