Skip to content

Commit 2c22da6

Browse files
committed
Add some docs
1 parent 73c75dd commit 2c22da6

File tree

37 files changed

+544
-1
lines changed

37 files changed

+544
-1
lines changed

.deploy/README.adoc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
= .deploy / AWS Lambda
2+
3+
A https://aws.amazon.com/cdk[CDK] script to deploy the bot into a serverless environment:
4+
5+
* https://aws.amazon.com/api-gateway[API Gateway] is used as an HTTP ingestor
6+
* The webhook is implemented as an https://aws.amazon.com/lambda[AWS Lambda]
7+
* https://aws.amazon.com/dynamodb[DynamoDB] is used for data storage
8+
* https://aws.amazon.com/step-functions[Step Functions] are used for scheduling things in future

.deploy/lambda/README.adoc

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
= https://t.me/jprof_by_bot[@jprof_by_bot]
2+
3+
Official Telegram bot of Java Professionals BY community.
4+
5+
== What is this bot for?
6+
7+
* Tracks http://openjdk.java.net/jeps/0[JEPs] popularity
8+
* Tracks popularity of YouTube videos from Java-related channels
9+
* Warns users when they mention Kotlin
10+
* Allows users to pin messages
11+
* Allows users to create polls with reply buttons (just like https://t.me/like[`@like`] bot)
12+
13+
So, it just brings some fun and interactivity in our chat.
14+
15+
== Contributing
16+
17+
Here are the most important rules if you want to make a contribution:
18+
19+
* Split the code into modules based on features
20+
* Stick to the technologies that can fit into AWS free tier
21+
22+
The rest could be found in link:./.github/CONTRIBUTING.md[the contributing guide].

.github/CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Before you begin:
66

7-
- This project is powered by [Kotlin](https://kotlinlang.org), [AWS](https://aws.amazon.com), [TypeScript](https://www.typescriptlang.org) and [GitHub Actions](https://github.com/features/actions).
7+
- This project is powered by [Kotlin](https://kotlinlang.org), [TelegramBotAPI](https://github.com/InsanusMokrassar/TelegramBotAPI), [Koin](https://insert-koin.io), and [Skija](https://github.com/JetBrains/skija) libraries, [AWS](https://aws.amazon.com) services and [CDK](https://aws.amazon.com/cdk) with [TypeScript](https://www.typescriptlang.org), and [GitHub Actions](https://github.com/features/actions).
88
- Have you read the [code of conduct](CODE_OF_CONDUCT.md)?
99
- Check out the [existing issues](https://github.com/JavaBy/jprof_by_bot/issues).
1010
- Discuss your plans in [the chat](https://t.me/jprof_by) or in an issue.

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
build
33

44
.idea
5+
6+
*.private.env.json

README.adoc

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
11
= https://t.me/jprof_by_bot[@jprof_by_bot]
22

33
Official Telegram bot of Java Professionals BY community.
4+
5+
== What is this bot for?
6+
7+
* Tracks http://openjdk.java.net/jeps/0[JEPs] popularity
8+
* Tracks popularity of YouTube videos from Java-related channels
9+
* Warns users when they mention Kotlin
10+
* Allows users to pin messages
11+
* Allows users to create polls with reply buttons (just like https://t.me/like[`@like`] bot)
12+
13+
So, it just brings some fun and interactivity in our chat.
14+
15+
== Contributing
16+
17+
Here are the most important rules if you want to make a contribution:
18+
19+
* Split the code into modules based on features
20+
* Stick to the technologies that can fit into AWS free tier
21+
22+
The rest could be found in link:./.github/CONTRIBUTING.md[the contributing guide].

core/README.adoc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
= Core
2+
3+
The core of the bot is a https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern[chain-of-responsibility pattern].
4+
There are only two classes here:
5+
6+
- link:src/main/kotlin/by/jprof/telegram/bot/core/UpdateProcessor.kt[`UpdateProcessor`], a stand-alone… https://tgbotapi.inmo.dev/docs/dev.inmo.tgbotapi.types.update.abstracts/-update/index.html[`Update`] processor.
7+
All user-facing features are implemented via them.
8+
Update processor should only process the updates it knows about and filter out everything else.
9+
- link:src/main/kotlin/by/jprof/telegram/bot/core/UpdateProcessingPipeline.kt[`UpdateProcessingPipeline`], a set of registered update processors + dispatching logic.
10+
All the incoming updates (the bot listens for every message in a chat) are passed to the pipeline.
11+
The pipeline dispatches the updates asynchronously to the registered update processors and handles timeouts and exceptions from them.
12+
13+
image::docs/core.svg[]

0 commit comments

Comments
 (0)