Giter VIP home page Giter VIP logo

e-shop's Introduction

For The Boys - Menswear - e-Commerce App

Requirements / Purpose

A React SPA made with Vite/React+Typescript with CRUD functionality using Google's Firebase Firestore. Styled with SASS. Images pulled from Unsplash and Pexels (royalty free).

Check it out here: https://menswear-ftb.netlify.app/

Approach / Justification

When I tackled this project I knew what I wanted to do in broad strokes. Although I'm proud of what I managed to make in a week there are some things I need to improve on:

  • Feature creep, as I completed more and more features I ended up WANTING to make more and more features without strong consideration as to how it all should relate
  • Staying within a scope and/or taking a step back to revise plans; at the time I was driven to complete this project under a self-imposed deadline, so I didn't take a good wide view as often as I should to carefully reflect on where the codebase was going

In Hindsight...

The database design could be better. My senior suggested that I create a new collection for the cart system which made a lot of sense. But because of the way it's set up now there is some inefficient filter logic. For example it must filter all products available across the database to see what's in the cart, but if completed as my senior suggested I could have simply fetched what was in the cart collection.

Currently the inefficiency is inconsequential because of the amount of available products but I definitely wouldn't do this for a proper production website.


The code is tightly coupled which makes implementing test suites difficult without some refactoring. If I had to do it again I would put a lot more consideration into planning my files, ensuring good seperation of concerns and therefore testable code (for unit tests).

Features

Cart:

  • Increment and decrement product quantities - with checks to prevent increments over stock values and warnings to remove item if under 1
  • Remove product
  • Calculate unit price, line price and total cost
  • Number of items in cart is tracked and displayed

Favourite:

  • Simple toggle to add or remove product from favourites

Product filters:

  • Defaults to display "all", it can be changed to either "tops" or "bottoms"
  • Can be sorted by lowest or highest price
  • Can be filtered by a single color
  • Can be filered by a single size
  • All 4 filters aggregate

Product view:

  • Users can only add based on stock levels
  • Option to click on related product (same product different color)
  • On click event to change photo

e-shop's People

Contributors

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