Go-powered CMS for poets and writers (based on gRPC services)

Go Reference

Project idea

Project idea is to develop Cloud-based platform for poets & writers. Poets should have posibility to write poems and create diffrent categories. Poems and categories must be visible only to author. Maybe in the future would be good to add the Share button.

This project is based on Go and use gRPC framework for backend web services.

By developing this project, I learned:

  1. How to create gRPC services using Go and protoc (Protocol Buffer Compiler). Go to source code
  2. How to write Go tests. Go to source code
  3. How to create CLI subcommands. Go to source code
  4. How to create generic function to handle multiple types. Sql ExecDB generic function Sql QueryRowDB generic function Sql QueryDB generic function Template generic function

Used technologies in project:

  1. Docker
  2. Docker compose
  3. Go (written all backend services):
  4. Oauth gRPC server (register and login functionality)
  5. Poems gRPC server (get only current user created poems and categories)
  6. Admin gRPC server (CRUD operations with categories & poems)
  7. Frontend server (communicate with OAuth, Poems & Admin gRPC servers and render page to website visitor)
  8. gRPC framework
  9. created 3 Go-based gRPC servers using Protocol Buffers
  10. Bootstrap 5.1.3 (frontend)


Test coverage:

webimizer.dev/poem/runtime 0.004s coverage: 100.0% of statements

webimizer.dev/poem/cmd/subcommands/install 4.481s coverage: 55.2% of statements

Test application:

make test

Build application with Docker and Docker compose

  1. Build image from Dockerfile: sh docker build . -t poem
  2. Copy file docker-compose.example.yml to docker-compose.yml and change environment variables (if needed).
cp docker-compose.example.yml docker-compose.yml
  1. Build Docker containers with docker-compose: sh docker-compose up -d
  2. Finally, install database with: sh docker-compose exec poems_rpc /go/poem install

Built With

Share this project: