https://github.com/yousefzinsazk78/blog_json_api
Blog rest api, works with mysql and fiber v2 and use jwt for auth ....
https://github.com/yousefzinsazk78/blog_json_api
blog go golang jwt jwt-authentication mysql
Last synced: 6 months ago
JSON representation
Blog rest api, works with mysql and fiber v2 and use jwt for auth ....
- Host: GitHub
- URL: https://github.com/yousefzinsazk78/blog_json_api
- Owner: YousefZinsazK78
- Created: 2023-08-24T18:00:34.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T09:37:22.000Z (almost 3 years ago)
- Last Synced: 2023-09-04T12:21:57.594Z (almost 3 years ago)
- Topics: blog, go, golang, jwt, jwt-authentication, mysql
- Language: Go
- Homepage:
- Size: 86.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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