Git Product home page Git Product logo

gomocha's Introduction

GoMocha

GoMocha is a full-stack, monolithic geolocation food and drink ordering system. The app is split into two front ends: one for the customer to order their drink(s) and/or food (GoMocha Consumer), and one for the coffee shop to receive and manage orders as they come in (GoMocha Business Admin, or GoMocha-BA).

GoMocha Consumer allows a customer to select a coffee shop within a given radius of their current location, customize their order, and place their order. GoMocha Consumer will calculate how long it will take the customer to arrive at the coffee shop using the customer's location, the selected coffee shop location, and their selected method of transportation. This sends an order to GoMocha-BA, which displays a list of incoming orders. Each order has a timer component that tells the coffee shop approximately when the customer is going to arrive given the information collected mentioned above. If a customer selects a desired pickup time, the timer will adjust and calculate the difference in the current time and the customer's selected pickup time. Orders can then be marked as complete on GoMocha-BA once the coffee shop has handed them off to their customer.

To see GoMocha live in action, open a browser tab for GoMocha Consumer and a tab for GoMocha-BA. All you have to do is place an order on GoMocha Consumer, and then watch GoMocha-BA receive the order.
Front end source code for GoMocha Consumer can be found in the /customer directory, and /business-admin for GoMocha-BA. Back end source code can be found in /routers.

GoMocha Consumer

GoMocha Business Admin

Technical

• The front end of the app is built in React and Redux, using SASS as a CSS extension language, and webpack as a module bundler.
• The back end is built in Node.js with Express, and uses MongoDB with Mongoose as a database.
• The app uses the Google Places API Web Service, Google Maps Distance Matrix API, and HTML Geolocation API in order as follows:

  1. Once the user opens the app, navigator.geolocation.getCurrentPosition() is called to retrieve the users latitude and longitude coordinates.
  2. As soon as the user's location is retrieved, a call is made to the Google Places API Web Service, while passing in the user's latitude and longitude coordinates as an argument, to retrieve a list of restaurants with the tag "cafe" that are within 4,000 meters of the user's location. A list of coffee shops is then generated for the user to choose from.
  3. A call is then made to the Google Maps Distance Matrix API to retrieve the distance from the user's location to each of the coffee shops that were retrieved in the previous call.
  4. As soon as a user clicks on their desired coffee shop, another API call is made to the Google Places API Web Service while passing in the coffee shop's unique Google ID, to retrieve more information about the coffee shop (specifically the shop's coordinates).
  5. A final call to the Google Maps Distance Matrix API is called upon the user selecting their method of transportation. This call passes in the user's coordinates, the shop's coordinates, and the selected method of transportation to estimate the time it will take for the customer to arrive at the coffee shop.

• Submitted orders are sent to the database along with the user's username, to allow the display of previous and favorited orders and for GoMocha-BA to fetch the orders.
• GoMocha-BA uses polling to fetch orders from the database every 5 seconds.
• Travis CI is used for distributed continuous integration.




## Development Roadmap Future developments of the app will include:
• ~~Calculate customer arrival time based on customer location, coffee shop location, and selected method of transportation~~
• ~~Business admin (BA) interface to receive all orders submitted by customers, to be handled by the coffee shop~~
• ~~Timer component to tell the coffee shop exactly when the customer will arrive~~
• Text or Email notification options for customer
• Customer management and sales statistic tools on GoMocha-BA
• Social login
• Ability to search for shops
• Ability to start new order from previous and favorited orders
• Ability to share submitted order on Facebook
• Credit card authorization
• Websockets instead of polling


gomocha's People

Contributors

amituuush 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.