Skip to content

TarikSogukpinar/book-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

GoLang & Next.js Book CRUD API

API Usage

  • Auth API

Login

  __POST__ /api/auth/login
Parameter Type Description
email string Required. The email of the user
password string Required. The password of the user

Register

  __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

Demo

Installation

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

Api Enviroment variables

  • MONGODB_URI= example-url
  • DB_NAME= example-go
  • PORT=6060
  • JWT_SECRET=supersecretkey

Web Enviroment variables

Links

Releases

No releases published

Packages

No packages published