https://github.com/sleepingkingstudios/lisa
https://github.com/sleepingkingstudios/lisa
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sleepingkingstudios/lisa
- Owner: sleepingkingstudios
- Created: 2024-01-27T08:39:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T12:57:58.000Z (over 2 years ago)
- Last Synced: 2024-01-30T10:11:43.207Z (over 2 years ago)
- Language: Ruby
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Current Weather
A sample application displaying the current weather for a requested location.
Internally the application relies on two external APIs:
- [Geoapify](https://www.geoapify.com/): For processing user input into location data.
- [Meteomatics](https://www.meteomatics.com/): For querying the weather at a location.
This application has a [deployed instance](https://vast-lowlands-18552-049afa1c6ddc.herokuapp.com/). The canonical repository can be found [on GitHub](https://github.com/sleepingkingstudios/lisa). The documentation can be viewed using [GitHub Pages](http://www.sleepingkingstudios.com/lisa/).
## Setup
To set up the application locally:
- Install Ruby version 3.4.3
- Clone this repository using `git clone git@github.com:sleepingkingstudios/lisa.git`
- Install the dependencies using `bundle install`
- Set the configuration values (see below)
- Start the application using `bundle exec rails server`
### Configuration
The application relies on the following configuration values:
- `GEOCODING_API_KEY`: The API key for the Geocoding API.
- `GEOCODING_API_URL`: The base url for the Geocoding API.
- `WEATHER_API_URL`: The base url for the Weather API.
- `WEATHER_API_USERNAME`: The username for the Weather API.
- `WEATHER_API_PASSWORD`: The password for the Weather API.
To test the application locally, set the configuration using environment variables. In the deployed application, the configuation is set at the platform level.
## Documentation
This project is documented using YARD. An [online version]() of the documentation is also available.
## Testing
The application's test suite is written in RSpec. To run the tests, set up the application locally and then run `bundle exec rspec`. This will also display the code coverage.
The application is linted using RuboCop. To run the linter, set up the application locally and then run `bundle exec rubocop`.
## Further Development
I would identify two key areas for further development:
### Improved UI
The current UI is extremely basic, and uses the [Bulma CSS framework](https://bulma.io/) for off-the-shelf styling. A more streamlined experience could be created using something like Tailwind, or supplementing the current design with some custom CSS.
One option to improve the user experience would be some basic settings, such as displaying temperature data in degrees Fahrenheit or Celcius, or allowing the user to set a default location.
On a technical level, I would recommend using a tool such as the [ViewComponent](https://viewcomponent.org/) gem if the app will continue to use server-side rendering.
### Better Location Handling
Currently, the location handling is very simplistic, returning a best guess based on the user's input. A more sophisticated solution would present a list of possible values for the user to choose from, possibly using the user's current location to determine likely possibilities. On the UX side, separating the location step from the weather query would prevent unnecessary calls to the weather API.