Kastanza is a web application for users to find and rate public bathrooms. It uses the Google Maps API (via Gmaps) and Google places to fetch locations.
- Sinatra Framework
- Sequel ORM
See our outline for user stories and wireframes.
Users have two options when visiting Kastanza: Find their location using the geolocation feature of Gmaps, or search for a location by address. If they search by address, the application makes an ajax call from the front end to Google Maps to convert the address into coordinates. The coordinates are then sent to the server.
The server then takes those coordinates and uses the Google Places API to return a list of nearby places as well as any ratings associated with those places from the Kastanza database. The user can then select a location to view its rating or review it. The review is then stored in the database along with the place id.
This app is live on the internet! To use it, navigate to the app!
Right now the average number of stars is calculated when the server sends the data back to the client. A better solution would be to cache the values for faster access using Redis or Firebase.
There are some unresolved JS issues where selectors are trying to select things on the page that don't exist. At the moment they don't affect the functionality of the app but they would need to be fixed before expanding the app.
User input for creating new users needs to be trimmed and changed to lowercase so Josh and josh act as the same username.
Locations can currently be reviewed multiple times by the same user. (FIXED 04/01/2016)
Give users the option to add a brief comment associated with their review
Better mobile display--the display is not horrible right now but could be improved
Email confirmation for users when they sign up
Support for different platforms and screen sizes--the design looks pretty good on our laptops (we think) but may not translate well to other platforms
The fine folks at gmaps.js, Google Maps, and Google Places for providing excellent APIs
James, Bill, and Jim for quality instruction and great app name ideas :)
James Barnett for sharing his star rating code on codepen
YOU for reading this whole document!