Skip to content
Igor Nikolic edited this page Jul 1, 2020 · 4 revisions

PhoTexBlog

Description

This is a simple blog API. Registered users can share their posts described with a picture, content, title and a topic with other (non)-registered users. Authorized users can comment on posts, rate a post (1-10) only once or change a rate value for a post they have already rated. Users get a confirmation mail when they register. Registered users must get their JWT Token from /api/users/gettoken providing their email and password for authentication in order to execute authorized actions with their requests.

Guest permissions:

  • Search (by topic name) and get Topics
  • Search (by title, by content, by user email, by topic name) and get Posts
  • Search (by comment, by user email, by post title) and get Comment
  • Search (by first name, by last name, by email) and get Users
  • Search (by min rating value, by max rating value, by user email, by post title) and get Ratings

Registered users permissions:

  • Guest permissions
  • Add, update and delete their posts
  • Comment on posts, update and remove their comments
  • Rate a specific post only once or change a rated value for that post
  • Update and delete their account

Admin user permissions:

  • Registered users permissions
  • Search (by usecaseName, by start date, by end date,by user email) UseCaseLog
  • Add, update and delete Topics
  • Add, update, search and get UseCase
  • Add a permission to an user and search permissions

Database Diagram

dbdiagram

Guide to test

  1. Download\Clone project
  2. Execute sql script in SQL Server to create PhoTexBlog database and insert test data
  3. Start the API project (default URL: http://localhost:5000)
  4. Test the API using any HTTP Client (Swagger implemented and available on http://localhost:5000/swagger)

JWT Token lasts for 30 minutes. If you want to change the duration, change value in Api/Core/JwtManager

Accounts

Admin

Email: admin@gmail.com Password: Primer_123

User

Email: user@gmail.com Password: Primer_123

Other Users

**Passwords: ** Test_123

Clone this wiki locally