{"id":17760799,"url":"https://github.com/saanvijay/weathernotify","last_synced_at":"2026-04-12T22:05:54.887Z","repository":{"id":259280712,"uuid":"877454329","full_name":"saanvijay/weathernotify","owner":"saanvijay","description":"Notify the live weather forcast for your current location to the subscribed users. It uses 2 microservices which internally uses 'Confluent's Apache Kafka Golang client'","archived":false,"fork":false,"pushed_at":"2024-11-18T21:17:13.000Z","size":8906,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T08:15:13.709Z","etag":null,"topics":["apache-kafka","docker","golang","microservice","pubsub","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saanvijay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-23T17:16:27.000Z","updated_at":"2024-11-18T21:17:17.000Z","dependencies_parsed_at":"2024-10-26T05:08:59.781Z","dependency_job_id":"54cd7793-fe92-4516-9e27-57d1c42bc6a0","html_url":"https://github.com/saanvijay/weathernotify","commit_stats":null,"previous_names":["saanvijay/weather-notify","saanvijay/weathernotify"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saanvijay%2Fweathernotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saanvijay%2Fweathernotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saanvijay%2Fweathernotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saanvijay%2Fweathernotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saanvijay","download_url":"https://codeload.github.com/saanvijay/weathernotify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246644098,"owners_count":20810687,"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":["apache-kafka","docker","golang","microservice","pubsub","rest-api"],"created_at":"2024-10-26T19:13:20.460Z","updated_at":"2025-10-30T15:03:51.528Z","avatar_url":"https://github.com/saanvijay.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# weathernotify\nNotify the weather forcast to the email users which are listed in .env file. The forcast data will be fetched for every 12 hour. The location is your current location.\n\n## Pre-requisites\n1. Docker\n```\nMac : https://docs.docker.com/desktop/install/mac-install/\nLinux: https://docs.docker.com/desktop/install/linux/\n```\n2. confluent-kafka-go\n```\ngo get github.com/confluentinc/confluent-kafka-go/kafka\nMac: brew install librdkafka \nLinux: sudo apt-get install librdkafka-dev\n```\n\n## Create App password for gmail\nIn https://myaccount.google.com/security, do you see 2-step verification set to ON? If yes, then visiting https://myaccount.google.com/apppasswords should allow you to set up application specific passwords. \n\n## Build\n```\nEdit .env and add email_ids and app password\n\nFROM_EMAIL_ID=\"from_email_id\"\nFROM_EMAIL_APP_PASS=\"from_email_id_passwd\"\nTO_EMAIL_ID=\"recipient_email_id\"\nEMAIL_NOTIFICATION_IN_MINUTES=\"720\" // 720 minutes -\u003e 12 hour\n\ncd weatherprocess\nmake docker\n\ncd weatherconsumer\nmake docker\n\ncd weathernotify\ndocker-compose up -d\n\n```\n## Email Notification\nThe notification of the weather forcast will be sent to the recipient email which is in .env\n\n## Test\n```\ngit:(main*) docker logs weathernotify-producer-1\nWeather message queued for delivery\nProduced event to topic weather: key = forcast    value = [\n {\n  \"name\": \"This Afternoon\",\n  \"temperature\": 81,\n  \"windSpeed\": \"8 mph\",\n  \"shortForecast\": \"Slight Chance Rain Showers\"\n },\n {\n  \"name\": \"Tonight\",\n  \"temperature\": 58,\n  \"windSpeed\": \"2 to 6 mph\",\n  \"shortForecast\": \"Partly Cloudy then Slight Chance Rain Showers\"\n },\n {\n  \"name\": \"Thursday\",\n  \"temperature\": 73,\n  \"windSpeed\": \"2 to 8 mph\",\n  \"shortForecast\": \"Chance Rain Showers then Partly Sunny\"\n },\n {\n  \"name\": \"Thursday Night\",\n  \"temperature\": 41,\n  \"windSpeed\": \"2 to 6 mph\",\n  \"shortForecast\": \"Mostly Clear\"\n },\n {\n  \"name\": \"Friday\",\n  \"temperature\": 68,\n  \"windSpeed\": \"2 to 10 mph\",\n  \"shortForecast\": \"Sunny\"\n },\n {\n  \"name\": \"Friday Night\",\n  \"temperature\": 36,\n  \"windSpeed\": \"3 to 9 mph\",\n  \"shortForecast\": \"Mostly Clear\"\n },\n {\n  \"name\": \"Saturday\",\n  \"temperature\": 61,\n  \"windSpeed\": \"5 mph\",\n  \"shortForecast\": \"Sunny\"\n },\n {\n  \"name\": \"Saturday Night\",\n  \"temperature\": 38,\n  \"windSpeed\": \"3 mph\",\n  \"shortForecast\": \"Mostly Cloudy\"\n },\n {\n  \"name\": \"Sunday\",\n  \"temperature\": 60,\n  \"windSpeed\": \"3 to 7 mph\",\n  \"shortForecast\": \"Chance Rain Showers\"\n },\n {\n  \"name\": \"Sunday Night\",\n  \"temperature\": 49,\n  \"windSpeed\": \"6 mph\",\n  \"shortForecast\": \"Rain Showers Likely\"\n },\n {\n  \"name\": \"Veterans Day\",\n  \"temperature\": 69,\n  \"windSpeed\": \"6 to 10 mph\",\n  \"shortForecast\": \"Rain Showers Likely\"\n },\n {\n  \"name\": \"Monday Night\",\n  \"temperature\": 43,\n  \"windSpeed\": \"3 to 7 mph\",\n  \"shortForecast\": \"Partly Cloudy\"\n },\n {\n  \"name\": \"Tuesday\",\n  \"temperature\": 64,\n  \"windSpeed\": \"7 mph\",\n  \"shortForecast\": \"Mostly Sunny\"\n },\n {\n  \"name\": \"Tuesday Night\",\n  \"temperature\": 37,\n  \"windSpeed\": \"1 to 5 mph\",\n  \"shortForecast\": \"Mostly Clear\"\n }\n]\n\n\n➜  weathernotify\ngit:(main*) docker logs weathernotify-consumer-1\nConsumed event from topic weather: key = forcast    value = [\n {\n  \"name\": \"This Afternoon\",\n  \"temperature\": 81,\n  \"windSpeed\": \"8 mph\",\n  \"shortForecast\": \"Slight Chance Rain Showers\"\n },\n {\n  \"name\": \"Tonight\",\n  \"temperature\": 58,\n  \"windSpeed\": \"2 to 6 mph\",\n  \"shortForecast\": \"Partly Cloudy then Slight Chance Rain Showers\"\n },\n {\n  \"name\": \"Thursday\",\n  \"temperature\": 73,\n  \"windSpeed\": \"2 to 8 mph\",\n  \"shortForecast\": \"Chance Rain Showers then Partly Sunny\"\n },\n {\n  \"name\": \"Thursday Night\",\n  \"temperature\": 41,\n  \"windSpeed\": \"2 to 6 mph\",\n  \"shortForecast\": \"Mostly Clear\"\n },\n {\n  \"name\": \"Friday\",\n  \"temperature\": 68,\n  \"windSpeed\": \"2 to 10 mph\",\n  \"shortForecast\": \"Sunny\"\n },\n {\n  \"name\": \"Friday Night\",\n  \"temperature\": 36,\n  \"windSpeed\": \"3 to 9 mph\",\n  \"shortForecast\": \"Mostly Clear\"\n },\n {\n  \"name\": \"Saturday\",\n  \"temperature\": 61,\n  \"windSpeed\": \"5 mph\",\n  \"shortForecast\": \"Sunny\"\n },\n {\n  \"name\": \"Saturday Night\",\n  \"temperature\": 38,\n  \"windSpeed\": \"3 mph\",\n  \"shortForecast\": \"Mostly Cloudy\"\n },\n {\n  \"name\": \"Sunday\",\n  \"temperature\": 60,\n  \"windSpeed\": \"3 to 7 mph\",\n  \"shortForecast\": \"Chance Rain Showers\"\n },\n {\n  \"name\": \"Sunday Night\",\n  \"temperature\": 49,\n  \"windSpeed\": \"6 mph\",\n  \"shortForecast\": \"Rain Showers Likely\"\n },\n {\n  \"name\": \"Veterans Day\",\n  \"temperature\": 69,\n  \"windSpeed\": \"6 to 10 mph\",\n  \"shortForecast\": \"Rain Showers Likely\"\n },\n {\n  \"name\": \"Monday Night\",\n  \"temperature\": 43,\n  \"windSpeed\": \"3 to 7 mph\",\n  \"shortForecast\": \"Partly Cloudy\"\n },\n {\n  \"name\": \"Tuesday\",\n  \"temperature\": 64,\n  \"windSpeed\": \"7 mph\",\n  \"shortForecast\": \"Mostly Sunny\"\n },\n {\n  \"name\": \"Tuesday Night\",\n  \"temperature\": 37,\n  \"windSpeed\": \"1 to 5 mph\",\n  \"shortForecast\": \"Mostly Clear\"\n }\n]\n➜  weathernotify\n```\n\n## Enhancements\n1. Register the emails in Database\n2. Send the notification for the registered email addressess\n3. Add authentication for REST server\n4. Kafka authentication\n\n## License\nMIT License\n\nCopyright (c) 2024 Vijaya Prakash Masilamani\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaanvijay%2Fweathernotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaanvijay%2Fweathernotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaanvijay%2Fweathernotify/lists"}