{"id":16318410,"url":"https://github.com/shishnk/weather-bot-api","last_synced_at":"2025-03-16T14:30:57.622Z","repository":{"id":233273983,"uuid":"769552307","full_name":"shishnk/weather-bot-api","owner":"shishnk","description":"Telegram bot designed to provide weather data to users","archived":false,"fork":false,"pushed_at":"2024-07-31T15:27:50.000Z","size":154,"stargazers_count":8,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T10:35:35.590Z","etag":null,"topics":["asp-net-core","clean-architecture","csharp","docker","postgresql","rabbitmq","redis","testcontainers","xunit-tests"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shishnk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-09T12:01:22.000Z","updated_at":"2024-09-01T10:50:40.000Z","dependencies_parsed_at":"2024-10-27T10:54:36.607Z","dependency_job_id":"5d8e509d-2e3c-4cdc-8d5c-83e290236a22","html_url":"https://github.com/shishnk/weather-bot-api","commit_stats":null,"previous_names":["shishnk/weather-bot-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shishnk%2Fweather-bot-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shishnk%2Fweather-bot-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shishnk%2Fweather-bot-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shishnk%2Fweather-bot-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shishnk","download_url":"https://codeload.github.com/shishnk/weather-bot-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818195,"owners_count":20352629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net-core","clean-architecture","csharp","docker","postgresql","rabbitmq","redis","testcontainers","xunit-tests"],"created_at":"2024-10-10T22:23:27.438Z","updated_at":"2025-03-16T14:30:56.974Z","avatar_url":"https://github.com/shishnk.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](./LICENSE)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/shishnk/weather-bot-api/dotnet.yml?style=for-the-badge\u0026label=BUILD%2FTESTS)\n![Coveralls](https://img.shields.io/coverallsCoverage/github/shishnk/weather-bot-api?style=for-the-badge)\n![Website](https://img.shields.io/website?url=https%3A%2F%2Fwttr.in%2F\u0026style=for-the-badge\u0026label=wttr.in)\n\n# WeatherBotApi\n\n## Overview\n\nWeatherBotApi is an educational project aimed at learning microservices development on the .NET platform and improving skills in ASP.NET, RabbitMQ, Entity Framework, PostgreSQL, Mapster, Redis, Docker, and xUnit.\n\n## Description\n\nWeatherBot is a Telegram bot designed to provide weather data to users. The project is implemented using a microservices architecture, consisting of three services:\n\n1. **TelegramApi:** A service responsible for handling user requests via the Telegram bot.\n2. **DatabaseService:** A service responsible for database operations, including storing and retrieving user data and their requests.\n3. **WeatherService:** A service responsible for fetching weather information from an external source.\n\n## Weather API\nThe [wttr.in](https://github.com/chubin/wttr.in) is used to provide weather, which is  a console-oriented weather forecast service that supports various information representation methods like terminal-oriented ANSI-sequences for console HTTP clients (curl, httpie, or wget), HTML for web browsers, or PNG for graphical viewers.\n\n\n## Architecture\n\nThe following diagram illustrates the interaction between different services in the project:\n\n```mermaid\nflowchart TD;\n    A[Telegram API] --\u003e|Sends requests| B((RabbitMQ));\n    B --\u003e|Sends requests| D[Database Service];\n    D --\u003e|Retrieves data| B;\n    B --\u003e|Forwards requests| C[Weather Service];\n    C --\u003e|Retrieves weather data| B;\n\n```\n\n## Technology Stack\n\n- ASP.NET\n- RabbitMQ (MassTransit can be used, but it provides a high-level API)\n- Entity Framework\n- PostgreSQL\n- Mapster\n- Docker\n- Redis\n- xUnit\n\n## Installation and Running\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/shishnk/weather-bot-api.git\n   ```\n2. **Build Docker containers:**\n    ```bash\n    git cd weather-bot-api\n    docker-compose build\n    ```\n3. **Run containers:**\n    ```bash\n    docker-compose up\n    ```\n    \n## Configuration\n\nBefore running the project, ensure you have configured the necessary environment variables:\n\n1. **Telegram Bot Configuration:**\n    - Create a new bot via [BotFather](https://t.me/botfather) on Telegram.\n    - Obtain the token for accessing the bot's API.\n\n2. **Update the existing .env file:**\n    - Open file in the root directory of your project.\n    - Add or update the following line in the .env file with your Telegram bot token:\n      ```\n      TELEGRAM_BOT_TOKEN=YOUR_TELEGRAM_BOT_TOKEN\n      ```\n    - Replace `YOUR_TELEGRAM_BOT_TOKEN` with your actual Telegram bot token obtained from BotFather.\n\nOnce you have updated the existing .env file with your Telegram bot token, you are ready to run the project.\n\n\n## Contribution and Feedback\n\nIf you have suggestions for improving the project or found a bug, please open an issue or submit a pull request. We welcome your contributions!\n\n\n## License\n\nThe project is licensed under the MIT license. For more information, see the [LICENSE](https://github.com/shishnk/weather-bot-api/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshishnk%2Fweather-bot-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshishnk%2Fweather-bot-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshishnk%2Fweather-bot-api/lists"}