/itd-match-bot

It's like Tinder but more cool! Demo app for my presentation on Telegram bot capabilities

Primary LanguageJava

Match Bot for Telegram

Overview

One day, one day...

Technologies

Database Structure

Redis KEYs:

  • user_id:contact:
    • first_name
    • last_name
    • chat_id
    • phone
  • user_id:profile:
    • age
    • gender
    • match_gender
    • match_min_age
    • match_max_age
  • user_id:image
  • user_id:seen
  • user_id:likes
  • user_id:dislikes
  • user_id:session
  • locations

Development guidelines

Commit to dev or feature branches, commits to master trigger deployment to Heroku and are off limits.

Local Development

  • Install ngrok from website or, on a mac, with brew cask install ngrok.
  • Expose port 8080 with ngrok http 8080
  • Add these props to application-dev.yml or set them some other way.
TELEGRAM_TOKEN: so-secret-much-token-generate-it-yourself
TELEGRAM_WEBHOOK_URL: https://...ngrok.io
REDIS_URL: redis://localhost:6379
  • Grab and start redis:
docker run --name itd-redis -p 6379:6379 -d redis:4

To examine its contents directly, use

docker exec -it itd-redis redis-cli
  • Run application and try to ping your bot from Telegram

  • To show demo from the phone:

adb devices
adb shell screenrecord --size=720x1440 --output-format=h264 - | \
    mpv - --fps=30 --untimed --no-correct-pts --framedrop=no