{"id":28242511,"url":"https://github.com/vladoosit/weatherapi","last_synced_at":"2025-07-04T11:35:46.166Z","repository":{"id":293500279,"uuid":"984079671","full_name":"VlADOOSit/weatherapi","owner":"VlADOOSit","description":"Weather API application that allows users to subscribe to weather updates for their city.","archived":false,"fork":false,"pushed_at":"2025-05-19T11:00:19.000Z","size":157,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-23T19:36:20.484Z","etag":null,"topics":["node-cron","node-js","nodemailer","postgresql","rest-api","sequelize","weather-app"],"latest_commit_sha":null,"homepage":"http://56.228.26.197/","language":"JavaScript","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/VlADOOSit.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,"zenodo":null}},"created_at":"2025-05-15T11:13:23.000Z","updated_at":"2025-05-19T11:00:24.000Z","dependencies_parsed_at":"2025-05-15T17:37:27.168Z","dependency_job_id":null,"html_url":"https://github.com/VlADOOSit/weatherapi","commit_stats":null,"previous_names":["vladoosit/weatherapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VlADOOSit/weatherapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VlADOOSit%2Fweatherapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VlADOOSit%2Fweatherapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VlADOOSit%2Fweatherapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VlADOOSit%2Fweatherapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VlADOOSit","download_url":"https://codeload.github.com/VlADOOSit/weatherapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VlADOOSit%2Fweatherapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259609909,"owners_count":22884143,"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":["node-cron","node-js","nodemailer","postgresql","rest-api","sequelize","weather-app"],"created_at":"2025-05-19T06:09:14.133Z","updated_at":"2025-06-13T08:32:02.654Z","avatar_url":"https://github.com/VlADOOSit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌦️ Weather App\nWeather API application that allows users to subscribe to weather updates for their city.\n\n---\n\n## 🧱 Technology stack\n\n- ⚙️ **Backend**: Node.js, Express, Sequelize ORM  \n- 🗃️ **Database**: PostgreSQL  \n- 🐳 **Infrastructure**: Docker + Docker Compose  \n\n---\n\n## 🔧 Main functionality\n\n- REST API for getting weather data\n- Ability to subscribe to mailing list and confirm mail\n- Sequelize ORM with migrations and models\n- Task schedule using `node-cron`\n- Connection to PostgreSQL\n- Configuration via `.env` and `config.json`\n- Support for auto-running migrations when starting a container\n\n---\n\n## 🐳 To run\n\n1. Create a .env file using the example\n\u003cpre lang=\"env\"\u003e\u003ccode\u003e\nDB_USER=vkharkivsk\nDB_PASSWORD=password\nDB_NAME=weatherdb\nDB_HOST=localhost\nDB_PORT=5432\n\nMAIL_USER=vlad.kharkovskiy22@gmail.com\nMAIL_PASS=\n\nWEATHER_API=\n\nBASE_URL=http://localhost:3001/weatherapi.app/api\u003c/code\u003e\u003c/pre\u003e\n  Or fill in the file ./config/config.json\n\n2. docker compose up -d\n\n---\n\n### Endpoints\n\n- `GET /weather?city=Kyiv` – Get current weather.\n\n  **Response:**\n```json\n{\n  \"temperature\": 22.5,\n  \"humidity\": 65,\n  \"description\": \"Partly cloudy\"\n}\n```\n- `POST /subscribe` – Subscribe with `email`, `city`, `frequency`.\n\n    **Request body:**\n```json\n{\n  \"email\": \"vlad.kharkovl@gmail.com\",\n  \"city\": \"Kyiv\",\n  \"frequency\": \"hourly\"\n}\n```\n\n- `GET /confirm/{token}` – Confirm subscription.\n\n- `GET /unsubscribe/{token}` – Unsubscribe.\n\n---\n\n# AWS EC2\n\nThe application was also deployed on EC2 with a very simple frontend. In this repository https://github.com/VlADOOSit/weatherapi-react you can see the structure of the common docker-compose file and nginx  \n\nLink for app http://56.228.26.197\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladoosit%2Fweatherapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvladoosit%2Fweatherapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvladoosit%2Fweatherapi/lists"}