Skip to content

fpetrov/UnoTrip

Repository files navigation

Logo

✈️ UnoTrip bot

Manage your travels with ease

Technical task: link

Link: @uno_trip_bot

Database Diagram

ER Diagram

⚙️ Technologies

.NET

.NET is the free, open-source, cross-platform framework for building modern apps and powerful cloud services.

All backend side of project written completely in C#. Telegram bot just invokes it.

Version: 8.0

Python is used successfully in thousands of real-world business applications around the world, including many large and mission critical systems.

It's used to write bot's logic and behavior.

Version: 3.12

aiogram is a modern and fully asynchronous framework for Telegram Bot API using asyncio and aiohttp.

Version: 3.4

HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2.

Version: 0.27.0

PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

In project used as the main database.

Version: 16.2

The in-memory data store used by millions of developers as a cache, vector database, document database, streaming engine, and message broker.

In project redis used as storage for states.

Version: 7.2

🤝 Integrations

OpenStreetMap is built by a community of mappers that contribute and maintain data about roads, trails, cafés, railway stations, and much more, all over the world.

In the project, the interaction with OpenStreetMap API is implemented using geopy lib.

Service for conveniently building routes between points on the map. The user can view the route of a trip through webview that appears when clicking on the inline button.

This API used to get nearby sights, restaurants and etc. for location.

API to easily get current weather in specified location.

🖥️ Demonstration

Demo

🛠️ Local development & testing

Clone repository with git

git clone https://github.com/fpetrov/UnoTrip

Navigate to the project directory

cd ./UnoTrip

Create virtual enviroment & activate it

Windows

python -m venv venv
venv\Scripts\activate

Linux

python -m venv venv
source venv/bin/activate

Install dev requirements

pip install -r requirements/dev.txt

Run bot in development mode

Run backend service

cd UnoTrip.Backend
dotnet run UnoTrip.Api

Run OpenStreetMap service

cd UnoTrip.OpenStreetMap
python -m app

Run bot

python -m UnoTrip.Bot

🚀 Deploying

This app uses Docker Compose for production deployment.

Structure:

uno_trip /
    postgres (starts at 5432 port in your local network)
    redis (starts at 6379 port in your local network)
    api (starts at 8080 port in your local network)
    bot

NOTE: You have to manually start UnoTrip.OpenStreetMap service because it uses Selenium to render maps.

Clone repository with git

git clone https://github.com/fpetrov/UnoTrip

Navigate to the project directory

cd UnoTrip

Pull actual docker images

docker compose pull

Start containers (in detached mode)

docker compose up -d --build

About

Telegram bot for managing your trip with ease

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages