Log your daily activities quickly and effortlessly.
I wanted a simple and efficient way to maintain a daily diary and publish entries effortlessly. After exploring various tools, I couldn’t find a solution that perfectly suited my needs. So, I decided to build one tailored to my requirements.
- Log Activities: Send your daily activities as messages to a Telegram bot.
- Data Collection: The bot collects and organizes all your messages for the day.
- Content Processing: At the end of the day, the backend system processes the collected data to:
- Fix grammar errors.
- Generate a title and summary using a Large Language Model (LLM) powered by Groq AI.
- Publishing: The processed content is pushed to the Diary Application for publishing.
- Language: Go
- Bot Integration: Telegram Bot API
- Database: SQLite3
- AI Assistance: Groq AI
- Publish the diary Go-Git
- Clone the Repository:
git clone https://github.com/rafitc/diary
- Obtain API Key: Get an API key from Groq AI.
- Obtain Telegram Token Create your own telegram bot using bot father and get the API key
- Build the Docker Image:
docker build -t diary-writer . - Configure Application:
- Create a
config.yamlfile with your credentials and settings.
- Create a
- DB setup
- Install sqlite3 db in your system
- Create a folder to create DB. Eg:-
mkdir -p /diary-writer/db - Create DB and tables. Run this Query
- Config setup
- Create config.yaml file and update it with your Git credentials, API keys, folder path etc
- Create a docker config using config.yaml. Eg:-
docker config create diary-writer-config config.yaml
- Set Up Docker Service:
- Mount the SQLite3 database as a volume.
- Use the
diary-writer-configconfig to mount as a config
- Deploy the Service: Run the application as a Docker service.
- Docker service script
docker service create \ --name my-diary-writer \ --mount type=bind,source=/diary-writer/db,target=/root/sqlite-db \ --config source=diary-writer-config,target=/root/config/config.yaml \ diary-writer:latest
- Verify the deployment You can verify and check the status using
docker logs -f <CONTAINER-ID>