ChainKeeper Bot
ChainKeeper Bot is a Telegram bot that helps you keep track of your bicycle chain maintenance by integrating with Strava. It monitors the distance you've traveled and reminds you when it's time to clean or lube your chain.
You can use my instance https://t.me/chainkeeper_bot or host it by yourself.
Features
Connects to your Strava account to fetch activity data.
Tracks when you last cleaned and lubed your chain.
Sends reminders when it's time to clean or lube your chain based on distance traveled.
Allows you to update maintenance intervals and reset maintenance counters.
Setup
Prerequisites
Docker
Docker Compose
A Telegram bot token (you can obtain one from BotFather )
A MongoDB instance (you can use MongoDB Atlas free tier or a local instance)
Strava API credentials (Client ID and Client Secret from StravaDevelopers )
Domain with HTTPS (you can use sslip.io )
Environment Variables
Create a .env file in the root of the project with the following environment variables:
TELEGRAM_BOT_TOKEN=<your_telegram_bot_token>
MONGODB_URI=<your_mongodb_uri>
STRAVA_CLIENT_ID=<your_strava_client_id>
STRAVA_CLIENT_SECRET=<your_strava_client_secret>
STRAVA_AUTH_URL=https://www.strava.com/oauth/authorize
STRAVA_REDIRECT_URI=https://<domain_with_ssl>/auth/strava/callback
PORT=8080
Copy
Usage
Start docker compose docker-compose up -d
Start a chat with the bot on Telegram.
Use the /start command to begin.
Follow the instructions to connect your Strava account and set the intervals for cleaning and lubing your chain.
The bot will track your activities and remind you when it's time to clean or lube your chain.
Notes
The service is provided as is without any warranties. The author is not responsible for any issues arising from the use of this service.
The bot uses the Strava API to fetch activity data.
Feel free to contact the author on Telegram: @iceflame