Skip to content

Quiddlee/eCommerce-Application

Repository files navigation

๐Ÿฃ 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 ๐Ÿ˜‰.

๐Ÿ†๐Ÿฅณ One of the best RS2023Q1 graduation projects!

Task description - Task description ๐Ÿ“
Deployed project preview - SushiSushi ๐Ÿ‘€

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 on your computer. โœŒ๏ธ
  • Code Editor of your choice. ๐Ÿ“
  • Installed npm. ๐Ÿ“ฆ
  • Created commercetools 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 git@github.com: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 ๐Ÿบ:

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

  • Choose the meal you like the most ๐Ÿ˜‹๐Ÿด
  • Fill your shopping cart ๐Ÿ›๏ธ๐Ÿ›’

gif-2

  • Search for your lovely meals! ๐Ÿ”

gif-3

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

gif-4

  • Sign up your account! ๐ŸŒŒ

gif-6

  • Change your data at any time ๐Ÿ‘Œ

gif-5

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

Technology Stack โš™๏ธ

Developing ๐Ÿ˜

Code Quality ๐Ÿงน

External Libraries ๐Ÿ“š

Design ๐ŸŽจ

Git Methodology

Architecture ๐Ÿ›๏ธ

API ๐Ÿ“ก

img_4

CI/CD ๐Ÿš€

img_5

Project Management ๐Ÿ“ˆ

img_6 img_1 img_8

Communication ๐Ÿ“ฃ

  • Discord - The 3xWeek Meeting Communication Tool ๐Ÿ—ฃ๏ธ
  • Telegram - The Main Chatting Communication Tool ๐Ÿ’ฌ

Project planing ๐Ÿฆ

  • Lucidchart - The Project planing Tool ๐Ÿง  eCommerce-Application

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 ๐Ÿ‘‹:

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 ๐Ÿ‘‹:

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 - queharambe@gmail.com ๐Ÿ“ฌ
  • GitHub - 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 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 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 ๐Ÿ’จ

  • 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 community ๐Ÿฅฐ.
And especially our mentor, Andrej Podlubnyj for his help and support โค๏ธ.