Code Monkey home page Code Monkey logo

kz-geekabitz-happy-rabbit's Introduction

happy-rabbit

Happy Rabbit is a service that inspires kids to perform activities on a regular basis by earning carrots. Happy Rabbit experience is powered by gamification and behavioural psychology. We are confindent that your children will have lots of fun making boring math, learning chess, jogging or helping parents with household.

Tech-Stack

  • Admin and API: API and Admin
  • telegram bot: python-telegram-bot + dramatiq+periodiq + redis
  • storage:
    • Admin powered by Postgres
    • Google Spreadsheet for activity records
  • CI/CD: deployment Dokku + GitHub Actions template

Sparkline

Check the example bot that uses the code from Main branch: t.me/happy-rabbit

Features

Design of the project is wrapped in google-doc.

Documentation

How to run

Quickstart: Pooling & SQLite

The fastest way to run the bot is to run it in pooling mode using SQLite database without Periodiq workers for background tasks. This should be enough for quickstart:

git clone https://github.com/Rustem/kz-geekabitz-happy-rabbit
cd django-telegram-bot

Create virtual environment (optional)

python3 -m venv happy-rabbit-venv
source happy-rabbit-venv/bin/activate

Install all requirements:

pip3 install -r requirements.txt

Create .env file in root directory and copy-paste this:

DJANGO_DEBUG=True
DATABASE_URL=sqlite:///db.sqlite3
TELEGRAM_TOKEN=<ENTER YOUR TELEGRAM TOKEN HERE>

Run migrations to setup SQLite database:

python manage.py migrate

Create superuser to get access to admin panel:

python manage.py createsuperuser

Run bot in pooling mode:

python manage-bot.py 

If you want to open Django admin panel which will be located on http://localhost:8000/admin/:

python manage.py runserver

Run locally using docker-compose

If you like docker-compose you can check full instructions in our Wiki.

Deploy to Production

Read Wiki page on how to deploy production-ready.


kz-geekabitz-happy-rabbit's People

Contributors

rustem avatar mafioso avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.