poem

package module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

README

poem

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

Go Reference

Poem

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):
  • 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)
  1. gRPC framework
  1. 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

  1. Build image from Dockerfile:
docker build . -t poem
  1. 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:
 docker-compose up -d
  1. Finally, install database with:
docker-compose exec poems_rpc /go/poem install

Documentation

Overview

Poem CMS main package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitApplication

func InitApplication()

Initialize Poem CLI application

Types

This section is empty.

Directories

Path Synopsis
cmd
main
Main application package with main function (entrypoint)
Main application package with main function (entrypoint)
subcommands
Package for CLI subcommands registration
Package for CLI subcommands registration
subcommands/adminfrontend
admin frontend subcommand
admin frontend subcommand
subcommands/adminserver
admin server subcommand
admin server subcommand
subcommands/install
CMS install subcommand
CMS install subcommand
subcommands/oauthserver
oauth server subcommand
oauth server subcommand
subcommands/poemsserver
poems server subcommand
poems server subcommand

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL