Skip to content

Commit

Permalink
docs: running update for first part
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Jun 3, 2024
1 parent 0647891 commit 9895c12
Show file tree
Hide file tree
Showing 12 changed files with 166 additions and 56 deletions.
26 changes: 26 additions & 0 deletions .vscode/settings.example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
{
"go.testFlags": [
"-v"
],
"go.testEnvVars": {
"DEV_ENV": "true",
"TF_VAR_production_hcloud_token": "**********", // Needed only for deployment
"DOCKERHUB_USERNAME": "darkwind8", // Needed only for deployment
"DOCKERHUB_TOKEN": "**********", // Needed only for deployment
"DISCORDER_BOT_TOKEN": "**********",
"DARKBOT_LOG_LEVEL": "INFO",
"CONFIGURATOR_DBNAME": "dev",
"DEVENV_MOCK_API": "true",
"SCRAPPY_PLAYER_URL": "**********", // Not required for dev env if u use "DEVENV_MOCK_API": "true"
"SCRAPPY_BASE_URL": "**********" // Not required for dev env if u use "DEVENV_MOCK_API": "true"
},
"go.testTimeout": "30000s",
"editor.formatOnSave": true,
"terminal.integrated.env.linux": {
// "DARK_TEST_REGENERATE": "false",
"DEV_ENV": "true",
"TF_VAR_production_hcloud_token": "**********", // Needed only for deployment
"DOCKERHUB_USERNAME": "darkwind8", // Needed only for deployment
"DOCKERHUB_TOKEN": "**********", // Needed only for deployment
"DISCORDER_BOT_TOKEN": "**********",
"DARKBOT_LOG_LEVEL": "INFO",
"CONFIGURATOR_DBNAME": "dev",
"DEVENV_MOCK_API": "true",
"SCRAPPY_PLAYER_URL": "**********", // Not required for dev env if u use "DEVENV_MOCK_API": "true"
"SCRAPPY_BASE_URL": "**********" // Not required for dev env if u use "DEVENV_MOCK_API": "true"
}
}
2 changes: 0 additions & 2 deletions README.dev.md

This file was deleted.

64 changes: 46 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# Name
# Darkbot

Darkbot3
<p align="center">
<img src="docs/index_assets/fulllogo.png" style="width: 300px; height: 180px;"/>
</p>

