Skip to content

Zygiell/BlogAPI

Repository files navigation

BlogAPI.

Blog API is an RESTFUL API, contains most of the things avaiable on any blog out there.

The project has been made using Entitiy Framework with Code First approach. Database tables, generated by source code can be both accesed through application or directly through SQL Server.

In this project whole buisnes logic is implemented in Services, injected to Controller using Dependancy Injection.

All user passwords stored in database are hashed using password hasher, authentication is done using JwtToken.

Database diagram

image

NuGet Packages

  • AutoMapper
  • FluentValidation
  • JwtBearer
  • NLog
  • Swagger

Functions

There are 3 roles User, Editor, Admin:

  • Anonymous useres can view posts, comments and register/login to account.

  • Logged in users with User role, can upvote or downvote posts and comments, users can also add, edit, delete their own comments under posts.

  • Users with Editor role can additionally add, edit, delete their own posts.

  • Admin role has access to "AdminPanel", which allows them to add, edit, delete all comments and posts, additionally Admin can change user roles and edit accounts details or delete accounts.

  • Every logged in user regardless of the roles can edit(except role) or delete their own account.

  • With get all posts method, user can determine if he wants to get all posts or display results paginated, sorted or filtered by searching phrase. code link

Swagger UI

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages