Git Product home page Git Product logo

resturant_app's Introduction

CoderRestaurant Website

Restaurant is a Ruby on Rails restaurant website let users order foods.

Submitted by: Nguyen Huy Minh

Time spent: 25 hours spent in total

URL: https://limitless-spire-91311.herokuapp.com/

User Stories

Required:

  • User must be able to go two pages: Menu, and Contact Us.
  • User can see the address and phone number on the contact us page.
  • User can see a basic google map on the Contact Us page.
  • User can navigate to a menu page with four sections:
    • Breakfast
    • Lunch
    • Dinner
    • Drinks
  • User should see at least 5 food items in each section.
  • Each food item should have the following fields:
    • Name (Canh Chua)
    • Description (Delicious fish soup)
    • Price (VND)
    • Section - Breakfast, Lunch, Dinner, Drinks
    • Image URL - do a google search or use LoremFlickr: http://loremflickr.com/320/240/canhchua
  • User should be able to filter by section of Breakfast, Lunch, Dinner, or Drinks and see only the relevant items.
  • User can sort menu items by “alphabetical”, “price low to high”, and “price high to low”.
  • User should be able to search for a menu item and see results.
  • Clicking on an item in the menu brings up its detail, where you see the description and a larger picture.
  • User can click “order” on a menu item to go to a “Create Order” page.
  • User is able to fill in their name, phone number, and address.
  • User is taken to a “Thank you for your order page” that lists the name of item, the total cost (delivery should cost 20,000 VND), the user’s name, the user’s address, and the time the order was created in human-readable format (for example, Tuesday, December 1, 15:25).

Optional:

  • User can also filter by type of Cuisine.
  • User can see how many times each menu item has been viewed, and sort items by “most viewed”.
  • User can leave a review (1-5 stars) for each dish, along with a text review.
  • User can see reviews and an average review score.
  • User can input "CODERSCHOOL" as a coupon code on the order page, which should give a 50% discount off of the order.
  • User can order more than one dish at a time.
  • User receives an email upon placing an order.
  • The Restaurant (you) receives an email or SMS when a User places an order. Try Twilio if you’d like a SMS API. Use Promo Code CodeSchool15 for $30 free credit.

The following additional features are implemented:

  • None

The following known issues:

  • The Cuisine filter makes me confused. I think it needs to be updated the FoodItem model.
  • The mailer is not stable, I have to disable the feature.

Video Walkthrough

Here's a walkthrough of implemented user stories:

Video Walkthrough

GIF created with Byzanz.

Notes

  • Very bad skill in frontend design.
  • The model is vital, I think I need to improve it.

License

Copyright [2017] [Nguyen Huy Minh]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

resturant_app's People

Contributors

minhhuynguyen91 avatar

Watchers

 avatar

resturant_app's Issues

Thanks!

Hi @minhhuynguyen91, congrats on your first homework submission! 👍

Goals of this homework:

  • Learn how to define root path, paths generated by RESTful resources and custom paths.
  • Use _path methods in controller and view files
  • Use ActiveRecord querying with .where and chain multiple .where queries when applicable.
  • Create multiple ActiveRecord models with different types of columns (string, text, date, decimal)
  • Define belongs_to and has_many between models
  • Sort items by using ActiveRecord's .order method. Chain with .where query.
  • Use ActionController's Flash to display success or failure notices

Great job with:

  • Use nested resources in config/routes.rb
  • Use bootstrap class names appropriately!
  • The SMS feature ;-)
  • Finishing many optional features

Suggestions:

  1. Don't use unnecessary empty lines in your Ruby files (e.g. routes, food_item.rb)
  2. Have a clean application.html.erb layout file thanks to the use of partial
  3. Should display all flash messages, not just flash[:error]
  4. Consider seeding useful food names, not human names for food items :)
  5. In orders/new.html.erb, instead of <%= f.label :COUPON %>, change it to <%= f.label :coupon, "COUPON" %>
  6. On food_items/1/orders/new page, consider displaying information about the food item. You can create a food_item partial so that it can be re-used on the menu page and here.
  7. In HomePagesController#menu, you can extract the order logic into FoodItem model. That way you can easily test in a rails console and keep your controller logic simple.
  8. Don't put the coupon checking logic in the view (orders/show.html.erb). Implement a total_price method in Order model instead.

We don't give much feedback on the UI but focus on the code. Hope this gives you some ideas to improve the code base. If you have any questions above the points above, don't hesitate to ask!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.