YousefZinsazK78 / blog_json_api

Blog rest api, works with mysql and fiber v2 and use jwt for auth ....

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

blog json api

in this blog api backend we want to work with restful api mysql database and using mysql driver in golang
and using fiber golang framework and useing middlewares and routers ...

packages : fiber v2 : github.com/gofiber/fiber/v2

mysql tables:

  1. post table

    1. title (string)
    2. description (string)
    3. author (string)
    4. likes ([]int)
    5. comments ([]string)
    6. createdAt (datetime)
    7. updatedAt (datetime)
  2. user table

    1. fullname
    2. username
    3. password
    4. email
    5. (private) admin , guest ,writer user permission
      1. rule writer => write , read , update , delete blog
      2. rule admin => write , read , update , delete blog, delete comments, delete users
      3. rule guest => read blog , read comments

features: insert post insert category insert comment insert like (add like/dislike) admin features: insert , update , delete , view users insert , update , delete , view posts

tools : Mysql database Fiber/v2 framework godotenv for load .env files middlewares (auth middleware) use queryparser, bodyparser JWT for authentication

About

Blog rest api, works with mysql and fiber v2 and use jwt for auth ....


Languages

Language:Go 99.8%Language:Makefile 0.2%