Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/quiddlee/ecommerce-application

๐ŸŒ RS School eCommerce-Application | Stage 2 Final Task
https://github.com/quiddlee/ecommerce-application

ecommerce-application feature-sliced-design react-router reactjs redux rsschool rtk-query tailwindcss typescript vite vitest

Last synced: about 1 month ago
JSON representation

๐ŸŒ RS School eCommerce-Application | Stage 2 Final Task

Awesome Lists containing this project

README

        

# ๐Ÿฃ **SushiSushi โ€” eCommerce-Application**

*RS-School ๐Ÿฆฅ eCommerce-Application. Stage 2 Final Task RS2023Q1* ๐Ÿง™โ€

๏ธ***SushiSushi** - Is not just your regular food delivery; it's a culinary journey to Japan's finest flavors, delivered to your doorstep ๐Ÿ˜‰.*

**Task description** - [Task description](https://github.com/rolling-scopes-school/tasks/tree/master/tasks/eCommerce-Application) ๐Ÿ“

**Deployed project preview** - [SushiSushi](https://quiddlee.github.io/eCommerce-Application/) ๐Ÿ‘€

# Getting Started ๐Ÿš€

To run our project locally, you would have to **download zip** file with our repository or **clone** it to your computer. โœจ

## Setup and Running โš ๏ธ

What things do you need to do in order to run our project locally? ๐Ÿค”

* Use node 18.x or higher. โšก
* Installed [.git](https://git-scm.com/) on your computer. โœŒ๏ธ
* Code Editor of your choice. ๐Ÿ“
* Installed [npm](https://www.npmjs.com/). ๐Ÿ“ฆ
* Created [commercetools](https://docs.commercetools.com/) account. ๐ŸŒ

## Installation And Preparation โฌ‡๏ธ

First make sure you have all the things listed in the previous section. Then clone our repository to your computer: ๐Ÿ‘Œ

```
git clone [email protected]:Quiddlee/eCommerce-Application.git
```

or download zip file manually with our repository ๐Ÿ˜.

Navigate into project folder and run ๐Ÿ“ฆ:

```
npm install
```

Create ```.env``` file in the root of the project and add your commercetools credentials ๐Ÿ”ฅ.

You can find ```.env.example``` as an example file in the project root or follow the lines below ๐Ÿบ:

```dotenv
VITE_PROJECT_KEY=PROJECT_KEY
VITE_CLIENT_SECRET=CLIENT_SECRET
VITE_CLIENT_ID=CLIENT_ID
VITE_AUTH_SERVICE_URL=AUTH_SERVICE_URL
VITE_API_HOST_URL=API_HOST_URL
VITE_DEFAULT_CUSTOMER_SCOPE=DEFAULT_CUSTOMER_SCOPE
```

Follow the [step by step guide](#adding-products-data-to-commerce-tools-) on how to add your own products data to commercetools ๐Ÿฆฉ.

Finally run a development server: ๐Ÿคฉ
```
npm run dev
```
Aaaaand you're done! ๐ŸŽ‰๐Ÿฅณ

## Available Scripts ๐Ÿฅ‘

Here you can find all the scripts that are available in our project. ๐Ÿฆš

Linting and Prettifying happens automatically when files are staged ๐Ÿ˜Ž, however you can do it manually with absolutely no problems:

Lint the App with **ESlint**: โœ”๏ธ

```
npm run lint
```

Format the App with **Prettier**: ๐Ÿงน

```
npm run format
```

Type check the App with **TypeScript**: ๐Ÿ“

```
npm run type-check
```

Install **Husky** to enable pre-commit hooks: ๐ŸŽฃ

```
npm run prepare
```

Run unit-tests with **Vitest**: ๐Ÿงช

```
npm run test
```

**Build** project for production: ๐Ÿ—๏ธ

```
npm run build
```

**Preview** the **production build** locally: ๐Ÿ‘€

```
npm run preview
```

# Features ๐Ÿš€

* **Browse the world of royal asian flavour meals! ๐Ÿ˜ƒ๐Ÿฃ**

![gif-1](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/3d3e9cfe-20cc-4f67-8890-08748e8fdc31)

* **Choose the meal you like the most ๐Ÿ˜‹๐Ÿด**

* **Fill your shopping cart ๐Ÿ›๏ธ๐Ÿ›’**

![gif-2](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/df2b1cb3-ba0d-43be-9aeb-80ecd9d5a16e)

* **Search for your lovely meals! ๐Ÿ”**

![gif-3](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/fbd16e70-1095-4726-a915-758c8fb1d71d)

* **Filter the results to make easier your search ๐Ÿ˜Š**

![gif-4](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/3cec92b9-0c43-4af6-98cc-054a1739fe9f)

* **Sign up your account! ๐ŸŒŒ**

![gif-6](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/d5a7ccfb-8ad6-42a3-856b-3b53e6f0dc7c)

* **Change your data at any time ๐Ÿ‘Œ**

![gif-5](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/6e8138e9-66ef-468e-b009-6a1d1106ebeb)

* **Beautiful Mobile App, and much much more features, try by yourself ๐Ÿ˜‰!**



# Technology Stack โš™๏ธ

### **Developing ๐Ÿ˜**
* [React.js](https://react.dev/) - **The web framework used** โš›๏ธ
* [Redux / RTK Query](https://redux.js.org/) - **The State Management Tool and Data Fetching Library** ๐Ÿงฐ
* [React Router Dom](https://reactrouter.com/) - **The Router** ๐Ÿ“
* [TypeScript](https://www.typescriptlang.org/) - **The Language** ๐Ÿ’–
* [Tailwind](https://tailwindcss.com/) - **The CSS Framework** ๐Ÿƒ
* [Vite](https://vitejs.dev/) - **The Bundler ๐Ÿ“ฆ**
* [Postman](https://www.postman.com/) - **The API Testing Tool** ๐Ÿ“ฌ

### **Code Quality ๐Ÿงน**
* [Vitest](https://vitest.dev/) - **The Test Runner** ๐Ÿงช
* [Testing Library](https://testing-library.com/) - **The Testing Framework** ๐Ÿซ‚
* [ESLint โ€” Air-bnb base](https://eslint.org/) - **The Linter** ๐Ÿ””
* [Prettier](https://prettier.io/) - **The Code Formatter** ๐Ÿ‘
* [Husky](https://typicode.github.io/husky/#/) - **The Pre-commit Hooks** ๐Ÿช
* [Lint Staged]() - **The Pre-commit Hooks** ๐Ÿฆš
* [EditorConfig](https://editorconfig.org/) - **The Code Style Enforcer** ๐Ÿ˜Ž

### **External Libraries ๐Ÿ“š**
* [Formik](https://formik.org/) - **The Form Validation Library** ๐Ÿ™
* [Yup](https://github.com/jquense/yup) - **The Form Validation Schema Builder** ๐Ÿ›๏ธ
* [Framer Motion](https://www.framer.com/motion/) - **The Animation Library** ๐Ÿ˜
* [Swiper](https://swiperjs.com/) - **The Slider Library** ๐Ÿ›
* [React Infinite Scroll Component](https://github.com/ankeetmaini/react-infinite-scroll-component) - **The Infinite Scroll Library** โ™พ๏ธ
* [React Zoom Pan Pinch](https://github.com/BetterTyped/react-zoom-pan-pinch) - **The Image Zoom Library** ๐Ÿ”
* [Async Mutex](https://github.com/DirtyHairy/async-mutex#readme) - **The Async Mutex Library** ๐Ÿค–
* [React Star Rating Component](https://github.com/raymon-zhang/react-star-rate) - **The Star Rating Component** โญ

### **Design ๐ŸŽจ**
* [Figma](https://www.figma.com/) - **The Design Tool** ๐ŸŽจ
* [Project Design](https://www.figma.com/file/rYRBs7GD0vDQDjgjU0n972/eCommerce-Application-%F0%9F%8C%90?type=design&node-id=0%3A1&mode=design&t=asbvxijfRHlGg8Uz-1) - **The Project Design** ๐Ÿ˜‰
![img_9](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/0d1edaa7-1eb5-4fb2-ad19-1589037968b9)

### **Git Methodology**
* [Git Flow](https://datasift.github.io/gitflow/IntroducingGitFlow.html) - **The Git Flow** ๐ŸŒŠ

### **Architecture ๐Ÿ›๏ธ**
* [Feature Sliced Design](https://feature-sliced.design/) - **The Architecture** ๐Ÿ›๏ธ

### **API ๐Ÿ“ก**
* [Commercetools](https://docs.commercetools.com/) - **The API** ๐Ÿฆ–

![img_4](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/8b582001-a67d-4d09-b8a7-2ebea68d542b)

### **CI/CD ๐Ÿš€**
* [GitHub Actions](https://pages.github.com/) - **The CI/CD** ๐Ÿ•Š๏ธ

![img_5](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/84db0b98-fd9d-4717-a1d3-14919ca63a46)

### **Project Management ๐Ÿ“ˆ**
* [GitHub Projects](https://docs.github.com/en/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects) - **The Project Management Tool** ๐Ÿ“Š

![img_6](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/7cb7743d-2a30-4d68-8c19-2d539e0821c4)
![img_1](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/0082f31f-26fe-4458-9f6b-fcfcc5f079eb)
![img_8](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/2dca6b9b-e2b1-4df2-80ab-f53aff0ccd8a)

### **Communication ๐Ÿ“ฃ**
* [Discord](https://discord.com/) - **The 3xWeek Meeting Communication Tool** ๐Ÿ—ฃ๏ธ
* [Telegram](https://web.telegram.org/) - **The Main Chatting Communication Tool** ๐Ÿ’ฌ

### **Project planing ๐Ÿฆ**
* [Lucidchart](https://www.lucidchart.com/) - **The Project planing Tool** ๐Ÿง 
![eCommerce-Application](https://github.com/Quiddlee/eCommerce-Application/assets/114234698/5749689e-e893-4359-ae15-15bf3cf968dd)

# Core Development Team ๐Ÿ‘จโ€๐Ÿ’ป

### **Bohdan Shcherbyna** - **Front-end Developer / Team Lead** ๐Ÿฆ

### Contribution ๐Ÿช„:
* Working with the API ๐ŸŒ
* Managing the Redux store ๐Ÿช
* Animations ๐Ÿฆ•
* UI/UX Design ๐Ÿญ
* Code review ๐Ÿ”ซ
* Testing ๐Ÿงช
* Deployment ๐Ÿš€
* Documentation ๐Ÿ“ƒ
* CI/CD โœจ

### Contact ๐Ÿ‘‹:
* Email - ```[email protected]``` ๐Ÿ“ฌ
* Linkedin - [Bohdan Shcherbyna](https://www.linkedin.com/in/quiddle/) โœ’๏ธ
* Telegram - [@Quiddle](https://t.me/quiddle) ๐Ÿ“ฑ
* GitHub - [Quiddlee](https://github.com/Quiddlee) ๐Ÿฆ‰

#

### **Oleksii Drohachov** - **Front-end Developer** ๐Ÿฆˆ

### Contribution ๐Ÿช„:
* Managing the app router ๐Ÿ›–
* Code review ๐Ÿ”ซ
* Documentation ๐Ÿ“ƒ
* Working with CommerceTools data ๐Ÿ’€
* Managing app products ๐Ÿ’Ž
* Fully implement user profile page ๐Ÿ’ช
* UI layout ๐Ÿฆฅ
* Project setup ๐Ÿ’ซ
* Working with the API ๐Ÿฉบ

### Contact ๐Ÿ‘‹:
* Email - ```[email protected]``` ๐Ÿ“ฌ
* Linkedin - [Oleksii Drohachov](https://www.linkedin.com/in/oleksii-drohachov-b127a9245/) โœ’๏ธ
* Telegram - [@Tedzury](https://t.me/tedzury) ๐Ÿ“ฑ
* GutHub - [Tedzury](https://github.com/Tedzury) ๐Ÿฆ‰

#

### **Harry Holubiev** - **Front-end Developer** ๐Ÿฒ

### Contribution ๐Ÿช„:
* Designed product card ๐ŸŽด
* Product page ๐Ÿ“„
* Logo and animations ๐Ÿฃ
* implemented some features in Cart component ๐Ÿ›’
* Managing the app router ๐Ÿ›–
* Code review ๐Ÿ”ซ
* Documentation ๐Ÿ“ƒ
* UI Layout ๐Ÿฆฅ
* Working with the API ๐Ÿช„

### Contact ๐Ÿ‘‹:
* Email - ```[email protected]``` ๐Ÿ“ฌ
* GitHub - [barrydilan](https://github.com/barrydilan) ๐Ÿฆ‰

# Adding products data to commerce tools ๐Ÿฆฉ:
Here you can find detailed instructions on how to add products data to commercetools ๐Ÿ•ต๏ธ. To add data with products in commercetools we prepared [fully setted up repo](https://github.com/Tedzury/commercetools-sushisushi-data) for you ๐Ÿซ‚.

If you want exactly the same products as we have ๐Ÿ˜:
* You need to follow all the [Installation and Preparation](#Installation And Preparation) steps. โ›”
* Aaand type a few ๐Ÿค commands into the terminal to upload all the data into your commercetools account! ๐Ÿคฉ

Detailed instructions will be provided in further reading.
Nevertheless, feel free to modify data in any possible way you want ๐Ÿค. Main steps and cornerstones will be covered in further reading. So, let's proceed into detailed instructions. โฉ

# Step-by-step guide on how to add your own products data to commercetools ๐Ÿ˜‡

To add your own products data to commercetools you need to follow next steps ๐Ÿฆ:

* Clone [example repo](https://github.com/Tedzury/commercetools-sushisushi-data) into your computer. ๐Ÿ˜ถโ€๐ŸŒซ๏ธ

* Register your account at commercetools.

* Go to ```Settings > Developer settings > Create new API client > Select predefined Admin scope > Create API client```

* **โš ๏ธ !important step โš ๏ธ** Scroll to bottom of web page, there will be **select input** ๐Ÿ‘‡ with suggested options for downloading environment variables.

* Pick option to download in format ```.env``` file. **Don't close this window ๐Ÿšจ until you download all the files needed**, info is shown only **once** ๐Ÿ˜ฑ till you won't close the window ๐Ÿƒ.

* After downloading ๐Ÿ“ฉ, insert downloaded ```.env``` file into your cloned repo from first step. Remove ๐Ÿงน suggested name from this file, so there is only left ```.env``` in file name. More detailed info with pictures is available at [original sunrisedata](https://github.com/commercetools/commercetools-sunrise-data) ๐Ÿ’จ
* **Open terminal** ๐Ÿง‘โ€๐Ÿ’ป inside the **root folder** of the cloned repo and type next instructions: ```npm run clean:categories && npm run import:categories && npm run clean:products && npm run import:products```.

And that all! ๐Ÿ˜Š That simple, following this guide allows you to fully imitate our products data, that we used in our project. ๐Ÿ˜‰

# Remarks and additional info ๐Ÿ“ข:

And here will be some clues to add your own products into commerce tools ๐Ÿงฉ.

In our project we use very limited info and options for our products ๐Ÿค. Commercetools provides much more larger management for products ๐Ÿ€, categories, customers, prices, taxes, supply channels and so on ๐Ÿคฏ, but in our case we ain't needed so much options ๐ŸงŸโ€โ™‚๏ธ, so we used as little of it, as possible. In fact, we use only 2 minimal options to clean and then upload categories and products into api ๐Ÿ˜….

**4 main files** from cloned repo take part in this process: ```categories.csv, product-export-template.csv, product-type.json and products.csv``` ๐Ÿซ .

1. In the ```categories.csv``` file you describe the categories you want to import and their hierarchy ๐Ÿฆ.

2. Then, in ```product-export-template.csv``` you describe template for imported products ๐Ÿ›๏ธ, **exactly what info or fields must be in every product description**.

3. ```product-type.json``` describes every non-standard field for product in details ๐Ÿซฃ.

4. And finally ๐Ÿ™‚ in ```products.csv``` **you describe each of your product, that pattern must follow the** ```product-export-template pattern```.

# **Important thing** ๐Ÿšจ:
each product occupies his own line in ```.csv``` file(!) โš ๏ธ. In order to provide photos for products we created **separate repo** ๐Ÿฆฅ to store the photos, and in your products data we provide only links to the photos ๐Ÿ“ธ.

Also in repo you can find ```SushiSushi menu.xlsx``` file ๐Ÿฃ. It contains exactly the same data as ```products.csv``` file, BUT it's much easier ๐Ÿฅต to edit data in ```xlsx``` file, then in ```csv``` file ๐Ÿ’€.

Everything in this file is already set upped for comfort editing of products ๐Ÿ˜Š. If you want to edit products data: feel free to do it โœŒ๏ธ. You can change any data you want, just **make sure** it is suited for ```csv``` file ๐Ÿ‘Œ.

# How it works ๐Ÿค”:
Each cell in product row is concatenated and separated with comma ๐Ÿ˜ฒ. Then this concatenated rows are concatenated into one line in one cell at the bottom of the file ๐Ÿคฏ.

Just copy paste the cell content into ```products.csv``` file. Make sure, that after copying the data - you separated each product into own line in ```.csv``` file ๐Ÿฆ‰, it's **critical point** ๐Ÿ‘ฎ.

One more **critical point** - make sure that after ```copy/paste``` you left the ```header``` row at ```products.csv``` file ๐Ÿซก.

That is all you need to know about editing the product data for our project! To know more you should deep dive ๐Ÿคฟ into commercetools docs, be observant ๐Ÿ”ญ, lucky ๐Ÿ€ and ready to struggle ๐Ÿซ .

# License ๐Ÿ“œ

This project is licensed under the MIT License ๐Ÿฅท.

# Acknowledgments ๐Ÿ™

We want to thank [RS-School](https://rs.school/) community ๐Ÿฅฐ.

And especially our mentor, [Andrej Podlubnyj](https://github.com/andron13) for his help and support โค๏ธ.