{"id":16536144,"url":"https://github.com/eracle/weather_forecast_app","last_synced_at":"2026-02-08T12:05:35.354Z","repository":{"id":231400129,"uuid":"775555016","full_name":"eracle/weather_forecast_app","owner":"eracle","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-19T00:08:10.000Z","size":1616,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T22:13:43.967Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/eracle.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-21T15:52:57.000Z","updated_at":"2024-03-21T15:54:14.000Z","dependencies_parsed_at":"2024-04-03T22:47:50.370Z","dependency_job_id":"8643ad13-f076-47e9-baa9-491b66fc442e","html_url":"https://github.com/eracle/weather_forecast_app","commit_stats":null,"previous_names":["eracle/weather_forecast_app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eracle/weather_forecast_app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eracle%2Fweather_forecast_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eracle%2Fweather_forecast_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eracle%2Fweather_forecast_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eracle%2Fweather_forecast_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eracle","download_url":"https://codeload.github.com/eracle/weather_forecast_app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eracle%2Fweather_forecast_app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268391601,"owners_count":24243295,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-11T18:29:51.258Z","updated_at":"2026-02-08T12:05:30.318Z","avatar_url":"https://github.com/eracle.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n### Assessment Task for Django Developer\n### Weather Forecast App\n\nTech Stack Required: Django 2 and Rest API\nData source: https://openweathermap.org/api/one-call-api (need to register, key will get\nactivated in about 1hr after registration)\n\n#### Task Description:\nWe need to create an application to display the weather forecast for a selected set of\ncoordinates with selected type of detailing data.\n\nUser will require to enter lat and lon in the inputs and chose detailing type according to API\n- Current weather\n- Minute forecast for 1 hour\n- Hourly forecast for 48 hours\n- Daily forecast for 7 days\n\nPlus points for: Allow the user to input the location via a Google map plugin.\n\nBy default local DB is empty and we should fill it with data from users’ requests.\nWe need to create API endpoint which will receive\n- lat,\n- lon\n- detailing type\n\nWe will first try to find weather forecast in the local DB, if the required data is not present\nthen we will request it from openweathermap and save to our local DB.\nAlso, the data that we store in the local DB should be time sensitive, and it should be\nconfigurable from Django settings (by default 10 minutes). This means if the required data\nwas received more than 10 minutes ago, we need to request the data again, and in case the\nnew data received is different from the one stored, we will update it in the local DB.\n\nFor example:\n\n1. User requests information for “lat: 33.44179 2 lon: -94.03768 9 and detailing type=Minute\n    forecast” at 10:00 AM, as we don’t have this data in local DB, we will request data from\n    openweathermap and save to the local DB.\n2. After 5 minutes, the user again makes the same request (at 10:05). Here we will return\n    data from the local DB, because the data is still relevant.\n3. Then the user again makes the request after 20 minutes (at 10:25). Here we should\n    request data from openweathermap again because the data in the local DB is no longer\n    relevant.\n\n\nPlus points for: Unit and Integration Tests\n\n\n## Install:\nInstall make, docker and docker-compose. Then run:\n```console\nmake up\n```\nThen go to http://0.0.0.0:3000/\n\n### Tests:\nOnce built, run:\n```console\nmake test\n```\n\n\n# Project Overview\n\nThis application leverages the robust foundation provided by the Cookiecutter Django template to create a Django-based weather forecast application, ready for both local development and production deployment. Utilizing Docker for containerization, it simplifies the development and deployment processes while maintaining consistency across different stages of the development lifecycle.\n\n## Project Setup\n\nThe project is containerized using Docker, separating configurations for local development and production to ensure environmental consistency:\n\n- **Local Development (`compose/local`):** Includes Dockerfiles for Django and Node.js, catering to backend and frontend development needs.\n- **Production (`compose/production`):** Contains Docker configurations optimized for deployment, including Django, Nginx, Postgres, and Traefik for reverse proxy and load balancing.\n\n## Django Configuration\n\nDjango app settings are organized into base (`config/settings/base.py`), local (`config/settings/local.py`), and production (`config/settings/production.py`) configurations, allowing for environment-specific customizations.\n\n## Weather Forecast Functionality\n\nImplemented in the `weather` app within the `weather_forecast_app` directory, the core functionality enables fetching weather forecasts based on user-specified coordinates and detail level:\n\n- **Models (`weather/models.py`):** Defines the `WeatherForecast` model to store weather data.\n- **API Views (`weather/api/views.py`):** Manages requests to fetch weather forecasts, utilizing local database data or fetching from OpenWeatherMap as necessary.\n- **Clients (`weather/clients.py`):** Handles interactions with external weather APIs.\n\n## Frontend Integration\n\nThe frontend, developed with React, allows users to select locations on a map and specify the detail level for the weather forecast. The app is bundled using Webpack, with configurations located in the `webpack` directory.\n\n- **React App Entry (`weather_forecast_app/static/js/components/App/App.js`):** Main React component for the application.\n- **Webpack Configurations (`webpack/`):** Includes files for bundling and optimizing frontend assets for different environments.\n\n## Testing\n\nA comprehensive test suite covers models, views, and integration points, ensuring backend functionality and potential integration with React component tests.\n\n- **Django Tests (`weather_forecast_app/weather/tests/`):** Includes tests for Django models, views, and utility functions.\n\n## Documentation and Further Reading\n\n- **README.md:** Offers an overview of project setup, including starting the development environment, running tests, and deploying the project.\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feracle%2Fweather_forecast_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feracle%2Fweather_forecast_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feracle%2Fweather_forecast_app/lists"}