Skip to content

Vanssh-k/NEWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Samudai_backend_task

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 :

  1. SignUp & Login -> Anyone can signup to the platform chosing their role to get a suitable dashboard (Admin, Editor, User).
  2. Dashboard Creation -> Upon Sign-up every user gets a specific dashboard generated for them. EJS (Embedded JavaScript Templating) is employed for creation of dashboards.
  3. 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.
  4. 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.

  1. 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).

    Schema or the query of the table -> Screenshot 2022-11-12 at 8 10 08 PM

    Example Table of User Table -> WhatsApp Image 2022-11-12 at 20 23 11

  2. 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).

    Schema or the query of the table -> Screenshot 2022-11-12 at 8 14 49 PM

    Example Table of Dashboard Table -> WhatsApp Image 2022-11-12 at 20 24 13

  3. Static Data Table -> This table just includes some text, one heading and little description as added/edited by user.

    Schema or the query of the table -> Screenshot 2022-11-12 at 8 19 29 PM

    Example Table of Static Data Table -> WhatsApp Image 2022-11-12 at 20 25 04

APIs -->

  1. "/" -> start point
  2. "/signup" -> POST API to signup the user.
  3. "/login" -> POST API to login the user.
  4. "/dashboard/:id -> GET API to create dashboards followed by dashboard id. "dashboard/1"
  5. "/change" -> POST API through which Admin can change the access of different users.
  6. "/textchange -> POST API through which Editor and admin can change the text.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages