Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwolski/uberfavoritos
A simple web app that allows you to add favorite locations
https://github.com/jwolski/uberfavoritos
Last synced: 12 days ago
JSON representation
A simple web app that allows you to add favorite locations
- Host: GitHub
- URL: https://github.com/jwolski/uberfavoritos
- Owner: jwolski
- Created: 2013-04-01T03:04:59.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-01T15:12:12.000Z (over 11 years ago)
- Last Synced: 2024-10-20T02:52:56.250Z (26 days ago)
- Language: JavaScript
- Size: 285 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
uberfavoritos!
====This is a small little web app that allows you to manage your favorite locations - add, delete, edit and locate your favorites on a map. Please see the exercise in all of its glory at http://uberfavoritos.herokuapp.com!
Usage (Functionality):
----
* Adding favorites: Add a favorite from the left side bar by filling in both required fields and clicking the Add button. When typing in the Address field, the address will be auto-completed using Google's Places API. After clicking the Add button, a Geocode lookup is performed against Google's Geocode API.
* Deleting favorites: Delete a favorite by clicking the Delete button in the list of favorites.
* Editing favorites: Edit a favorite by clicking the Edit button in the list of favorites, filling in both required fields and by clicking the Apply button. You can also cancel out of the modifications by clicking the Cancel button.
* Flashes messages - Flash messages will appear with every action performed
* Pin drop: Pins drop on initial page load (for existing favorites) and any that you may add later. Hover over the pin and a tooltip will tell you the name of the favorite.
* Pin replacement: Pins are replaced when a favorite is updated
* Pin removal: Pins are removed when a favorite is deletedDirectory structure:
----
* app/models/ - ORM mappings
* app/routes/ - Endpoint definitions
* app/views/ - ERB templates
* config/ - Configuration initializers
* migrations/ - Database migrations (see Rakefile to run)
* public/css/ - App and vendor stylesheets
* public/img/ - Vendor images
* public/js/ - App and vendor javascripts
* test/routes/ - Functional tests for endpointsEndpoints:
----
* DELETE /favorites/:id - Deletes a favorite provided an ID
* GET /favorites - Returns a list of all favorites
* POST /favorites - Creates a favorite provided: name, address, latitude and longitude
* PUT /favorites/:id - Updates a favorite provided: id, name, address, latitude and longitudeRake tasks:
----
* db:data:clear - Clears all data from tables
* db:data:seed - Adds some seed data
* db:migrate:down - Resets DB
* db:migrate:up - Migrates to latest
* test:run - Runs functional testsBackend tech:
----
* Heroku
* Postgres
* Rack
* Sinatra
* SequelTested on:
----
* Firefox 19.0 for Mac
* Chrome 25.0 for MacFrontend tech:
----
* Backbone
* (Twitter) Bootstrap
* jQuery
* Google Maps API
* UnderscoreAssumptions made:
----
1. Single user system. I introduced a User model with the association built between User and Favorite, but am currently not building the assocation upon creation of any favorites.
2. Integer based migrations. I used these instead of timestamp migrations since I'm only a single dev and it's more readable.
3. Denormalized storage of favorites. I toyed with abstracting a Location out from Favorite and have a Favorite be a simple mapping between a User and a Location, but decided to keep it simple for this exercise.
4. Did not use Sprockets for asset pipelining. I left this for a future exercise and felt it was unnecessary for the exercise.
5. Some functional tests rely on DB. I'd rather eliminate as many external dependencies that I can from my tests, but these functional tests are built to rely on models being placed in the DB.If you've made it this far, thanks for reading. I hope you enjoy.