# README
Overview
Golang implementation of microservices that manage Shattered Realms Online.
Components
api
Proto definitions used in the architecturecmd
Microservicescharacters
User playable character managementchat
Chat service for sending messages between players and in chat channelsgamebackend
Management of game servers, connections and settings
pkg
: Global components shared between microservicesconfig
Configuration parametershelpers
Utility functions used throughout the microservicespb
Auto-generated go protobuf and gRPC filesrepository
Abstraction layer to the underlying database and storage mechanismsservice
Services that use the repositories to perform necessary actionssrv
gRPC service implementations
test
Configuration files and data for testingdb
Temporary testing database connection
third_party
Third party proto definitions
Development
The Makefile
is located within the build
folder within the project root directory. All make commands should be run from there. A docker compose file has been included to run all required services.
Requirements
- Docker
- Docker compose
- Golang 19
Environments
This project uses environment variables during the build process which should be stored within a .env
file located within the project root directory. If one is not configured, rename .env.template
to .env
and configure the variables for deployment.
Commands
Building
Binary: To build all binarys run make build
. The output result will be placed in the bin
folder in the project root directory. To build a specific file run make build-<app-name>
Docker: To build the docker image run make buildi
and a image called sro-<app-name>
will be generated. To build a specific docker image run make build-<app-name>-image
Testing
To run all tests and see the coverage report use make test
. To view HTML results, simply run make report
.
Deployment
Deployment is done using docker. If using an AWS docker repository, running make aws-docker-login
will authenticate with the default aws credential context. To push the images, run make push
. This will build the image and push them to the docker repository.