{"id":23250528,"url":"https://github.com/avidee007/weather-app","last_synced_at":"2025-04-06T02:14:49.114Z","repository":{"id":268558640,"uuid":"904673748","full_name":"avidee007/weather-app","owner":"avidee007","description":"This is a fully functional, secured weather application that uses publicly exposed APIs to fetch weather of the valid USA postal code. ","archived":false,"fork":false,"pushed_at":"2024-12-18T12:52:09.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T08:18:04.722Z","etag":null,"topics":["liquibase","liquibase-changelog","openapi3","postgresql","postgresql-database","spring-boot","spring-data-jpa","spring-security","swagger-ui"],"latest_commit_sha":null,"homepage":"","language":"Java","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/avidee007.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-12-17T10:41:14.000Z","updated_at":"2025-01-28T13:25:41.000Z","dependencies_parsed_at":"2024-12-17T14:33:36.084Z","dependency_job_id":"179211a8-ee84-4e67-b168-cb6f0d6498d4","html_url":"https://github.com/avidee007/weather-app","commit_stats":null,"previous_names":["avidee007/weather-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avidee007%2Fweather-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avidee007%2Fweather-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avidee007%2Fweather-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avidee007%2Fweather-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avidee007","download_url":"https://codeload.github.com/avidee007/weather-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423521,"owners_count":20936626,"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":["liquibase","liquibase-changelog","openapi3","postgresql","postgresql-database","spring-boot","spring-data-jpa","spring-security","swagger-ui"],"created_at":"2024-12-19T09:12:35.542Z","updated_at":"2025-04-06T02:14:49.094Z","avatar_url":"https://github.com/avidee007.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weather App\n\n## Introduction\n\nThis is a fully functional, secured weather application that uses publicly\nexposed APIs to fetch weather of the valid USA postal code. This weather service uses\na secure api key generated at [WeatherAPI](https://www.weatherapi.com/) to fetch current weather data.\n\n### Functional Features:\n\n1. Register to application with unique username and strong password.\n2. Get a weather report of any valid USA postal/Zip code.\n3. Get history of all requested weather reports for any given userName.\n4. Get history of all requested weather reports for any given postal code.\n5. Deactivate any existing user.\n\n### Non-Functional Features:\n\n1. **Security:**\n    * Signup API prohibits duplicate username creation.\n    * Strong password policy is enforced. Password must contain One number, One uppercase letters, One lowercase\n      letters, One non-alpha numeric number and minimum 8–16 characters in length.\n    * All endpoints are secured with username/password authentication except Signup API it is for user registration.\n    * Role bases authorization is implemented for all secured endpoints.\n    * Deactivate API is only accessible for **ADMIN** user. Admin user is automatically created\n      once application runs first time through a liquibase script using encrypted values.\n    * **ADMIN** credentials will be provided on reference.\n    * Other APIs are assessable for both **USER** and **ADMIN** user.\n\n2. **Scalability:**\n    * Docker images can be created with Docker support.\n    * Horizontal scaling using container orchestration tools like Kubernetes.\n   \n3. **High Availability:**\n    * High availability using container orchestration tools like Kubernetes.\n\n### Tech Stack and Frameworks:\n\nThis microservice was build using Spring Boot with the following frameworks:\n\n* **JDK 17:** Used as JVM language.\n* **Spring Web:** Used for building RESTFul API for user management and weather operations.\n* **Spring Data JPA:** Used for database access and database operations.\n* **Liquibase:** Used for database migration.\n* **PostgresSQL:** As RDBMS to store user and weather entities.\n* **Spring Security:** Used for securing exposed REST API by implementing authentication and authorization.\n* **Spring Validation:** Used for implement bean validation for user inputs.\n* **Springdoc OpenApi:** Used to implement live API documentation using Swagger.\n* **JUnit 5:** Used to implement unit test cases.\n* **Mockito:** Used for mocking external dependencies in unit test cases.\n* **SpringBootTest:** Used for complete integration testing.\n\n### How to run the project\n\n**NOTE:** WeatherApi api key needs to be configured to application.yaml file to fetch data from public weather api.\nComplete steps are mentioned in [How-to-run-guide](docs/How-to-Run.md).\nPlease follow the instructions documented in [How-to-run-guide](docs/How-to-Run.md).\n\n### Swagger for API documentation and testing\n\nOnce application is started with any of the chosen methods from the above step.\n[Click here to open Swagger UI.](http://localhost:8080/weather-app/swagger-ui/index.html#/)\nThis will open swagger UI which can be used to test the APIS.\n\nDetailed steps for authentication and testing the API are mentioned in [Runbook](docs/Steps-to-test-api.md).\n\nThe Application covers all negative and edge cases of authentication, authorization and api functionalities as per my\ntesting. I am open to further feedback and issues, if any.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favidee007%2Fweather-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favidee007%2Fweather-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favidee007%2Fweather-app/lists"}