Skip to content

drveles-X-zkhrg/campus_map_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy to Server

Campus map bot

Stack: Python, Redis, Docker, CI/CD, Linux
Libraries: FastAPI, aiogram, asyncio, requests, logging, pydantic, re

⚡ With this bot, you can find out if a student is on campus and what workplace he is at.

Описание на русском здесь.

Features

✅ Create a list of friends to search for all at once.
✅ Quick search by nickname.

Project structure

The project consists of microservices. Each is located in its own docker container. All this is managed using docker-compose.

Image 1

diagram of how containers interact with each other within the network

Frontend

The service is responsible for the operation of the telegram-bot via REST API which is wrapped in a library for the python. Responsible for receiving data from the user, sending this data to the API, and sending responses.

Parser

The service parses data from the educational platform. We log in to the platform and using the API of the School, we get the location data of the students and send it to our API in the form of json.

API

It serves as a link between all services:

  • Accepts requests from frontend, accesses Redis and returns data about the requested students.
  • Accepts new student data from the parser and updates records in Redis

Redis

Stores data about students on campus and lists of friends in an impersonal form. It automatically makes a backup, and when the docker container is restarted, it starts from the previous backup.

CI/CD

We use github actions to test the code, automatically deliver updates to the server.

Usage example

Image 1

bot in usage

Other | Links

Try the bot. Nickname example: jenniffr or diamondp.

Join the discussion

Report bugs in issues