This is a simple Rails app that gets current weather conditions as well as hourly and extended forecast by the supplied address. It uses weather.gov APIs and will cache conditions by ZIP code for 30 minutes. Development is done with Docker.
-
Install Docker Desktop
-
Clone the repository
git clone ssh://git@github.com/michaelirick/forecast
cd forecast
- Build the Docker image
docker-compose build
- Create the database
docker-compose run forecast rake db:create
- Run the migrations
docker-compose run forecast rake db:migrate
- Start the server
docker-compose up
-
Visit the site at http://localhost:8010
-
Run the tests
docker-compose run -e "RAILS_ENV=test" forecast rails db:create db:migrate
docker-compose run -e "RAILS_ENV=test" forecast rspec
I originally started on this application in 2021 when applying to Apple. I was passed on the position, but now have another opportunity to work with them. For my second attempt, I decided to revisit this project and make it better with some of the techniques and technologies I have since learned. I have added more tests to the cover the acceptance criteria with VCR mocking of the external API, improved the UI with React and Semantic-UI, and added Docker for development.