Giter VIP home page Giter VIP logo

bakery's Introduction

Scrumptious

A bakery web application, with ReactJS, Redux, and React-Router-Dom

Initialisation

npx create-react-app my-app
npm install redux react-redux

Development

image
Figure 1: File structure

  • Components: Include reusable single components, that can be called throughout the project.
  • Data: Dummy JSON data for the website.
  • Features: Include multiple components and JSX elements to create compound sections and features.
  • Images: Image assets for the website like icons.
  • Layout: Page-layout components like navbars and footers.
  • Pages: Consist of compound features and sections.
  • Redux: Redux store for the web app, contains the cart object.
  • Styles: Styles have a variable file that is imported or Sass Implementation.

Features

image

Figure 2: Landing Page

Responsiveness

  • The website is designed to provide optimal user experience across a variety of devices and screen sizes.
  • Implemented a responsive navbar with a hamburger menu icon to ensure smooth navigation on smaller screens.
  • Utilized variable.scss to define common media query breakpoints, making it easier to maintain a consistent responsive design.
  • Utilized CSS grid to create flexible grid layouts that adapt to different screen sizes.

ezgif com-video-to-gif (4)

Figure 3: Responsive behavior

Routing

  • Integrated the popular react-router-dom library for client-side routing within the React application.
  • Implemented nested routes to organize the product pages logically. For example, cakes, breads, and cookies each have their own sub-routes.
  • This allows for a clean and intuitive URL structure and seamless navigation between different sections of the website.

image

Figure 4: Routes and sub-rutes

Redux Cart

  • Developed a cart feature using Redux to manage the selection and removal of items.
  • When adding or deleting items, the cart dynamically updates, reflecting the changes in the total bill of the website.
  • The cart state is managed through a cart object in the Redux store, allowing for easy access and modification of the cart data.
  • Exposed actions such as ADD_TO_CART and REMOVE_FROM_CART that can be dispatched to interact with the cart.

image image image

Figure 5: Add to cart is implemented using a redux store

Search Functionality

  • Implemented a search feature allowing users to search for bakery items by name or description.
  • Utilized a debouncing technique to optimize the search functionality.
  • Debouncing helps reduce excessive rerenders and improves performance by delaying the execution of the search function until the user pauses typing.
  • This provides a smoother user experience, especially when dealing with fast typing or frequent changes in the search input.

ezgif com-video-to-gif (5)

Figure 6: Search with debounce

bakery's People

Contributors

e-for-eshaan 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.