hasyimzii / go_library_backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Library Backend

REST API app for library management using Go and MySQL. This app, is purposed to make it easier for librarians to manage book loans.

Contents


How to install (using Go)

Requirement: Go Programming Language, Golang Migrate, & MySQL

  1. Clone this repository
git clone https://github.com/hasyimzii/go_library_backend.git
  1. Open repository in terminal
cd go_library_backend
  1. Open MySQL & make database
CREATE DATABASE go_library_backend;
  1. Run migrations
# TODO: run migration
  1. Build Go app
go build
  1. Excecute binary file
./go_library_backend
  1. Now the app is running

How to install (using Docker)

Requirement: Docker

  1. Clone this repository
git clone https://github.com/hasyimzii/go_library_backend.git
  1. Open repository in terminal
cd go_library_backend
  1. Excecute docker compose command
docker composer up -d
  1. Now the code is running
  2. (If you want to remove the container, image, & volumes)
docker compose down
docker image rm go_library_backend:1.0.0
docker volume rm go_library_backend_logs

Usecase diagram

usecase diagram

In this app, there are 3 actors:

  • Admin : User who has access to manage librarian
  • Librarian : User who has access to manage book, borrowing, and member
  • Member : User who has acces to find book by name or category

ERD and database

Packages used

API documentation

Login credentials

Logging

Unit test

(Must've installed: Go Programming Language)

Manual test

(If using VSCode, must've extension: REST Client by Huachao Mao)

About


Languages

Language:Go 100.0%