thirteenmd / back-end-task

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

Back-End Task

Create a node.js web service for a blogging app with a RESTful api that works with JSON data using express as a framework and postgresql as a database.

Blogging can involve many things so, to keep this simple, the main focus is on users and posts created by users. The structures for these entities are irrelevant as long as they're usable and aren't hard to understand, in other words, you can define users and posts however you want but make sure that it won't be too hard to understand how each of their properties contribute to form a blogging app that respects the requirements enumerated below. The same goes for endpoints.

Requirements:

  1. RESTfull web service working with JSON data in node.js using express and postgresql
  2. two types of users: bloggers and admins
  3. authentication with name/email and password, with sign-up and sign-in for bloggers, but only sign-in for admins
  4. bloggers can create posts
  5. bloggers can update and remove their posts
  6. bloggers can publish and hide their posts
  7. bloggers can see their posts whether they're public or hidden
  8. bloggers can see posts of other bloggers as long as they're public
  9. admins can do everything bloggers can do
  10. admins can remove any public post

There is an incomplete implementation in this repo in order to skip through setup and to test your skill of working with an existing codebase, but there are no restrictions to what can be changed, so you can rewrite the whole thing from scratch. If you choose to start with this then fork this repo so that it will easier to see all the changes. There are also a couple of TODOs which you'll have to do and there may or may not be bugs, so good luck.

I would recommend the eslint extension for vscode (dbaeumer.vscode-eslint) since this project is already configured for it.

If you think that something is missing, feel free to contact us.

Bonus points for usage of:

  1. typescript
  2. sequelize
  3. jwt
  4. docker
  5. docker-compose
  6. mocha or any other testing library
  7. eslint (typescript-eslint)

About


Languages

Language:TypeScript 99.2%Language:Shell 0.8%