Git Product home page Git Product logo

beer.ly's Introduction

beer.ly

Delivery beer flights. Beerly is an app that allows users to have beer flights be delivered to them.

Tech Stack

  1. Node / Express
  2. React
  3. Mongoose/MongoDB
  4. Google Maps API
  5. StripeJS
  6. Material UI
  7. BreweryDB
  8. S3

Quick Start

Fork/Clone

git clone https://github.com/ntoung/beer.ly.git

Install Dependencies

npm install

Run

npm start

Features

Hot Module Replacement

Lazy Script Loading

React CSS Modules

HTTPS Server / SSL Certification

Instructions on how to get set up with HTTPS

  1. Create a key.pem / cert.pem file in the root directory of the project. (Same folder as index.js). Use this command:
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 30

// For passcode, type 'beerly' for now. You can change the passcode in server/middleware/SSL.js.
// For Common Name, type 'localhost'.
// For everything else, you can just leave it blank.
  1. Files have already been added to .gitignore so don't worry about adding them.
  2. Start the server as you normally would.
npm start
  1. Go to 'https://localhost:8008' to reach the server. Use https from now on. If you're using Chrome, it's going to complain that it's insecure. Just hit the 'Advanced' button and click 'Continue anyway'. You only have to do this once.

Webpack Development Middleware

API

GET /api/beers/<Brewery Name>

This endpoint is needed for the BeerList component. It makes an API request to BreweryDB to retrieve a list of available beers from a brewery.

{
  id: "yEusNN",
  name: "Acoustic Blondie",
  nameDisplay: "Acoustic Blondie",
  abv: "6",
  isOrganic: "Y",
  ...
  style: {
    category: {
      id: 5,
      name: "Belgian And French Origin Ales",
    },
    name: "Belgian-Style Blonde Ale",
    shortName: "Belgian Blonde",
    description: "Belgian-style blond ales are characterized by ...",
    ...
  }
},

GET /api/breweries/<Location>

This endpoint is needed for the BreweryList component. It makes an API request to BreweryDB to retrieve a list of available breweries at a location.

{
id: "wXmTDU",
name: "Main Brewery",
streetAddress: "563 Second Street",
locality: "San Francisco",
region: "California",
postalCode: "94107",
phone: "415-369-0900",
latitude: 37.7824892,
longitude: -122.3924905,

brewery: {
  id: "EdRcIs",
  name: "21st Amendment Brewery",
  description: "The 21st Amendment Brewery offers a variety of...",
  website: "http://www.21st-amendment.com/",
  images: {
    icon: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-icon.png",
    medium: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-medium.png",
    large: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-large.png",
    squareMedium: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-squareMedium.png",
    squareLarge: "https://s3.amazonaws.com/brewerydbapi/brewery/EdRcIs/upload_gfSGyp-squareLarge.png"
  },
  ...
},
country: { ... },

GET /<Location>

This endpoint is needed for the AutoComplete feature in the Search component. It interacts with Google Maps API and uses a location partial to query for predictions.

{
  predictions: [
    {
      description: "San Francisco, CA, United States",
      id: "1b9ea3c094d3ac23c9a3afa8cd4d8a41f05de50a",
      matched_substrings: [ ... ],
    ,
    types: ["locality", "political", "geocode"]
    ...
  ]
}

beer.ly's People

Contributors

ntoung avatar michaelmerrilltest avatar rdubs avatar

Stargazers

Walyson G Oliveira avatar Yerlin Matu avatar Manojkumar avatar

Watchers

James Cloos avatar  avatar  avatar Kevin Chau avatar Ramsha Mushtaq avatar

beer.ly's Issues

Set up Google Maps API

As a user, I want to be able to see my deliverer's location on a map.
As a deliverer, I want to see where I need to make my delivery.
Set up Google Maps API, just location.

Create separate component for cart item.

Currently, the cart component and the beerlist component both use the beeritem component.
In the cart, the button in the beeritem component is not rendered.

The cart should have its own cartItem component to decouple styling.

Create component hierarchy

Add React component files. Don't need to fully implement, just create files so we can come to an agreement on the structure.

Create City Page

Create City Page, the second page after searching for a city. This page holds all breweries of that city in a Brewery List.

Setup React Env

Setup webpack to use react and babel.
Add .babelrc file with correct presets
Set up webpack dev server
Setup Default App component

Add Stripe Payment

As a user,
When I click on the purchase button,
I expect to see a stipe payment modal

Create Beer List

As a user,
when I visit the homepage,
I expect to see a list of beers

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.