Skip to content

Black Bear Bakery is an e-commerce app built with React, featuring React-Boostrap, Stripe API, PWA, Service Worker, Store offline functionality, Apollo-GraphQL, and emailJS API to make a simplistic and user friendly shopping experience.

Notifications You must be signed in to change notification settings

nicoguarino/Black-Bear-Bakery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Black-Bear-Bakery

Table of Contents

About

Black Bear Bakery is an ecommerce website designed around a bakery. It utilizes a NoSQL database using Mongo, GraphQL, and Apollo-express as a database. The front end it build with React and React-Bootstrap framework. The application is a PWA and does contain offline funcitonality designed for the store page, so if anything is added to the cart while there is a loss in connection. The data will be saved until connection is made again. Stripe is used for payment method and EmailJS is used for contact page.

Getting Started

Installation

No installation needed

Code Sample

Sample Code

Sample Code

// set up pre-save middleware to create password
userSchema.pre('save', async function (next) {
    if (this.isNew || this.isModified('password')) {
        const saltRounds = 10;
        this.password = await bcrypt.hash(this.password, saltRounds);
    }

    next();
});

// compare the incoming password with the hashed password
userSchema.methods.isCorrectPassword = async function (password) {
    return await bcrypt.compare(password, this.password);
};

const User = mongoose.model('User', userSchema);

module.exports = User;
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}


.product-img {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  height: 500px;
  border-radius: 20px;
  box-shadow: 5px 5px 5px #aaa;
}
function App() {
  return (
    <ApolloProvider client={client}>
    <Router>
      <div>
        <StoreProvider>
          <Navigation />
          <Switch>
          <Route exact path="/" component={Home} />
            <Route exact path="/login" component={Login}/>
            <Route exact path="/signup" component={Signup}/>
            <Route exact path="/success" component={Success} />
            <Route exact path="/store" component={Store} />
            <Route exact path="/contact" component={Contact} />
            <Route exact path="/orderHistory" component={OrderHistory} />
            <Route exact path="/products/:id" component={Detail} />
            <Route component={NoMatch} />
          </Switch>
          <Footer/>
        </StoreProvider>
      </div>
    </Router>
  </ApolloProvider>
  );
}

Authors and acknowledgement

  • Nico (Filipu) Guarino
  • Jaron Kenyon
  • Kristin Foreyt

Contributing

Black Bear Bakery is looking for contributions, however, check with the owner of the website for further details by reaching out with their contact information provided on the deployed website. The creator is opening to creative ideas and tweeking of design, but it must be approved first.

License

(c) 2021 Black Bear Bakery

About

Black Bear Bakery is an e-commerce app built with React, featuring React-Boostrap, Stripe API, PWA, Service Worker, Store offline functionality, Apollo-GraphQL, and emailJS API to make a simplistic and user friendly shopping experience.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published