Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ indent_style = tab
indent_size = 4

[*.md]
indent_size = 4
indent_size = 2
trim_trailing_whitespace = false

eclint_indent_style = unset
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
branches-ignore:
- main
- develop
pull_request:
branches:
- main
- develop

permissions:
contents: read
Expand All @@ -24,7 +20,7 @@ jobs:
- uses: articulate/actions-markdownlint@v1
with:
config: markdownlint-config.json
files: "*.md"
files: "*.md,docs/**/*.md"
ignore: node_modules
# version: 0.28.1

Expand Down
77 changes: 38 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,54 @@

The **GeekBot** is a Telegram bot built using Go Lang that integrates with the GeekOps community group to enhance user interaction and community engagement.

It is designed to authenticate new members, automate moderation tasks, reward active participants, and foster a friendly and constructive environment ...
It is designed to authenticate new members, automate moderation tasks, reward active participants, and foster a friendly and constructive environment...
Please read the [Concept](docs/plan/concept.md) for more information.

## Features and Functionalities
## Requirements

1. New Member Verification
- The bot will implement a check to determine if a new member is a bot or a human, using CAPTCHA-based challenges or interaction-based verification methods.
To run this project, you need to have the following tools installed:

2. Account Maintenance
- GeekBot will automatically remove profiles that have been marked with the status "Deleted."
- ![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/GeekOpsUA/GeekBot)

3. Moderation and Gamification
- The bot will serve as a moderator and will implement a gamified points system to incentivize positive behavior and community engagement.
Also, please check that `kubectl` and `helm` are installed on your machine.
Additionally, we are using following tools:

