Skip to content

A serverless notification bot to spot TooGoodToGo magic bags before everyone else, ensuring you never miss a deal! πŸš€

License

Notifications You must be signed in to change notification settings

jordantete/TooGoodNotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TooGoodNotify

MarineGEO circle logo

πŸ“Œ Overview

TooGoodNotify is a customizable notification bot for TooGoodToGo (TGTG) deals, designed to monitor TGTG magic bags and notify users via Telegram. Built with a modular architecture and optimized for efficient event-driven operations, this bot is ready for seamless deployment on AWS Lambda.

πŸš€ Features

  • πŸ”„ Automated Monitoring: Tracks TGTG magic bags on a set schedule and sends timely notifications.
  • πŸ’¬ Telegram Integration: Allows users to interact with the bot through Telegram commands.
  • 🌍 Multi-language Support: Available in English and French.
  • ☁️ AWS Lambda Compatible:: Efficient, serverless deployment.

πŸ› οΈ Installation

  1. Clone the Repository:
git clone https://github.com/jordantete/TooGoodNotify.git
cd TooGoodNotify
  1. Set Up Conda Environment:
conda env create -f environment.yml
conda activate too_good_notify_env
  1. Configure Environment Variables in Conda:

To set multiple environment variables at once, use a .env file. This is faster and keeps your configuration organized.

At the root of the project, create a .env file and add the necessary environment variables:

# .env
[email protected]
SENDER_EMAIL_PASSWORD=your_email_password
[email protected]
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id
ACCESS_TOKEN=your_tgtg_access_token
REFRESH_TOKEN=your_tgtg_refresh_token
USER_ID=your_tgtg_user_id
TGTG_COOKIE=your_tgtg_cookie
USER_AWS_ACCOUNT_ID=your_aws_user_account_id
LAMBDA_MONITORING_ARN=lambda_arn
  1. Creating the Lambda Layer:

To create the Lambda layer, use the following commands:

cd lambda_layer
mkdir -p python
pip install \
    --platform manylinux2014_x86_64 \
    --target=python \
    --implementation cp \
    --python-version 3.10 \
    --only-binary=:all: \
    -r requirements_layer.txt
zip -r lambda_layer.zip python/
aws lambda publish-layer-version --layer-name TooGoodNotifyLayer --description "Layer for dependencies" --zip-file fileb://lambda_layer.zip --compatible-runtimes python3.10

🀝 Contributing

Contributions are welcome! If you have ideas, improvements, or bug fixes, feel free to submit an issue or a pull request. Please ensure that your contributions follow the project’s coding standards and include clear descriptions for any changes.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for more details.

πŸ‘€ Feedback

Have any questions or feedback? Feel free to reach out via the issues tab on GitHub. We’d love to hear from you!

About

A serverless notification bot to spot TooGoodToGo magic bags before everyone else, ensuring you never miss a deal! πŸš€

Topics

Resources

License

Stars

Watchers

Forks

Languages