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
30 changes: 30 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/universal
{
"name": "Default Linux Universal",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
"features": {
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {},
"ghcr.io/devcontainers/features/node:1": {},
// "ghcr.io/devcontainers-contrib/features/starship:1": {},
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {},
"ghcr.io/guiyomh/features/vim:0": {},
"ghcr.io/rio/features/k3d:1": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
; https://editorconfig.org/

root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.{tf,tfvars,tpl}]
indent_size = 2
indent_style = space

[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
indent_style = tab
indent_size = 4

[*.md]
indent_size = 4
trim_trailing_whitespace = false

eclint_indent_style = unset

[Dockerfile]
indent_size = 4
22 changes: 22 additions & 0 deletions .github/workflows/mardownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Markdownlint
on:
push:
pull_request:
branches:
- main
- develop

jobs:
markdownlint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: articulate/actions-markdownlint@v1
with:
config: markdownlint-config.json
files: 'docs/**/*.md'
ignore: node_modules
version: 0.28.1
35 changes: 18 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# GeekBot


## Overview

The **GeekBot** is a Telegram bot built using Go Lang that integrates with the GeekOps community group to enhance user interaction and community engagement.
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 ...

## Features and Functionalities:
## 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.

Expand All @@ -30,28 +30,29 @@ It is designed to authenticate new members, automate moderation tasks, reward ac
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.

<p float="left">
<img src=images/gift-1.png width="15%" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src=images/gift-2.png width="15%" />
</p>
<!-- 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 -->

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.

# Technical Specification for GeekBot Telegram Community Assistant:
## Technical Specification for GeekBot Telegram Community Assistant

### 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
- **Go Lang** + Cobra + [telebot](https://github.com/tucnak/telebot)
- **GitHub Actions** CI/CD pipeline
- **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

## Study Materials

## 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)
- [Build an Orchestrator in Go (From Scratch)](https://www.manning.com/books/build-an-orchestrator-in-go-from-scratch)
51 changes: 51 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
Copyright © 2023 NAME HERE <EMAIL ADDRESS>

*/
package cmd

import (
"os"

"github.com/spf13/cobra"
)



// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "GeekBot",
Short: "A brief description of your application",
Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },
}

// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}

func init() {
// Here you will define your flags and configuration settings.
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.

// rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.GeekBot.yaml)")

// Cobra also supports local flags, which will only run
// when this action is called directly.
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}


File renamed without changes
File renamed without changes
9 changes: 9 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module github.com/GeekOpsUA/GeekBot

go 1.20

require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)
10 changes: 10 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
11 changes: 11 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
Copyright © 2023 NAME HERE <EMAIL ADDRESS>

*/
package main

import "github.com/GeekOpsUA/GeekBot/cmd"

func main() {
cmd.Execute()
}