- Auth API
__POST__ /api/auth/login
Parameter | Type | Description |
---|---|---|
email |
string |
Required. The email of the user |
password |
string |
Required. The password of the user |
__POST__ /api/auth/register
Parameter | Type | Description |
---|---|---|
username |
string |
Required. The username of the user |
email |
string |
Required. The email of the user |
password |
string |
Required. The password of the user |
- Books API
__GET__ /api/books
Parameter | Type | Description |
---|---|---|
page |
integer |
Required. Page number |
__POST__ /api/books
Parameter | Type | Description |
---|---|---|
title |
string |
Required. Book title |
Author |
string |
Required. Book Author |
Description |
string |
Required. Book Description |
__GET__ /api/books/search
Parameter | Type | Description |
---|---|---|
q |
string |
Required. Search query |
__GET__ /api/books/{id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Book ID |
book |
object |
Required. Book details |
__DELETE__ /api/books/{id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Book ID |
Client: Next.js, Tailwind CSS, Typescript
Server: Fiber, GoLang, Docker, Ubuntu
Database: Mongo DB
Packages: jwt-go, Helmet, godotenv, cors, swagger, mongo-driver, jose, faker, air, js-cookie, axios
- https://book.tariksogukpinar.dev ( Live )
- http://localhost:6060 (Local Development API)
- http://localhost:7070 (Local Development Web)
Clone Project
git clone https://github.com/TarikSogukpinar/book-go
go project folder /api & or /web
cd api & web
install go & next.js
go install & npm install
run projects
air & npm run dev
- MONGODB_URI= example-url
- DB_NAME= example-go
- PORT=6060
- JWT_SECRET=supersecretkey
- NEXT_PUBLIC_API_URL= https://book.tariksogukpinar.dev/api
- NEXT_PUBLIC_API_PORT = 7010
- NEXT_PUBLIC_API_JWT_SECRET=supersecretkey
- https://book.tariksogukpinar.dev/
- https://github.com/TarikSogukpinar/book-go
- https://github.com/TarikSogukpinar/book-go/tree/main/api
- https://github.com/TarikSogukpinar/book-go/tree/main/web
- https://hub.docker.com/repository/docker/ledun/book-go-web/general
- https://hub.docker.com/repository/docker/ledun/book-go-api/general
- http://localhost:6060/swagger/index.html