Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

krixlion/dev_forum-article

Repository files navigation

Status

🚧 Under Development 🚧

This repository is a part of an ongoing project and is currently under active development. I'm continuously working on adding features, fixing bugs, and improving documentation. Although this is a one-man project, contributions are welcome. Please feel free to open issues or submit pull requests.

dev_forum-article

GoDoc Coverage Status Go Report Card GitHub License

Article-service is responsible of storing and operating on articles that users create in dev_forum system.

It's dependent on:

  • Redis for query storage.
  • EventStore for storing articles and their update history.
  • RabbitMQ for asynchronous communication with other components in the domain.
  • OtelCollector for receiving and forwarding telemetry data.

Set up

Rename .env.example to .env and fill in missing values.

Using Go command

You need working Go environment.

go mod tidy
go mod vendor
go build cmd/main.go

On Docker

You need a working Docker environment.

You can use the Dockerfile located in deployment/ to build and run the service on a docker container.

make build-image version=latest 
docker run -p 50051:50051 krixlion/dev_forum-article:latest

On Kubernetes (recommended)

You need a working Kubernetes environment.

Kubernetes resources are defined in deployment/k8s and deployed using Kustomize.

Currently there are stage, dev and test overlays available and include any needed resources and configs.

Use make to apply manifests for dev_forum-article and needed DBs for either dev or stage environment. Every make rule that depends on k8s accepts an overlay param which indicates the namespace for the rule.

make k8s-run overlay=<dev/stage/...>
# To delete
make k8s-stop overlay=<dev/stage/...>

Testing

Run unit and integration tests using Go command. Make sure to set current working directory to project root.

# Add `-short` flag to skip integration tests.
go test ./... -race

Generate coverage report using go tool cover.

go test -coverprofile  cover.out ./...
go tool cover -html cover.out -o cover.html

If the service is deployed on kubernetes you can use make.

make k8s-integration-test overlay=<dev/stage/...>

or

make k8s-unit-test overlay=<dev/stage/...>

Documentation

For in-detail documentation refer to the Wiki.

API

Service is exposing a gRPC API.

Regenerate pb packages after making changes to any of the .proto files located in api/. You can use go-grpc-gen, a containerized tool for generating gRPC bindings, with make grpc-gen.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published