A powerful Telegram bot that helps you track the availability of Amul's protein-rich products including protein shakes, lassi, whey protein, paneer, and more. Get real-time notifications when your favorite products are back in stock in your local area!
- π Browse Products: View all Amul protein products with real-time availability
- π Location-Based: Set your pincode to get local stock updates
- οΏ½ Smart Notifications: Get notified instantly when tracked products are back in stock
- οΏ½ Stock Tracking: Monitor inventory levels and stock changes
- β‘ Real-Time Updates: Automated checks every 3 minutes
- π± User-Friendly: Simple Telegram interface with inline buttons
- π― Selective Tracking: Track only the products you care about
- π Analytics: View bot statistics and usage data
- Start the Bot: Click here to open @AmulOSSBot
- Set Your Location: Use
/setpincode YOUR_PINCODE
to set your area - Browse Products: Use
/products
to see all available items - Track Items: Click the "Track" button next to products you want to monitor
- Get Notified: Receive instant notifications when items are back in stock
/start # Welcome message and setup
/setpincode 400001 # Set your pincode (Mumbai in this example)
/products # Browse all protein products
/tracked # View your tracked items
/support # Get help and contact info
Command | Description | Example |
---|---|---|
/start |
Initialize bot and show welcome message | /start |
/setpincode |
Set your delivery pincode | /setpincode 400001 |
/products |
List all available Amul protein products | /products |
/tracked |
Show products you're currently tracking | /tracked |
/pincode |
View your current pincode setting | /pincode |
/support |
Get support and contact information | /support |
Command | Description |
---|---|
/broadcast |
Send message to all bot users |
/stats |
View bot usage statistics |
/sessions |
View active Amul API sessions |
- Runtime: Node.js 18+ with TypeScript
- Bot Framework: Telegraf.js - Modern Telegram bot framework
- Database: MongoDB with Mongoose ODM
- HTTP Client: Axios for API requests
- Caching: Redis for performance optimization
- Scheduling: node-cron for automated stock checks
- Process Management: PM2 for production deployment
- Code Quality: ESLint + Prettier for code formatting
- Node.js 18+ and pnpm
- MongoDB database
- Redis server (optional, for caching)
- Telegram Bot Token (from @BotFather)
# Clone the repository
git clone https://github.com/SwapnilSoni1999/amul-notify.git
cd amul-notify
# Install dependencies
pnpm install
# Setup environment variables
cp .env.example .env.dev
# Edit .env.dev with your configuration
# Run in development mode
pnpm run dev
# Or build and run in production
pnpm run build
pnpm start
Create .env.dev
for development or .env.prod
for production:
# Bot Configuration
BOT_TOKEN=your_telegram_bot_token
BOT_USERNAME=YourBotUsername
# Database
MONGODB_URI=mongodb://localhost:27017/amul-notify
# Redis (Optional)
REDIS_URL=redis://localhost:6379
# Bot Settings
TRACKER_ENABLED=true
LOG_CHANNEL_ID=your_log_channel_id
ADMIN_USER_IDS=123456789,987654321
# Environment
NODE_ENV=development
pnpm run dev # Start development server with hot reload
pnpm run build # Build the project
pnpm start # Start production server
pnpm run lint # Run ESLint
pnpm run prettier # Format code with Prettier
pnpm run seed:dev # Seed database with admin users (development)
pnpm run seed:prod # Seed database with admin users (production)
# Install PM2 globally
npm install -g pm2
# Build the project
pnpm run build
# Start with PM2
pm2 start dist/server.js --name "amul-notify"
# Monitor
pm2 status
pm2 logs amul-notify
# Build Docker image
docker build -t amul-notify .
# Run container
docker run -d \
--name amul-notify \
--env-file .env.prod \
-p 3000:3000 \
amul-notify
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow the existing code style and conventions
- Add tests for new features
- Update documentation as needed
- Use conventional commit messages
- Ensure all emojis use the centralized
emoji.util.ts
- Monitors product availability every 5 minutes
- Tracks inventory changes across different locations
- Sends instant notifications when products come back in stock
- Uses Indian pincode system for location detection
- Shows only products available in your delivery area
- Supports multiple substores and distribution centers
- Automatic user registration on first interaction
- Tracks user preferences and pincode settings
- Rate limiting to prevent spam
- Broadcast messages to all users
- View comprehensive bot statistics
- Monitor API sessions and performance
- Privacy: This bot only stores your Telegram user ID and chosen pincode for functionality
- Data Source: All product data is fetched from the official Amul store (shop.amul.com)
- Unofficial: This project is not affiliated with or endorsed by Amul
- Purpose: Educational and utility project to help users track product availability
This project is licensed under the MIT License - see the LICENSE file for details.
- Amul for providing the product data through their public API
- Telegraf.js for the excellent Telegram bot framework
- All contributors and users who help improve this bot
Made with β€οΈ by Swapnil Soni