Library Management Project Using Golang, PostgreSQL, gRPC, JWT, Docker/Kubernetes
265
Junior Backend Developer Synapsis Test Library Management Project Using Golang, PostgreSQL, gRPC, JWT, REDIS, Docker/Kubernetes
User Service is a microservice designed to manage user accounts and authentication. It supports user registration, login, profile updates, and deletion. This service is built using Go and gRPC.
Author Service is a microservice designed to manage authors in a system. It provides functionalities to create, read, list, update, and delete authors. This service is built using Go and gRPC.
Book Service is a microservice designed to manage books in a system. It provides functionalities to add, update, borrow, return, and delete books. This service is built using Go and gRPC.
Category Service is a microservice designed to manage categories in a system. It provides functionalities to create, read, update, and delete categories. This service is built using Go and gRPC for efficient communication between services.
protoc)Clone the repository:
git clone https://github.com/ihsan-developer/library-management-system.git
cd yourPath/library-management-system
go mod install
Open Pgadmin4 GUI and create 4 database for every services and migrate every table and seed the example data from Database/ directory. Use AuthorDB, BookDB, CategoryDB, and UserDB directory to initiate table, then seed/fill the example data from ExampleData directory
Generate your JWT secret key on utils/generate-token/generate_token.go by running: go run main.go on terminal, then put it on JWT_SECRET_KEY variable on every .env services
go run main.go on
JWT_SECRET_KEY=YOUR_SECRET_KEY
adjust other .env variable on every services
DB_USER=YOUR_DB_USERNAME
DB_NAME_USER=YOUR_DB_NAME_FOR_EACH_SERVICE
DB_PASSWORD=YOUR_DB_PASSWORD
DB_SSLMODE=disable
JWT_SECRET_KEY=YOUR_SECRET_KEY
Open terminal cmd GUI then change directory to your library-management-system project then you can change directory again to specific service you want to try, then run go run server.go command
cd user-service
go run server.go
cd category-service
go run server.go
cd author-service
go run server.go
cd book-service
go run server.go
Open Postman API then create some request like example want to try login function
{
"username": "yourUsername",
"password": "yourPassword"
}
POSTMAN API Collection Link Gdrive: https://drive.google.com/drive/folders/173rNNTWgXpuBly2_5iJXzDuw7LfR6Njp?usp=sharing
Content type
Image
Digest
sha256:7d4d4d240…
Size
46.6 MB
Last updated
about 2 years ago
docker pull codingsan17/library-management-system