Giter Site home page Giter Site logo

odin-restaurant's Introduction

Live demo: github pages

About

Completed as part of The Odin Project Javascript Restaurant Page assignment.

The assignment was to create a mini SPA for a restaurant landing page. Navigating the contents (home, about, food menu) is done by removing and adding DOM elements with Javascript.

Obviously this would be a terrible approach for a marketing site in the real-world!

Thus I re-imagined the assignement as an app for a hotel running on in-room TVs rather than a marketing website. In this context new page loads and network calls may not be desired, and search engine crawling is irrelevant.

Guests can use the app to browse several dining venues within the hotel.

Learnings

This part of the course introduces Webpack and Node.

  • I have some familiarity with Node package config from building an app in Next.js but it was good to handle the setup more directly
  • Webpack was new to me - I learnt a great deal about importing data, images, styles, fonts etc.
    • even though Webpack drives bundling in Next.js I never looked at how it. I now have confidence diving into customising bundling in Next or other frameworks in the future
  • I found it increadibly valuable diving into the Webpack docs to see what all the options were
  • I also enjoyed setting up distinct dev and prod webpack configs the way I like, and separate NPM scripts for each
    • I prefer npm run dev over npm run start for a dev server!

This project also re-inforces manipulating the DOM using Javascript. Using JSX is so much easier but I'm absolutely learning a lot from touching the DOM more manually.

Spec

I decided on the following capabilities for my implementation:

  • Support multiple venues
  • Venue and menu data imported from JSON files
    • This mocks data coming from a CMS which a marketing team may update
  • Images in a single directory
  • Components for rendering the venue page sections (hero, menu, about)
    • These take in a menu or venue object so as to uncouple view rendering from the app logic and data
  • Venue nav to update to highlight current

Extending the project

If I come back to the project these are things I would like to tackle:

  • Create a real CMS database instead of mocked data in JSON files
  • Add menu categories
    • Allow for filtering or grouping of the menus (by 'Mains', 'Beverages', 'Desert' etc.)
  • Support venues in the hotel which are not restaurants
    • As guest guide it would make sense for the app to include spa facilities, conference facilities, bars, clubs and so on.
  • Build an ordering system
    • Enable guests to add menu items to a room-service order and submit
  • Make the design responsive
    • Although the app is imagined to be deployed on a known screen size, perhaps the hotel would like it to be useable on guest personal devices

Design

I modified a Figma design of Darya Kastsiukevich.

Images from Unsplash.

odin-restaurant's People

Contributors

thomasmcinnis avatar

Watchers

 avatar

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.