The main purpose of this project was to play around with some of the tools needed for developing a multi-service system. Specifically:
- Service 1:
telegram
was used to for interfacing with users. - Service 2:
django
anddjangorestframework
were used for processing and storing user data (serializers
andviewsets
were used to simplify the process). Two API endpoints were exposed (see more on this later). docker
was used for containerising the services anddocker-compose
was used to make local testing easier.heroku
was used to deploy both services. The system is live, and you can interface with it by messaging@FriendDetectorBot
on Telegram.
Here is a high-level overview of the desired functionality:
- A Telegram bot (
@FriendDetectorBot
) receives a name from a user. - The name is stored in a database
- When a person-detecting CNN identifies a person, it says "Hello <name>". (this is incomplete)
After a user starts a conversation with the telegram bot, you can then \stage
a name. This entails:
- Sending a
POST
request to an API endpoint exposed by the django app. - If the django app successfully adds the name to the database, the telegram bot notifies the user that the name was staged.
In order to validate whether the name has been staged, you can use \get_staged
. This does the following:
- Sends a
GET
request to an API endpoint exposed by the django app. - Retrieves the most recent name from the database.
- Returns the name to the telegram bot, which then sends it back to the user.
The entire process is demonstrated again here for the name "Anderson".