**[Invite Link](https://discord.com/api/oauth2/authorize?client_id=838460303581904949&permissions=8&scope=bot)**
# Getting started

# Description
- [Getting started and documentation how to use it](https://darklab8.github.io/fl-darkbot/)

### other links

- [Discovery Forum Thread and anouncements](https://discoverygc.com/forums/showthread.php?tid=188040)
- [Github of the project](https://github.com/darklab8/fl-darkbot)
- [See other Dark Tools for Freelancer here](https://darklab8.github.io/blog/pet_projects.html#DiscoveryFreelancercommunity)

# Project Description for devs (See Getting started for users)

- This project is a discord bot **Darkbot3** for open source game community [Freelancer Discovery](https://discoverygc.com/)
- It underwent a major refactorization and now reimplemented in golang with clean architecture for code scalability to add new features
- general stability added, because all errors are now handled way better with Golang approach that handles most of them at compile time.
- project saves ready for deployment docker images [at docker hub](https://hub.docker.com/repository/docker/darkwind8/darkbot/general), see [settings here](https://github.com/darklab8/fl-darkbot/blob/master/infra/kubernetes/charts/darkbot/templates/main.yml)
- darkbot has its own server now only for itself
- It implements Discord bot to track player bases, players themselves and forum posting with notifications to Discord.
- The logic of it: User connects darkbot to some discord channel, and sets settings which space bases, player tags or space systems to track. Darkbot repeatedly updates information to discord channel
- project saves ready for deployment docker images [at docker hub](https://hub.docker.com/repository/docker/darkwind8/darkbot/general), see [settings here](https://github.com/darklab8/fl-darkbot/blob/master/tf/modules/production), which are invoking [this configuration](https://github.com/darklab8/fl-darkbot/blob/master/tf/modules/darkbot)

![](docs/index_assets/base_render2.png)

![](docs/index_assets/player_render2.png)

User connects darkbot to some discord channel, and sets settings which space bases, player tags or space systems to track.
Darkbot repeatedly updates information to discord channel

# Architecture

The project has 5 package parts parts:
Expand All @@ -31,10 +37,6 @@ The project has 5 package parts parts:

![architecture](architecture/architecture.drawio.svg)

# Project plans:

[See wiki](https://darklab8.github.io/fl-darkbot/)

# Tech stack

- golang
Expand All @@ -52,11 +54,37 @@ install taskfile.dev for dev commands
go run . --help

task test # to test
task --list-all # to list other commands
task --list-all # to list other commands

See [Taskfile.yml](<./Taskfile.yml>) for the rest of available dev commands

# Dev Configurations:

# Goals to follow:
- create your own Discord app link and use it for development
by providing it through [Environment variables documentated there](./.vscode/settings.example.json)

- If you are me, then just use your dev env inviting link you already created:
- https://discord.com/api/oauth2/authorize?client_id=1071516990348460033&permissions=8&scope=bot

- [App specific configurations](./app/settings/main.go) can be found here.
- By default Console prefix to use command is `;`. Like `; --help` for dev env.

# Dev standards

- having it clean architectured as possible
- testing coverage should be no less than 80%, ideally 90%+
- following different OOP principles, like having minimum exposed interfaces to rest of a code
- following semantic versioning with the help of [darklab_autogit](https://github.com/darklab8/darklab_autogit)
- following semantic versioning and generating changelogs with the help of [autogit](https://github.com/darklab8/autogit)
- Keep amount of dependencies low for easier long term maintanance. Recheck what u can remove.
- To simplify long term maintanance, dependencies will be vendored in.

# Project status

- Finished its core development of features
- In long term maintenance mode

# Acknowledgements

- Freelancer Discovery API provided by [Alex](https://github.com/dsyalex) as a way to deliver info from Flhook to the bot
- [Pobbot](https://github.com/dr-lameos/Pobbot) originally made by dr.lameos sparkled this project
- Forum tracking is inspired by Biqqles project [forumlancer](https://github.com/biqqles/forumlancer)
1 change: 1 addition & 0 deletions docs/features/alerts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Alerts
1 change: 1 addition & 0 deletions docs/features/tracking_bases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Base tracking
1 change: 1 addition & 0 deletions docs/features/tracking_forum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Forum tracking
1 change: 1 addition & 0 deletions docs/features/tracking_players.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Player tracking
57 changes: 21 additions & 36 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# Description
# Darkbot - Introduction

- This project is a discord bot **Darkbot3** for open source game community [Freelancer Discovery](https://discoverygc.com/)
- It underwent a major refactorization and now reimplemented in golang with clean architecture for code scalability to add new features
- general stability added, because all errors are now handled way better with Golang approach that handles most of them at compile time.
- project saves ready for deployment docker images [at docker hub](https://hub.docker.com/repository/docker/darkwind8/darkbot/general), see [settings here](https://github.com/darklab8/fl-darkbot/blob/master/infra/kubernetes/charts/darkbot/templates/main.yml)
- darkbot has its own server now only for itself
- It implements Discord bot to track player bases, players themselves and forum posting with notifications to Discord.
- The logic of it: User connects darkbot to some discord channel, and sets settings which space bases, player tags or space systems to track. Darkbot repeatedly updates information to discord channel

User connects darkbot to some discord channel, and sets settings which space bases, player tags or space systems to track.
Darkbot repeatedly updates information to discord channel
# Features

- Adding player bases for tracking in discord channel
- Adding players for tracking based on tag in nickname or star systems / regions to track
- Adding configurable alert triggers to base, player of forum tracking
- Adding forum post for tracking

# Important links

- [Documentation for the bot, how to use it](https://darklab8.github.io/fl-darkbot/)
- [Discovery Forum Thread and anouncements](https://discoverygc.com/forums/showthread.php?tid=188040)
- [Github of the project](https://github.com/darklab8/fl-darkbot)
- [See other Dark Tools for Freelancer here](https://darklab8.github.io/blog/pet_projects.html#DiscoveryFreelancercommunity)

# How to get started

Expand All @@ -23,38 +31,15 @@ Darkbot repeatedly updates information to discord channel

- remove tag by `. base remove Research Station` or by `. base tags clear`

See other documentation in [Darkbot forum posts](https://discoverygc.com/forums/showthread.php?tid=188040)
- it has documented new appeared features and commands

# Features

- Adding player bases for tracking in discord channel
- Adding players for tracking based on tag in nickname or star systems / regions to track
- Adding configurable alert triggers to base, player of forum tracking
- Adding forum post for tracking

# Project status

- Finished its core development of features
- Still processes minor feature requests to implement
- May have some issues which will be resolved as soon as possible
- Announcement about new releases will be made into Discord channel where it joined and here.

# Possible future plans

- Adding resource tracking at player bases (blocked)
- Requires API access, which is lacked for implementation
- Adding some useful help scripts to calculate analytics
Continue with [documentation there](https://darklab8.github.io/fl-darkbot/)

# Acknowledgements
# Development specific stuff

- Freelancer Discovery API provided by [Alex](https://github.com/dsyalex) as a way to deliver info from Flhook to the bot
- [Pobbot](https://github.com/dr-lameos/Pobbot) originally made by dr.lameos sparkled this project
- Forum tracking is inspired by Biqqles project [forumlancer](https://github.com/biqqles/forumlancer)
See [Github Readme.md](<https://github.com/darklab8/fl-darkbot/blob/master/README.md>) for details

# Contacts

- [join Darklab discord server](https://discord.gg/zFzSs82y3W)
- [write to Discovery forum account](https://discoverygc.com/forums/member.php?action=profile&uid=42166)
- [or write to email dark.dreamflyer@gmail.com]
- [Github repository of the project](https://github.com/darklab8/fl-darkbot)
- or write to email `dark.dreamflyer@gmail.com`
- [Optionally open Github Issue at repository](https://github.com/darklab8/fl-darkbot)
68 changes: 68 additions & 0 deletions docs/index_assets/logo_licensing/logo.html

Large diffs are not rendered by default.

Binary file added docs/index_assets/logo_licensing/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/index_assets/logo_licensing/logo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Let's Get Dangerous by SkidMarc25 on DeviantArt
File renamed without changes.

0 comments on commit 9895c12

Please sign in to comment.