Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/quiddlee/ecommerce-application
- Owner: Quiddlee
- Created: 2023-08-02T09:07:39.000Z (over 1 year ago)
- Default Branch: release/basket-about_us
- Last Pushed: 2023-09-21T19:39:46.000Z (over 1 year ago)
- Last Synced: 2023-09-21T20:03:13.950Z (over 1 year ago)
- Topics: ecommerce-application, feature-sliced-design, react-router, reactjs, redux, rsschool, rtk-query, tailwindcss, typescript, vite, vitest
- Language: TypeScript
- Homepage: https://quiddlee.github.io/eCommerce-Application/
- Size: 39.9 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
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 โค๏ธ.