Create a node.js web service for a blogging app with a RESTful api that works with JSON data using express or nest as a framework and mongo or postgres 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.
- typescript
- RESTfull web service working with JSON data in node.js using nest/express and mongo/postgres
- two types of users: bloggers and admins
- authentication with name/email and password, with sign-up and sign-in for bloggers, but only sign-in for admins
- bloggers can create posts
- bloggers can update and remove their posts
- bloggers can publish and hide their posts
- bloggers can see their posts whether they're public or hidden
- bloggers can see posts of other bloggers as long as they're public
- admins can do everything bloggers can do
- admins can remove any public post
Good practices and readable code are very welcome.
If you think that something is missing, feel free to contact us.