4. Points Distribution
- The bot will award points based on the following actions:
- Single-word answer that resolves an issue/question: 50 points
- Detailed answer with rationale for the solution that resolves an issue/question: 100 points
- Detailed answer with external references that lead to resolution: 150 points
- Contribution to discussion that aids in resolving an issue: 20 points
- Inviting a colleague or friend with an interest in IT infrastructure: 50 points
- Honest recommendation/feedback about an event or meeting in chat or via Google form: 200 points
- Members will be able to view their points balance using the `/my_points` command.
- **Go Packages**
- [Cobra](https://cobra.dev/#getting-started)
- [Telebot](https://github.com/tucnak/telebot#getting-started)
- **Kubernetes**
- [K3D](https://k3d.io/#installation)
- [ArgoCD](https://argoproj.github.io/argo-cd/getting_started/#1-install-argo-cd)
- [Mozilla SOPS](https://github.com/getsops/sops#sops-secrets-operations)
- **Helpful Tools**
- [Taskfile](https://taskfile.dev/#/)
- **GitHub Actions**
- [markdown-lint](https://github.com/marketplace/actions/markdown-lint)
- [golangci-lint](https://github.com/marketplace/actions/run-golangci-lint)
- [Memer Action](https://github.com/marketplace/actions/memer-action)

5. Points Redemption
- Points can be exchanged for community merch, with 100 point equivalent to 1 UAH. Future plans include the introduction of achievements, and members' suggestions for these are welcomed.
## Getting Started

<!-- markdownlint-disable MD033 -->
| Example 1 | Example 2 |
| :---: | :---: |
| <img src=docs/images/gift-1.png width="50%" /> | <img src=docs/images/gift-2.png width="50%" /> |
<!-- markdownlint-enable MD033 -->
### Working with Taskfile

1. Community Rule Enforcement
- GeekBot will maintain a list of prohibited words, primarily related to politics and commonly found in spam messages. If these words are detected, the message will be deleted.
To list all available tasks, run:

## Technical Specification for GeekBot Telegram Community Assistant
```bash
task --list-all
```

### Stack and Tooling
_Also, you can run `task` without any arguments to see the list of available tasks._

- **Kubernetes** (K3s + Raspberry Pi setup).
- **Helm**
- **ArgoCD** will automatically deploy the bot to Kubernetes when creating a new artifact with the tag.
- **Mozilla SOPS** for secrets
- **Go Lang** + Cobra + [telebot](https://github.com/tucnak/telebot)
- **GitHub Actions** CI/CD pipeline
To get more information about a specific task, run:

## Study Materials
```bash
task --summary <task-name>
```

- [learn-go-with-tests](https://quii.gitbook.io/learn-go-with-tests)
- [Go in Action, Second Edition](https://www.manning.com/books/go-in-action-second-edition)
- [Shipping Go Develop, deliver, discuss, design, and go again](https://www.manning.com/books/shipping-go)
- [Build an Orchestrator in Go (From Scratch)](https://www.manning.com/books/build-an-orchestrator-in-go-from-scratch)
Or, you can run:

```bash
task --summary
```

For default task.
10 changes: 10 additions & 0 deletions Taskfile.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,21 @@ tasks:
- go test -v -cover ./...

build:
aliases: ["default"]
deps:
- fmt
- lint
- test
desc: Build binaries
summary: |
Build binary for default platform

I.e., it takes the values of the environment variables
defined in the `env` section and uses them to build
Also it takes appVersion variable as a parameter

Example:
task build appVersion=v1.0.0
cmds:
- >-
CGO_ENABLED=${CGO_ENABLED};
Expand Down
6 changes: 6 additions & 0 deletions docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Code of Conduct

This project follows the [Go Community Code of Conduct](https://golang.org/conduct).
Ukrainian translation is available [here](https://www.contributor-covenant.org/uk/version/1/4/code-of-conduct/)

If you encounter an issue, please contact us at [@GeekOpsUA](https://t.me/GeekOpsUA) or [create an issue](https://github.com/GeekOpsUA/GeekBot/issues/new/choose).
28 changes: 28 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
Telegram, or any other method with the owners of this repository before making a change.

Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.

## Code hygiene

1. Please install [all dependencies](../README.md#requirements) before starting to work on the project.
2. We're using [Taskfile](https://taskfile.dev/#/) to perform common tasks.
3. Check your code with `task lint` before creating a pull request.
4. Write tests for your code and test it with `task test` before creating a pull request.
5. Please follow the [Uber Go Style Guide](https://github.com/vorobeyme/uber-go-style-guide-uk/blob/master/style.md#%D0%B2%D1%81%D1%82%D1%83%D0%BF) when writing code.
6. Or you can follow the [Effective Go](https://golang.org/doc/effective_go).
7. We're following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
8. For project structure, please read [Standard Go Project Layout](https://github.com/golang-standards/project-layout/blob/master/README_ua.md#%D0%BE%D0%B3%D0%BB%D1%8F%D0%B4) recommendations.
65 changes: 65 additions & 0 deletions docs/plan/concept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Concept

- [Concept](#concept)
- [Features and Functionalities](#features-and-functionalities)
- [Stack and Tooling](#stack-and-tooling)
- [Organizing the Project](#organizing-the-project)
- [Study Materials](#study-materials)

## Features and Functionalities

1. New Member Verification
- The bot will implement a check to determine if a new member is a bot or a human, using CAPTCHA-based challenges or interaction-based verification methods.

2. Account Maintenance
- GeekBot will automatically remove profiles that have been marked with the status "Deleted."

3. Moderation and Gamification
- The bot will serve as a moderator and will implement a gamified points system to incentivize positive behavior and community engagement.

4. Points Distribution
- The bot will award points based on the following actions:
- Single-word answer that resolves an issue/question: 50 points
- Detailed answer with rationale for the solution that resolves an issue/question: 100 points
- Detailed answer with external references that lead to resolution: 150 points
- Contribution to discussion that aids in resolving an issue: 20 points
- Inviting a colleague or friend with an interest in IT infrastructure: 50 points
- Honest recommendation/feedback about an event or meeting in chat or via Google form: 200 points
- Members will be able to view their points balance using the `/my_points` command.

5. Points Redemption
- Points can be exchanged for community merch, with 100 point equivalent to 1 UAH. Future plans include the introduction of achievements, and members' suggestions for these are welcomed.

<!-- markdownlint-disable MD033 -->
| Example 1 | Example 2 |
| :---: | :---: |
| <img src=../images/gift-1.png width="50%" /> | <img src=../images/gift-2.png width="50%" /> |
<!-- markdownlint-enable MD033 -->

1. Community Rule Enforcement
- GeekBot will maintain a list of prohibited words, primarily related to politics and commonly found in spam messages. If these words are detected, the message will be deleted.

## Stack and Tooling

- **Kubernetes** (K3s + Raspberry Pi setup).
- **Helm**
- **ArgoCD** will automatically deploy the bot to Kubernetes when creating a new artifact with the tag.
- **Mozilla SOPS** for secrets
- **MariaDB** for storing user data
- **Go Lang** + Cobra + [telebot](https://github.com/tucnak/telebot)
- **GitHub Actions** CI/CD pipeline

## Organizing the Project

1. We're using [Taskfile](https://taskfile.dev/#/) to perform common tasks.
2. Please check [CONTRIBUTING.md](../CONTRIBUTING.md) for more information about the project structure.
3. Please check [CODE_OF_CONDUCT.md](../CODE_OF_CONDUCT.md) for more information about the code of conduct.
4. All the documentation is stored in the [docs](../docs) folder.
5. All missing [community health files](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file) should be craeated and stored in the [.github](../.github) folder.

## Study Materials

- [learn-go-with-tests](https://quii.gitbook.io/learn-go-with-tests)
- [Go in Action, Second Edition](https://www.manning.com/books/go-in-action-second-edition)
- [Shipping Go Develop, deliver, discuss, design, and go again](https://www.manning.com/books/shipping-go)
- [Build an Orchestrator in Go (From Scratch)](https://www.manning.com/books/build-an-orchestrator-in-go-from-scratch)
6 changes: 6 additions & 0 deletions docs/plan/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Plan

## Index

1. [Concept](concept.md)
2. [Proof of Concept](poc.md)