Koala

Koala is an all-in-one Discord bot and web-based microservice that allows communities to communicate with each other and share ideas and quotes in order to foster a sense of community.

Koala Header Image

Table of Contents

Inspiration

We had the need to build a project that allowed us to have fun and prank our friends while also benefiting our communities that we serve. This community-driven tool allows collaboration on ideas and quotes and helps to allow members of a community to bond and grow closer together.

Function

Koala allows you to share a quote, get random quotes, and insert data and other types of information into the middle of a conversation (including at the right moment!). It also has a web interface so people who don't currently have a Discord connection can still access the website to get ideas and collaborate (with offline support, beacuse it's built as a progressive web app!).

Getting Started

You'll need Python 3.7+ in your PATH. If you don't have it, look up Python and download it. Depending on what system you have, the steps can vary, but Koala is compatible with all major platforms (Windows, macOS, Linux) and major architectures as well (x86, x86_64, ARM).

Installation

Clone the repository to your computer, then open the folder in a command or terminal window.

pip3 install -r requirements.txt

Then set up your secrets file by cloning secrets-blank.json into secrets.json and replacing the key with a Discord API key that you generate yourself.

Running

python3 app.py

To exit the app, kill the process. (Ctrl+C is currently broken due to a logger async hook that isn't working properly, although this will be fixed in the future.)

Deployment

To deploy the app in a normal VPS or Docker container, simply screen the command, like so:

screen -S app
python3 app.py

Do note that screen is only available on Linux and BSD-based distributions like macOS, and is not available on Windows. Koala does not support official deployment on Windows, but it is possible to build it yourself and run it as a Windows service.

Google Cloud

Google Cloud's App Engine is the best way to deploy Koala. You can set it up as a serverless deployment in order to allow it to take advantage of cheaper per-request pricing while still using concurrency to manage requests and maximize the results.

Since this is a standard Python and Flask based-app, there are no special deployment procedures required for deploying it to Google Cloud. Simply follow the official documentation for creating a Google Cloud account and service worker and everything will function as expected.

Tech Stack

Koala is written in Python 3.7+ and requires several libraries:

  • discord.py: discord.py is a modern, easy to use, feature-rich, and async ready API wrapper for Discord.
  • Flask: Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. It began as a simple wrapper around Werkzeug and Jinja and has become one of the most popular Python web application frameworks.
    • Jinja2: Jinja2 is a full-featured template engine for Python. It has full unicode support, an optional integrated sandboxed execution environment, widely used and BSD licensed.
    • Werkzeug: Werkzeug is a comprehensive WSGI web application library. It began as a simple collection of various utilities for WSGI applications and has become one of the most advanced WSGI utility libraries.

Sustainable Development

Koala follows the 9th goal of the United Nations Sustainable Development guidelines, to build resilient infrastructure, promote inclusive and sustainable indsutrialization and foster innovation. With this tool, we will be able to drive R&D and allow talent to be invested more in R&D and developing emerging technologies.

Team

Koala is produced by Amanda Huang and Gideon Tong. We are a global team!

About Amanda: Amanda is a second-year UC Davis student studying mechanical engineering! She is currently living abroad in Asia. You can email her at amanda@amandahuang.me. Additionally, visit her website at amandahuang.me.

About Gideon: Gideon is a second-year UC San Diego student studying electrical engineering! He is currently living in California (and practicing safe social distancing). You can email him at gideon@gideontong.com. Additionally, visit his website at gideontong.com.

Domain

Our Domain.com submission is VaccineCyber.space, since wouldn't it be cool if we could just transmit the vaccine into cyberspace and be done with this pandemic?

License

Exclusive Copyright © 2021 by Amanda Huang and Gideon Tong

We have plans to make the code open-source after it is properly santizied and production-quality and production-ready. Thanks!

Future Plans

We want to expand Koala's use to all over the world so communities anywhere can take advantage of this useful tool to communicate with their friends and collaborate on beautiful ideas and make the world a better place.

Built With

Share this project:

Updates