Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

🌩️ Telegram Weather Bot

Stay updated with the latest weather forecasts directly through Telegram!

Webpage Preview

Webpage Screenshot

Bot Interface

Here’s how the Telegram bot looks in action:

Bot Screenshot

Project Overview

Telegram Weather Bot is a project consisting of two main components:

  1. nest-backend-bot:
    A Telegram bot built with NestJS that integrates the OpenWeatherMap API and MongoDB to provide weather information to users.

  2. admin-panel:
    A web-based admin panel to control and monitor users of the Telegram bot, as well as manage API keys.


Folder Structure

root/
 ├── nest-backend-bot/   # Backend for the Telegram bot
 └── admin-panel/        # Frontend admin panel to manage the bot
  • nest-backend-bot: Contains the NestJS backend project that powers the Telegram bot.
  • admin-panel: Contains the React + Vite frontend project for the admin panel.

Deployment


How to Run Locally

Prerequisites

  • Node.js (v16 or above)
  • npm or yarn
  • MongoDB

1. Clone the Repository

git clone https://github.com/rishabhknowss/Weather_bot.git
cd Weather_bot

2. Setup Environment Variables

Create .env files for both nest-backend-bot and admin-panel.

nest-backend-bot/.env

TELEGRAM_BOT_TOKEN=your-tg-bot-token
WEATHER_API_KEY=openweather-api
CITY=lucknow
DATABASE_CONNECTION_STRING=mongodb-connection-string

admin-panel/.env

VITE_API_BASE_URL=http://localhost:3000
VITE_GOOGLE_CLIENT_ID=your-google-client-id

3. Start the Backend

cd nest-backend-bot
npm install
npm start

4. Start the Admin Panel

cd ../admin-panel
npm install
npm run dev

Features

  • Telegram Bot: Provides weather updates to users by fetching data from the OpenWeatherMap API.
  • Admin Panel:
    • View and manage Telegram bot users
    • Handle and update API keys
    • OAuth Google login for secure access

Tech Stack

  • Backend: NestJS, MongoDB, OpenWeatherMap API
  • Frontend: React, Vite, Tailwind CSS, Axios, Google OAuth

Contact

Built by Rishabh

About

telegram bot

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages