https://github.com/itsrainingmani/bogo-bot
Zulip Bot for pairing Recursers wanting BOGO Lunch deals
https://github.com/itsrainingmani/bogo-bot
bogo flask zulip-bot
Last synced: 25 days ago
JSON representation
Zulip Bot for pairing Recursers wanting BOGO Lunch deals
- Host: GitHub
- URL: https://github.com/itsrainingmani/bogo-bot
- Owner: itsrainingmani
- License: mit
- Created: 2024-03-26T15:52:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-16T20:39:04.000Z (about 2 years ago)
- Last Synced: 2026-05-01T01:00:53.596Z (about 1 month ago)
- Topics: bogo, flask, zulip-bot
- Language: Python
- Homepage:
- Size: 62.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# RC UberEats BOGO Bot
There are many UberEats Buy One Get One deals available around 397 Bridge St. This is a Zulip bot that will pair lunchers so people can take advantage of the BOGO Deals.
This project is directly inspired by the experience of Recursers at the Brooklyn Hub & by the [RC Eats](https://recurse-eats.dim.codes/) project created by [Angelo Lloti (W2'24)](https://github.com/XdimGG)
## Create Zulip Bot
Add a bot to Zulip by following the instructions here -
Please make sure that the type of your bot is `Outgoing Webhook` since the bot will be receiving new messages via HTTP POST requests from Zulip.
```text
name: whatever
email: whatever
bot type: outgoing webhook
endpoint URL: $DOMAIN/webhooks, e.g. `.ngrok-free.app/webhooks`
> interface: generic
```
## Install Python Requirements
⚠️ This project uses python 3.12.0. Other python versions are not guaranteed to work.
Install the necessary requirements with -
```shell
pip install -r requirements.txt
```
## Set up ngrok
We are using ngrok to serve our localhost server publically. You can use any option (eg. [Tailscale Funnel](https://tailscale.com/kb/1223/funnel), [localtunnel](https://github.com/localtunnel/localtunnel)) that allows you to serve localhost to a static publicly available URL.
Make an account and get a static URL [here](https://dashboard.ngrok.com/get-started/setup/macos)
Example (use your static URL instead):
```shell
brew install ngrok/ngrok/ngrok
ngrok config add-authtoken
```
## Serve Local Web Server
```shell
DOMAIN=.ngrok-free.app
PORT=8000
ngrok http --domain=$DOMAIN $PORT
```
## Run Flask Server
```shell
flask --app server run --port 8000
```
If you'd like to hot-reload your server on code changes, add the `--debug` flag to the above command.
## DM the bot you created to test
The currently supported commands are -
```markdown
- `show deals`: to display available BOGO deals
- `status`: to show your subscription status
- `schedule`: to set your weekly pairing schedule
- `subscribe`: to start getting matched with other BOGOBot users for pair lunching
- `unsubscribe`: to stop getting matched
```
## TO DO
- user functionality
- [x] user scheduling preferences
- pairing functionality
- [x] update command list for when users are in the process of getting paired?
- [x] determine what pref info to get from users
- deals are going up and down very frequently, should we present food/deal pref option with the risk it goes down, or do we keep it so people getting paired have an idea of what the other person wants to eat?
- i was having a hard time getting the bot to list the deals in a numbered list (stef)
- are users on the queue when they respond y to the bot or after they respond with their time/pref info
- can they get put on the queue at other times during the day or is this lunch only? if we have dinner too, can people be matched for multiple meals a day?
- can people have a command to see who is currently on the queue with time/food pref?
- will 15-30 min messages be sent out to people who haven't matched/skipped about who's on the queue?
- [x] structure daily database/queue (architecture.md)
- [ ] pairing logic - timing, pref, etc
- [ ] followup for weekly stats
- unit testing
- [x] check zulip rc client connection
- [x] check supabase connection
- [ ] load in testing db
- [ ] load in deals json
- integration testing