poem
Go-powered CMS for poets and writers (based on gRPC services)
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:
- How to create gRPC services using Go and protoc (Protocol Buffer Compiler). Go to source code
- How to write Go tests. Go to source code
- How to create CLI subcommands. Go to source code
- 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:
- Docker
- Docker compose
- Go (written all backend services):
- Oauth gRPC server (register and login functionality)
- Poems gRPC server (get only current user created poems and categories)
- Admin gRPC server (CRUD operations with categories & poems)
- Frontend server (communicate with OAuth, Poems & Admin gRPC servers and render page to website visitor)
- gRPC framework
- created 3 Go-based gRPC servers using Protocol Buffers
- Bootstrap 5.1.3 (frontend)
Tests
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
- Build image from Dockerfile:
sh docker build . -t poem
- Copy file
docker-compose.example.yml
todocker-compose.yml
and change environment variables (if needed).
cp docker-compose.example.yml docker-compose.yml
- Build Docker containers with docker-compose:
sh docker-compose up -d
- Finally, install database with:
sh docker-compose exec poems_rpc /go/poem install
Log in or sign up for Devpost to join the conversation.