This Telegram bot hopes to make the Bible more accessible, and hopefully to give a timely answer to those looking for it.
Star this repo if you found it useful. Use the github issue tracker to give feedback on this repo.
See LICENSE
Hi, I'm Julwrites
ScriptureBot is built as a 5 layer service:
- Web App (GET)
- Incoming Translation Layer from Platform specific properties
- Logic Layer
- Outgoing Translation Layer to Platform specific properties
- Web App (POST)
The Translation Layer is implemented in BotPlatform, which abstracts all the translation tasks from the Logic layer.
Additionally there is a BotSecrets integration with the WebApp layer which provides all sensitive data to the bot on a as-needed basis.
We are using Go 1.12 for this version of the framework.
Naming Convention:
- Variables should be named using camelCase.
- Methods should be named using underscore_case.
- Classes should be named using PascalCase.
- Packages should be named using underscore_case, in keeping with Python STL.
- Constants should be named using CAPITALCASE
This keeps the entities visually separate, and syntax clean.
As much as possible, each file should contain one of 3 things:
- A class and related methods
- A set of utility methods
- Business logic/End point logic
This is intended to facilitate separation of responsibility for loose coupling.
On a fresh repository, run go mod init
and go mod tidy
to get all the necessary go modules for runtime
To test, run go test github.com/julwrites/ScriptureBot/pkg/<module>
, e.g go test github.com/julwrites/ScriptureBot/pkg/app
This repository uses go module to manage dependencies, and is hosted on gcloud cloud run.
As such it requires gcloud CLI to package the Dockerfile
The artifact repository is set to us-central1
As such the docker container can be built using the following command
docker build -f Dockerfile -t us-central1-docker.pkg.dev/${PROJECT_ID}/scripturebot/root:latest .
And then uploaded using
docker push docker build -f Dockerfile -t us-central1-docker.pkg.dev/${PROJECT_ID}/scripturebot/root:latest .
And finally deployed using
gcloud run deploy scripturebot --image us-central1-docker.pkg.dev/${PROJECT_ID}/scripturebot/root:latest --region us-central1