<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Workflow | Alan Hung</title>
    <link>https://alanhung.dev/tag/workflow/</link>
      <atom:link href="https://alanhung.dev/tag/workflow/index.xml" rel="self" type="application/rss+xml" />
    <description>Workflow</description>
    <generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Sun, 10 Dec 2017 00:00:00 +0000</lastBuildDate>
    <image>
      <url>https://alanhung.dev/media/icon_hu337733d8e3179de0d1b2aeaca0f6c335_54345_512x512_fill_lanczos_center_3.png</url>
      <title>Workflow</title>
      <link>https://alanhung.dev/tag/workflow/</link>
    </image>
    
    <item>
      <title>Design and Implementation of an in-House Fabric Library</title>
      <link>https://alanhung.dev/project/fabric-library/</link>
      <pubDate>Sun, 10 Dec 2017 00:00:00 +0000</pubDate>
      <guid>https://alanhung.dev/project/fabric-library/</guid>
      <description>&lt;details class=&#34;toc-inpage d-print-none  &#34; open&gt;
  &lt;summary class=&#34;font-weight-bold&#34;&gt;Table of Contents&lt;/summary&gt;
  &lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#abstract&#34;&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#1-introduction&#34;&gt;1. Introduction&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#2-objectives&#34;&gt;2. Objectives&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#3-requirement&#34;&gt;3. Requirement&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#4-workflow&#34;&gt;4. Workflow&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#5-result&#34;&gt;5. Result&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#51-main-page&#34;&gt;5.1. Main Page&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#52-fabric-detail-pages&#34;&gt;5.2. Fabric Detail Pages&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#53-order-summary-page&#34;&gt;5.3 Order Summary Page&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#54-impact&#34;&gt;5.4 Impact&lt;/a&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href=&#34;#541-efficiency&#34;&gt;5.4.1. Efficiency&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#542-sales&#34;&gt;5.4.2. Sales&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#6-conclusion&#34;&gt;6. Conclusion&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#7-appendix-implementation-details&#34;&gt;7. Appendix: Implementation Details&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#71-framework&#34;&gt;7.1. Framework&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#72-image-preprocessing-and-feature-extraction&#34;&gt;7.2. Image Preprocessing and Feature Extraction&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#73-machine-learning-and-model-evaluation&#34;&gt;7.3. Machine learning and Model Evaluation&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#74-database&#34;&gt;7.4. Database&lt;/a&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href=&#34;#741-schema&#34;&gt;7.4.1. Schema&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#742-batch-update&#34;&gt;7.4.2. Batch update&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#75-web-service&#34;&gt;7.5. Web Service&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#76-web-server&#34;&gt;7.6. Web Server&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#77-client-user-interface&#34;&gt;7.7. Client (User Interface)&lt;/a&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href=&#34;#771-main-page&#34;&gt;7.7.1. Main Page&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#772-fabric-detail-pages-and-order-summary&#34;&gt;7.7.2. Fabric Detail Pages and Order Summary&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#78-cloud-provider&#34;&gt;7.8. Cloud provider&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;/details&gt;
&lt;p&gt;&lt;span id=&#34;milestones-of-business-model&#34;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;script&gt;notationMilestones()&lt;/script&gt;
&lt;h1 id=&#34;abstract&#34;&gt;Abstract&lt;/h1&gt;
&lt;p&gt;This document highlights the need for a fabric library to improve efficiency in fabric-related businesses. To specify the library&amp;rsquo;s requirements, we consider three aspects: System, User, and Administrator. Based on these requirements, we define a workflow for the fabric library that includes feature extraction, machine learning, and web services. The library is implemented using the Django framework and deployed on the Google Cloud Platform. Finally, we evaluate the impact of this library, resulting in up to a 4x improvement in fabric sales and a 50% reduction in the purchase process time.&lt;/p&gt;
&lt;h1 id=&#34;1-introduction&#34;&gt;1. Introduction&lt;/h1&gt;
&lt;p&gt;As a fabric-related business, much of our daily work involves sifting through piles of fabric and communicating with team members using fabric images. This process is time-consuming, exhausting, and inefficient. For example, a designer may spend an hour in the warehouse just to find a particular color and pattern of fabric. Additionally, images may be attached to emails, social media, or even printed out during discussions among team members, making it difficult to systematically compare or review results. To address these issues, we need to create an application that can assist team members in finishing their work more efficiently.&lt;/p&gt;
&lt;h1 id=&#34;2-objectives&#34;&gt;2. Objectives&lt;/h1&gt;
&lt;p&gt;To be more specific, there are two parts in our original workflow that can be improved, as shown in Fig. 1:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;Reducing the time spent on searching for fabric.&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;Before&lt;/span&gt;: Workers need to search through all the fabric in the warehouse to find the desired one.&lt;/li&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;After&lt;/span&gt;: Workers can input desired features of the fabric into the application, which will retrieve all fabrics that match the input criteria.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;Streamlining the time spent on reviewing fabrics and making purchases more efficiently.&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;Before&lt;/span&gt;: Workers and stakeholders are reviewing fabric using different tools, which can make it difficult for stakeholders to get a clear picture of all fabrics and can delay the decision-making process for purchases.&lt;/li&gt;
&lt;li&gt;&lt;span style=&#34;color:#FEAE00&#34;&gt;After&lt;/span&gt;: Workers and stakeholders can have discussions based on the same information provided by the application. Additionally, the application&amp;rsquo;s data visualization and machine learning-based predictions can provide valuable insights into the fabric.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            The figure illustrates two scenarios: the original workflow before using the application, and the workflow after use of the application.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;img src=&#34;./figure/objectives_black.webp&#34; width=&#34;3235&#34; height=&#34;2402&#34;&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h1 id=&#34;3-requirement&#34;&gt;3. Requirement&lt;/h1&gt;
&lt;p&gt;To achieve our goals, we can break down the requirements of our application into three aspects: &amp;ldquo;&lt;strong&gt;System&lt;/strong&gt;&amp;rdquo;, &amp;ldquo;&lt;strong&gt;User&lt;/strong&gt;&amp;rdquo;, and &amp;ldquo;&lt;strong&gt;Administrator&lt;/strong&gt;&amp;rdquo;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;System:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Store and display information about fabrics&lt;/li&gt;
&lt;li&gt;Extract features from fabrics&lt;/li&gt;
&lt;li&gt;Use machine learning (ML) models to make sales predictions&lt;/li&gt;
&lt;li&gt;Provide a dashboard summarizing each order&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Search and filter fabrics&lt;/li&gt;
&lt;li&gt;Retrieve similar fabrics&lt;/li&gt;
&lt;li&gt;Add fabrics to orders&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Administrator:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Evaluate results from ML models&lt;/li&gt;
&lt;li&gt;Batch update the database&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regarding the requirements of the &lt;strong&gt;System&lt;/strong&gt;, it should be able to store fabric information and display it to users. Additionally, it needs to extract features from the fabric so that users can search, filter, and retrieve similar fabric based on those features. Furthermore, the extracted features can be used in ML models to predict sales and can also be used in a dashboard to help stakeholders or buyers have a clearer view of the order list, enabling them to make decisions more efficiently.&lt;/p&gt;
&lt;p&gt;For &lt;strong&gt;User&lt;/strong&gt;, in addition to searching for fabric, they should be able to add fabrics to their wishlist, cart, or order. As for the &lt;strong&gt;Administrator&lt;/strong&gt;, metrics should be defined so that they can evaluate the ML models that make predictions on sales. Since the supplier will frequently provide new fabrics, batch updates are preferable instead of updating them one by one.&lt;/p&gt;
&lt;h1 id=&#34;4-workflow&#34;&gt;4. Workflow&lt;/h1&gt;
&lt;p&gt;The workflow can be designed logically by considering all the requirements, as shown in Fig. 2.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Workflow of our application
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;img src=&#34;./figure/workflow_black.webp&#34; width=&#34;3230&#34; height=&#34;2398&#34;&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Bucket:&lt;/strong&gt;  To allow fabric suppliers to upload images of fabrics and serve them to our web service, we need to create a &lt;a href=&#34;https://cloud.google.com/storage/docs/buckets&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;cloud storage bucket&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Image Preprocessing&lt;/strong&gt;: Images added to the bucket need to be resized to reduce runtime in feature extraction. Additionally, converting the color space from RGB to HSV is necessary for color theme extraction.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features Extraction:&lt;/strong&gt; During this stage, features such as the main color, pattern size, and color theme are extracted. Furthermore, we need to obtain sales data for each fabric to use as a target for machine learning.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Machine Learning&lt;/strong&gt;: At this stage, we perform both supervised and unsupervised learning, as described in the &lt;a href=&#34;#73-machine-learning-and-model-evaluation&#34;&gt;Implementation Details section&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Model Evaluation:&lt;/strong&gt; When using machine learning techniques, corresponding metrics are used to evaluate the models. For example, in linear regression, the $R^2$ metric is used for accuracy assessment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Database:&lt;/strong&gt; The extracted features and predictions from ML models will be updated in the database.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Web Service:&lt;/strong&gt; We use Python for the backend and HTML, JavaScript, and CSS for the frontend to create a web service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Web Server:&lt;/strong&gt; Since we are using Python on the backend, we can transfer HTTP requests and responses using WSGI. This can be accomplished by using Apache and its modules.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Client:&lt;/strong&gt; Our system only requires three functions for users: searching and filtering fabrics, retrieving similar fabrics, and adding fabrics to an order.&lt;/p&gt;
&lt;h1 id=&#34;5-result&#34;&gt;5. Result&lt;/h1&gt;
&lt;p&gt;Our web service consists of a &lt;a href=&#34;https://demo.alanhung.dev&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;main page&lt;/a&gt;, &lt;a href=&#34;https://demo.alanhung.dev/product/210801_051X4Y/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;fabric detail pages&lt;/a&gt;, and an &lt;a href=&#34;https://demo.alanhung.dev/order-summary-demo/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;order summary page&lt;/a&gt;, all shown in the Fig. 3.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Pages in our application.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Main Page&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;a href=&#34;https://demo.alanhung.dev&#34; target=&#34;_blank&#34;&gt;&lt;img src=&#34;./figure/main_page.webp&#34; width=&#34;1080&#34; height=&#34;1379&#34;&gt;&lt;/a&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Fabric Detail Pages&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;a href=&#34;https://demo.alanhung.dev/product/210502_050X2Y/&#34; target=&#34;_blank&#34;&gt;&lt;img src=&#34;./figure/fabric_detail.webp&#34; width=&#34;1080&#34; height=&#34;1507&#34;&gt;&lt;/a&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Order Summary Page&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;a href=&#34;https://demo.alanhung.dev/order-summary-demo/&#34; target=&#34;_blank&#34;&gt;&lt;img src=&#34;./figure/order_summary.webp&#34; width=&#34;1080&#34; height=&#34;1890&#34;&gt;&lt;/a&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h2 id=&#34;51-main-page&#34;&gt;5.1. Main Page&lt;/h2&gt;
&lt;p&gt;On the left side of the webpage, there are multiple sliders that can be used to filter the range of each feature, including color, pattern size, contrast, and so on. The web page will then display fabrics that match the selected criteria. As for the color theme, since it is a categorical feature, it is designed as a checkbox. Additionally, users can input a fabric ID to retrieve specific fabrics.&lt;/p&gt;
&lt;h2 id=&#34;52-fabric-detail-pages&#34;&gt;5.2. Fabric Detail Pages&lt;/h2&gt;
&lt;p&gt;The polar plot displays the color theme and range. Additionally, histograms of each channel are shown, and the percentage of each color is displayed. Quantitative features such as pattern size and contrast are also included. Finally, the top 12 options for similar fabrics are listed at the bottom of the page.&lt;/p&gt;
&lt;h2 id=&#34;53-order-summary-page&#34;&gt;5.3 Order Summary Page&lt;/h2&gt;
&lt;p&gt;This page serves as an interactive dashboard that not only summarizes the order for the user, but also allows the user to adjust the quantity of fabric to see its impact on the order.&lt;/p&gt;
&lt;p&gt;At the top of the page, there are two pie charts displaying the labels predicted by K-means. These charts remind the user about the proportion of each label. A higher proportion of a specific label, especially &amp;ldquo;Plain&amp;rdquo;, may be risky for sales, as discussed in the &lt;a href=&#34;https://alanhung.dev/project/improve-fabric-sales/&#34;&gt;previous project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The price and quantity of the order are displayed in the center of the page. Users can adjust the quantity using buttons provided.&lt;/p&gt;
&lt;p&gt;Finally, the features of the fabrics are summarized using a violin plot and a pie chart located at the bottom of the page, which provide insight into the distribution of the features.&lt;/p&gt;
&lt;h2 id=&#34;54-impact&#34;&gt;5.4 Impact&lt;/h2&gt;
&lt;h3 id=&#34;541-efficiency&#34;&gt;5.4.1. Efficiency&lt;/h3&gt;
&lt;p&gt;During the feature extraction stage, we implement algorithms that &lt;span style=&#34;color:#FEAE00&#34;&gt;achieve 12x and 63x improvements in speed compared to human processing&lt;/span&gt; for extracting pattern size and color themes, respectively&lt;a href=&#34;https://alanhung.dev/project/repeated-pattern-detection/#42-result&#34;&gt;$^1$&lt;/a&gt; &lt;a href=&#34;https://alanhung.dev/project/color-theme-extraction/#42-result&#34;&gt;$^2$&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When it comes to finding similar fabrics, defining the metric can be difficult due to the subjective nature of fabric images. However, the implemented algorithm has been proven to retrieve fabrics that are similar to those perceived by humans&lt;a href=&#34;https://alanhung.dev/project/search-similar-fabric/#32-result&#34;&gt;$^3$&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;542-sales&#34;&gt;5.4.2. Sales&lt;/h3&gt;
&lt;p&gt;Thanks to our in-house library and the hard work of our team members, sales have increased significantly since 2018, as shown in Fig. 4. We have observed &lt;span style=&#34;color:#FEAE00&#34;&gt;up to a 2.73 improvement&lt;/span&gt; compared to 2017. Additionally, we have &lt;span style=&#34;color:#FEAE00&#34;&gt;reduced the process time for each purchase by 50%&lt;/span&gt;, as discussed in a &lt;a href=&#34;https://alanhung.dev/project/improve-fabric-sales/#6-strategy-to-improve-sales&#34;&gt;previous project&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Fabric sales per quarter have been tracked since 2017. Since 2018, the purchase process has incorporated the in-house library, which has led to higher sales. Different colors indicate the before and after implementation.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;div id=&#34;fabric-sales-plot&#34;&gt;&lt;/div&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h1 id=&#34;6-conclusion&#34;&gt;6. Conclusion&lt;/h1&gt;
&lt;p&gt;We take a systematic approach to building an in-house library for fabric. This approach includes analyzing requirements, selecting a framework, implementation, and deployment. The library has proven to be useful in significantly increasing sales and reducing the time required for the purchase and design process.&lt;/p&gt;
&lt;div class=&#34;p-b-20&#34;&gt;&lt;/div&gt;
&lt;hr&gt;
&lt;div class=&#34;p-b-20&#34;&gt;&lt;/div&gt;
&lt;h1 id=&#34;7-appendix-implementation-details&#34;&gt;7. Appendix: Implementation Details&lt;/h1&gt;
&lt;h2 id=&#34;71-framework&#34;&gt;7.1. Framework&lt;/h2&gt;
&lt;p&gt;As Python is our main programming language, we have opted to use the &lt;a href=&#34;https://www.djangoproject.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Django framework&lt;/a&gt; to construct our web service. This framework offers all the essential components and features, including frontend development with JavaScript, HTML, and CSS, and backend interaction through an object-relational mapper (ORM).&lt;/p&gt;
&lt;h2 id=&#34;72-image-preprocessing-and-feature-extraction&#34;&gt;7.2. Image Preprocessing and Feature Extraction&lt;/h2&gt;
&lt;p&gt;We use &lt;a href=&#34;https://opencv.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;OpenCV&lt;/a&gt; with Python for image manipulation tasks, such as importing, exporting, resizing, and color space conversion. We also implement our own algorithm to extract features, including &lt;a href=&#34;https://alanhung.dev/project/color-theme-extraction/#3-program&#34;&gt;color themes&lt;/a&gt; and &lt;a href=&#34;https://alanhung.dev/project/repeated-pattern-detection/#32-approach-with-l_2-loss&#34;&gt;pattern sizes&lt;/a&gt;. Similar fabrics are also considered as a feature and are extracted based on &lt;a href=&#34;https://alanhung.dev/project/search-similar-fabric/#23-perceptual-similarity-lpips&#34;&gt;perceptual similarity&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;73-machine-learning-and-model-evaluation&#34;&gt;7.3. Machine learning and Model Evaluation&lt;/h2&gt;
&lt;p&gt;We perform dimensionality reduction, K-means clustering, and beta regression on the extracted features. The procedure and results are discussed in the &lt;a href=&#34;https://alanhung.dev/project/improve-fabric-sales/&#34;&gt;previous project&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;74-database&#34;&gt;7.4. Database&lt;/h2&gt;
&lt;h3 id=&#34;741-schema&#34;&gt;7.4.1. Schema&lt;/h3&gt;
&lt;p&gt;Fig. 5 provides a simplified schema as an example. We have created a &amp;ldquo;Fabric&amp;rdquo; table to store the features of fabrics. For each item in an order, we create an &amp;ldquo;OrderItem&amp;rdquo; table and use &amp;ldquo;order_id&amp;rdquo; and &amp;ldquo;fabric_id&amp;rdquo; as foreign keys. Lastly, for each order, an &amp;ldquo;Order&amp;rdquo; table is created, with &amp;ldquo;user_id&amp;rdquo; used as the foreign key.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            The simplified schema of our database.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;img src=&#34;./figure/schema_black.webp&#34; width=&#34;1961&#34; height=&#34;1424&#34;&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h3 id=&#34;742-batch-update&#34;&gt;7.4.2. Batch update&lt;/h3&gt;
&lt;p&gt;To perform batch updates in a database using Django, we create a custom django-admin command. The following is an example of importing CSV data and writing it into the “Fabric” table in a database.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Command&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BaseCommand&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;help&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;load fabric data&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;handle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;options&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;# Custom function for loading data in CSV format&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;data&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;load_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;file&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;./example.csv&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;				
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;i&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;range&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;len&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;# Write data to each column&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;row_data&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;row_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;fabric_name&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;row_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;main_color&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;# Save data to Fabric table&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;item&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fabric&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;row_data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;item&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;save&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;75-web-service&#34;&gt;7.5. Web Service&lt;/h2&gt;
&lt;p&gt;We use Django&amp;rsquo;s class-based views to build our web pages. Setting up the connection with the database and template only requires few lines of code. Additionally, built-in pagination can be used to achieve multi-page content.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;ShopView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ListView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;model&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fabric&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# Table name in database&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;paginate_by&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;6&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# 6 items for each page&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;template_name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shop/shop.html&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Meeting user requirements for filtering or searching fabric involves setting up a frontend user interface to receive user requests and a backend to query the database.&lt;/p&gt;
&lt;p&gt;To achieve this on the frontend, a classic range slider and a checkbox can be used. On the backend, we need to use the &amp;ldquo;setup&amp;rdquo; method to receive these requests from the frontend, parse them, and make a query to the database using &amp;ldquo;get_queryset&amp;rdquo;. The following code provides an example of how to filter content in shop.html based on a user&amp;rsquo;s request for a specific hue range.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;ShopView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ListView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;model&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fabric&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# Table name in database&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;paginate_by&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;6&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;# 6 items for each page&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;template_name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;shop/shop.html&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;filters&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;setup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;kwargs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&amp;#34;Initialize attributes shared by all view methods.&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nb&#34;&gt;super&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;setup&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;kwargs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;parse_request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_queryset&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&amp;#34;Make queries to the database.&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;new_queryset&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fabric&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;objects&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;filter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;filters&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;new_queryset&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;parse_request&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&amp;#34;Receive request and update to filter for queryset&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;low&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GET&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hue_low&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;high&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GET&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hue_high&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;bp&#34;&gt;self&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;filters&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hue__range&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;low&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;high&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Another requirement is to keep track of the order list across different pages. This can be achieved by using cookie in frontend. The following example demonstrates how to update a cart&amp;rsquo;s content in a cookie using JavaScript.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;updateCart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cookie&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cart=&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;JSON&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;stringify&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;updateQuantity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;quantity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;])&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;quantity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fabricName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;quantity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;updateCart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cart&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;76-web-server&#34;&gt;7.6. Web Server&lt;/h2&gt;
&lt;p&gt;As our web service is built with Python, we can use WSGI to forward requests from the web server. Apache with mod_wsgi provides a simple way to set up a directory for Python scripts, and virtual environments in the configuration file. The following code provides an example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Macro&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;DjangoWSGI&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;document&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;WSGIDaemonProcess&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;demo&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;python&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;home&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;$script/venv&amp;#34;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;python&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;$script&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;WSGIProcessGroup&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;demo&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;WSGIScriptAlias&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;$script/site_settings/wsgi.py&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Directory&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;$script/site_settings&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Files&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wsgi&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;py&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;n&#34;&gt;Require&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;all&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;granted&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;o&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Files&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Directory&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Macro&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;77-client-user-interface&#34;&gt;7.7. Client (User Interface)&lt;/h2&gt;
&lt;p&gt;We have created three pages for our user interface based on our requirements: the &lt;strong&gt;main page&lt;/strong&gt;, &lt;strong&gt;fabric detail pages&lt;/strong&gt;, and &lt;strong&gt;order summary page&lt;/strong&gt;, as shown in Fig. 6.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Draft layout of the user interface.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Main Page&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/main_page_ui.webp&#34; width=&#34;1080&#34; height=&#34;534&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Fabric Detail Pages&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/fabric_detail_ui.webp&#34; width=&#34;1080&#34; height=&#34;795&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;

    &lt;div class=&#34;w-size13 respon5 p-l-2 p-r-2&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;Order Summary Page&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/order_summary_ui.webp&#34; width=&#34;1080&#34; height=&#34;907&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h3 id=&#34;771-main-page&#34;&gt;7.7.1. Main Page&lt;/h3&gt;
&lt;p&gt;We use range sliders to allow users to specify the range of each feature. A search box is used to retrieve fabric based on the fabric&amp;rsquo;s ID.&lt;/p&gt;
&lt;p&gt;To create range sliders, begin by adding three progress bars that will serve as its appearance.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;wrap-filter-bar&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-filter-bar&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-progress&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-progress-mask-left&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-progress-mask-right&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, add two inputs to specify the upper and lower bounds of the feature.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue-input&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;field&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue_min&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;range&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue_min&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue_max&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;range&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hue_max&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add an event listener to each input to update the progress bars based on the user&amp;rsquo;s input.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;slider&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;gap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Retrieve html elements
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`.&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-input input`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;progress&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`.leftbar #&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-filter-bar .&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-progress`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;progressMaskLeft&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`.leftbar #&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-filter-bar .&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-progress-mask-left`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;progressMaskRight&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`.leftbar #&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-filter-bar .&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-progress-mask-right`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Add event listener
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;forEach&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;input&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;addEventListener&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;input&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;event&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;// Retrieve value from input
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;            &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;minVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;maxVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;parseInt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;c1&#34;&gt;// Update progress bar
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;            &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;maxVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;minVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;gap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;event&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;target&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;className&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;===&lt;/span&gt; &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;-min`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;maxVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;gap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;nx&#34;&gt;rangeInput&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;minVal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;gap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                &lt;span class=&#34;nx&#34;&gt;updateProgressAndDisplay&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(...);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally, create a button to submit the input values to the backend.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;button&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;submit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Filter&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;button&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A search box can be created simply by using HTML.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-product&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-box&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;method&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;GET&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;action&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-product&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                   &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-product&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                   &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;search-product&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                   &lt;span class=&#34;na&#34;&gt;placeholder&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Search Products...&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;button&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;submit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;button&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;772-fabric-detail-pages-and-order-summary&#34;&gt;7.7.2. Fabric Detail Pages and Order Summary&lt;/h3&gt;
&lt;p&gt;The primary goal is to visualize the features for each fabric and summarize the order with plots. To achieve this, we rely on &lt;a href=&#34;https://plotly.com/javascript/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Plotly&lt;/a&gt;, JavaScript, and CSS, as they provide interactive and responsive plots for users. For example, a scatter plot can be created by providing the id of the HTML element and the x and y data, respectively.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;scatterPlot&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;plotID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;data&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;scatter&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;mode&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;line&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;Plotly&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;newPlot&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;plotID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;data&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;78-cloud-provider&#34;&gt;7.8. Cloud provider&lt;/h2&gt;
&lt;p&gt;We chose Google Cloud Platform (GCP) as our cloud provider because it has the lowest latency of 18 ms in Taiwan compared to AWS and Azure. Although GCP provides many convenient options for deploying a web service, such as &lt;a href=&#34;https://cloud.google.com/appengine&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;App Engine&lt;/a&gt; or &lt;a href=&#34;https://cloud.google.com/run&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Cloud Run&lt;/a&gt;, we have chosen to use &lt;a href=&#34;https://cloud.google.com/products/compute&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Compute Engine&lt;/a&gt;. The reason for this is that it allows for more precise control and direct management of virtual machines (VMs). For instance, we can select CPU and RAM according to our budget, and choose a region with the lowest latency.&lt;/p&gt;



&lt;h1 id=&#34;&#34;
    class=&#34;js-toggle-dropdown-content cs-pointer color0-hov trans-0-4&#34;
&gt;
    
&lt;/h1&gt;
&lt;div class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
    
    
    
&lt;/div&gt;

    


&lt;script type=&#34;text/javascript&#34; src=&#34;./js/plot.js&#34;&gt;&lt;/script&gt;
</description>
    </item>
    
    <item>
      <title>Workflow Optimization for Social Media Promotion</title>
      <link>https://alanhung.dev/project/social-media-promotion/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://alanhung.dev/project/social-media-promotion/</guid>
      <description>&lt;script&gt;removeCoverImage()&lt;/script&gt;
&lt;details class=&#34;toc-inpage d-print-none  &#34; open&gt;
  &lt;summary class=&#34;font-weight-bold&#34;&gt;Table of Contents&lt;/summary&gt;
  &lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#abstract&#34;&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#1-introduction&#34;&gt;1. Introduction&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#2-workflow&#34;&gt;2. Workflow&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#21-first-version&#34;&gt;2.1. First Version&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#22-revised-version&#34;&gt;2.2. Revised Version&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#3-result&#34;&gt;3. Result&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#31-dataset&#34;&gt;3.1. Dataset&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#32-comparison&#34;&gt;3.2. Comparison&lt;/a&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href=&#34;#phase-i&#34;&gt;Phase I&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#phase-ii&#34;&gt;Phase II&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#phase-iii&#34;&gt;Phase III&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&#34;#phase-iv&#34;&gt;Phase IV&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#33-selected-posts&#34;&gt;3.3. Selected Posts&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#4-conclusion&#34;&gt;4. Conclusion&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
&lt;/details&gt;
&lt;p&gt;&lt;span id=&#34;milestones-of-business-model&#34;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;script&gt;notationMilestones()&lt;/script&gt;
&lt;h1 id=&#34;abstract&#34;&gt;Abstract&lt;/h1&gt;
&lt;p&gt;This document discusses a workflow for social media promotion, including issues with the original workflow and a revised version that integrates online collaboration, assessment and summary, fabric selection, and a library for similar products and fabric.&lt;/p&gt;
&lt;p&gt;The revised workflow led to a 4.4x increase in the number of posts and a 3.2x increase in the number of reactions per post, all while maintaining the same operational budget as the original workflow. The document also includes a comparison of post performance with that of a competitor, as well as a selection of top-performing posts.&lt;/p&gt;
&lt;h1 id=&#34;1-introduction&#34;&gt;1. Introduction&lt;/h1&gt;
&lt;p&gt;Social media has become an essential tool for business development due to its large number of active users and its ability to provide a direct way to interact with users. This can be leveraged for brand and product promotion. Among the many social media platforms, Facebook is often chosen because it is the largest, with &lt;a href=&#34;https://investor.fb.com/investor-news/press-release-details/2023/Meta-Reports-First-Quarter-2023-Results/default.aspx#:~:text=Revenue%20%e2%80%93%20Revenue%20was%20%2428.65%20billion,%25%20year%2Dover%2Dyear&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;2.99 billion monthly active users&lt;/a&gt; as of March 31, 2023.&lt;/p&gt;
&lt;p&gt;Social media platforms provide multiple formats, including text, images, and videos, for business owners to create posts. Video, which can &lt;a href=&#34;https://www.linkedin.com/pulse/social-video-generates-1200-more-shares-than-text-image-moroles/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;generate 1200% more shares&lt;/a&gt; than text and image content combined, is the most effective format.&lt;/p&gt;
&lt;p&gt;Even with knowledge of which platform to choose and what content format to use, creating posts and effectively engaging users is still difficult for businesses. There are two main challenges to consider when using social media for business purposes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The high number of active users means that there is a lot of competition, so businesses need to consistently create new and innovative posts to stand out.&lt;/li&gt;
&lt;li&gt;As social media becomes increasingly intertwined with product development and manufacturing, the workflow for managing it becomes more complex. However, there is no single standard workflow that fits all situations.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, designing a smooth workflow that can generate innovative posts is crucial to succeeding in business development on social media.&lt;/p&gt;
&lt;h1 id=&#34;2-workflow&#34;&gt;2. Workflow&lt;/h1&gt;
&lt;h2 id=&#34;21-first-version&#34;&gt;2.1. First Version&lt;/h2&gt;
&lt;img src=&#34;./figure/workflow/workflow_01_black.webp&#34; width=&#34;2219&#34; height=&#34;1375&#34; style=&#34;margin-top: 0;&#34;&gt;
&lt;p&gt;Fig. 1 provides an example of our original workflow, which includes the following steps:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ideation, Summary and Review&lt;/strong&gt;: Every week, all staff members meet to propose and discuss ideas. The ideas are then summarized and reviewed by stakeholders, as shown in Fig. 1(a). Ideas that pass the review process proceed to the next step.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Preprocess&lt;/strong&gt;: In this step, the tailor creates a prototype based on the proposal, assesses manufacturing difficulties and functionality, and decides on the fabric to be used.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Production&lt;/strong&gt;: The product is customized based on feedback and assessment of the prototype. In addition, a videographer and photographer are required to record videos and take photos, respectively.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Release and Review&lt;/strong&gt;: After publishing the post, all team members held a meeting to discuss its metrics and determine what needs to be improved next time.&lt;/p&gt;
&lt;p&gt;While this chronological workflow may seem effective, there are several issues:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Waste in Resources:&lt;/strong&gt; Ideas proposed by designers may be difficult to manufacture or may require too many resources in film and photo shooting. This can lead to termination of the proposal in the later phases of the workflow, resulting in wasted resources.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Waste of Time:&lt;/strong&gt; To solve the aforementioned problem, one might try to gather all relevant personnel during ideation, including tailors and photographers. However, this process can be time-consuming. For instance, there is no need for a photographer to join discussions on product features during brainstorming among designers. In addition, members may have different work sites, which means they need to spend extra time commuting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bottleneck&lt;/strong&gt;: Since stakeholders need to manually review all proposals before moving to the next phase of the workflow, this becomes a bottleneck for the entire workflow and is prone to human error.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inefficiency and Unreliability&lt;/strong&gt;: As the number of products increase, it becomes difficult to identify all products that are similar to the proposed idea during the review phase. This can lead to the unintentional manufacturing of similar products without awareness.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            An example of each step in our original workflow.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(a) Ideation&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/workflow/proposal_origin.webp&#34; width=&#34;1080&#34; height=&#34;492&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(b) Preprocess&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/workflow/preprocess.webp&#34; width=&#34;1080&#34; height=&#34;538&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(c) Production&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/workflow/production_01.webp&#34; width=&#34;1080&#34; height=&#34;538&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(d) Release &amp;amp; Review&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
            &lt;img src=&#34;./figure/workflow/publish_review.webp&#34; width=&#34;1080&#34; height=&#34;538&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h2 id=&#34;22-revised-version&#34;&gt;2.2. Revised Version&lt;/h2&gt;
&lt;img src=&#34;./figure/workflow/workflow_02_black.webp&#34; width=&#34;2449&#34; height=&#34;2101&#34; style=&#34;margin-top: 0;&#34;&gt;
&lt;p&gt;The workflow has been revised to address the issues mentioned above. Three additional steps have been integrated into the workflow, as shown in Fig. 2:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Online Collaboration&lt;/strong&gt;: We integrate our workflow with &lt;a href=&#34;http://monday.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;monday.com&lt;/a&gt;, as shown in Fig. 2(a). This platform allows all members, including tailors and photographers who are in the later phase of the process, to discuss ideas more efficiently. In this way, all members can discuss each idea in a more organized way and save time on commuting and holding meetings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Assessment &amp;amp; Summary&lt;/strong&gt;: In addition to outlining the content and purpose of the proposal, members must identify its features❶ and assess the necessary resources❷. The KNN (K-Nearest-Neighbor) algorithm is then applied to retrieve similar products from the library based on their features❸. K-means is used to prioritize each proposal based on the required resources.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fabric Selection&lt;/strong&gt;: Thanks to our &lt;a href=&#34;https://demo.alanhung.dev&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;in-house fabric library&lt;/a&gt;, the time required for fabric selection has been significantly reduced.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Library&lt;/strong&gt;: We have set up a library for products similar to the fabric library. After each product release and review, members update the actual metrics and resources needed in the library. This information is then used in the Summary step.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Budget&lt;/strong&gt;: Apart from the time spent on in-house library development and the monthly subscription fee of the online collaboration application, there are no other expenses. This means that the revised workflow can be implemented within the original operational budget.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            Three major steps of revised workflow.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(a) Online Collaboration&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
        &lt;img src=&#34;./figure/workflow/monday.webp&#34; width=&#34;1080&#34; height=&#34;607&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(b) Assessment &amp;amp; Summary&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
        &lt;img src=&#34;./figure/workflow/proposal_ML.webp&#34; width=&#34;1080&#34; height=&#34;607&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;


    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        

&lt;div class=&#34;wrap-dropdown-content p-b-10 mdc-elevation--z24&#34;&gt;
    &lt;h6 class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 m-b-1 p-l-5 p-r-5&#34; style=&#34;font-size:18px;&#34;&gt;(c) Fabric Library&lt;i class=&#34;down-mark fs-12 color1 fa dis-none float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;show&lt;/i&gt;
        &lt;i class=&#34;up-mark fs-12 color1 fa float-r m-text29&#34; aria-hidden=&#34;true&#34;&gt;hide&lt;/i&gt;
    &lt;/h6&gt;
    &lt;figure class=&#34;dropdown-content dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
        
        &lt;img src=&#34;./figure/workflow/fabric_library.webp&#34; width=&#34;1080&#34; height=&#34;607&#34;&gt;
        &lt;/figure&gt;
&lt;/div&gt;

    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;h1 id=&#34;3-result&#34;&gt;3. Result&lt;/h1&gt;
&lt;h2 id=&#34;31-dataset&#34;&gt;3.1. Dataset&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Data Source&lt;/strong&gt;: Due to confidentiality, I cannot disclose information regarding sales, customer retention, and people reached. However, I can provide a comparison of post performance based on publicly available data from Facebook. We extracted this data using a web crawler implemented with Selenium in Python.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Competitor&lt;/strong&gt;: We have included data from our competitor, labeled &amp;ldquo;Benchmark&amp;rdquo; in the following analysis, for comparison purposes. We selected this competitor since it is &lt;a href=&#34;https://www.facebook.com/22pb22&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;the most active account on social media&lt;/a&gt; among all fabric retailers in Taiwan.&lt;/p&gt;
&lt;h2 id=&#34;32-comparison&#34;&gt;3.2. Comparison&lt;/h2&gt;
&lt;p&gt;As shown in Fig. 3, we have selected two metrics for comparison:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Number of Posts&lt;/strong&gt;: This can be considered a measure of productivity.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Average Number of Reactions per Post&lt;/strong&gt;: This metric is calculated by dividing the total number of reactions, such as &amp;ldquo;Like&amp;rdquo;, &amp;ldquo;Love&amp;rdquo;, &amp;ldquo;Haha&amp;rdquo;, &amp;ldquo;Wow&amp;rdquo;, &amp;ldquo;Sad&amp;rdquo;, and &amp;ldquo;Angry&amp;rdquo;, that users click on by the total number of posts per month. This measure can be used to gauge popularity.&lt;/p&gt;
&lt;div class=&#34;respon5 bo11 mdc-elevation--z24&#34;&gt;
    
    &lt;div class=&#34;wrap-dropdown-content p-b-10&#34;&gt;
        &lt;h5 data-pre=&#34;Figure&amp;nbsp;&#34;
            data-post=&#34;:&amp;nbsp;&#34;
            class=&#34;js-toggle-dropdown-content cs-pointer m-text29 color0-hov trans-0-4 p-l-15 p-r-15 numbered&#34;
            style=&#34;font-weight: normal;&#34;
        &gt;
            &lt;i class=&#34;down-mark fs-16 color1 fa fa-plus float-r dis-none&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            &lt;i class=&#34;up-mark fs-16 color1 fa fa-minus float-r&#34; aria-hidden=&#34;true&#34;&gt;&lt;/i&gt;
            The figure compares our performance with that of our competitor in two metrics: the number of posts and the average number of reactions per post.
        &lt;/h5&gt;
        &lt;figure class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;

            
            &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
                
    &lt;div class=&#34;w-size29 respon5&#34;&gt;
  
        &lt;div class=&#34;t-center&#34;&gt;
        &lt;span style=&#34;color:#03DAC6&#34;&gt;━━ This Work &lt;/span&gt;&amp;nbsp&amp;nbsp&amp;nbsp&lt;span style=&#34;color:#BB86FC&#34;&gt;━━ Benchmark&lt;/span&gt;
        &lt;/div&gt;
        &lt;div id=&#34;post-comparison-plot&#34;&gt;&lt;/div&gt;
    
&lt;/div&gt;



            &lt;/div&gt;
            

        &lt;/figure&gt;
    &lt;/div&gt;
    
&lt;/div&gt;

&lt;p&gt;To better understand the context of our development process, we divide the timeline into four phases and discuss each phase separately.&lt;/p&gt;
&lt;h3 id=&#34;phase-i&#34;&gt;Phase I&lt;/h3&gt;
&lt;p&gt;The competitor began promoting on social media as early as 2014, three years before we did. Since then, they have consistently published posts and steadily gained popularity.&lt;/p&gt;
&lt;h3 id=&#34;phase-ii&#34;&gt;Phase II&lt;/h3&gt;
&lt;p&gt;We adopted the first version of the workflow and started promoting our product on social media. However, we encountered the issues mentioned previously, which resulted in low productivity in terms of the number of posts, and our popularity was only one-third that of our competitor.&lt;/p&gt;
&lt;h3 id=&#34;phase-iii&#34;&gt;Phase III&lt;/h3&gt;
&lt;p&gt;The revised workflow has resulted in a 4.4x increase in the number of posts compared to Phase II. This is also the first time we have surpassed our competitor. Additionally, due to the consistency in post publication and the improved quality of each post, there has been a 3.2x increase in the number of reactions per post compared to Phase II.&lt;/p&gt;
&lt;h3 id=&#34;phase-iv&#34;&gt;Phase IV&lt;/h3&gt;
&lt;p&gt;Although the revised workflow can be implemented within the original operational budget, the cost of materials will inevitably increase as more content is created and popularity becomes saturated. In other words, we are facing the problem of diminishing marginal effect.&lt;/p&gt;
&lt;p&gt;To tackle this issue, we implemented workflow modifications (details omitted). As a result, we maintained the same level of popularity with fewer posts. Moreover, we surpassed our competitors in popularity for the first time.&lt;/p&gt;
&lt;h2 id=&#34;33-selected-posts&#34;&gt;3.3. Selected Posts&lt;/h2&gt;
&lt;p&gt;The following are the top three posts from our Facebook page. These posts reached 748k people with a single post, without any advertisements, and resulted in a monthly reach of 1.2M on our Facebook page.&lt;/p&gt;
&lt;div class=&#34;dropdown-content p-l-15 p-r-15 dis-block&#34; style=&#34;margin-top:0; margin-bottom:0&#34;&gt;
    &lt;div class=&#34;flex-w flex-sb p-l-2 p-r-2&#34;&gt;
        &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
            &lt;a href=&#34;https://facebook.com/4214480068609657&#34; target=&#34;_blank&#34;&gt;
                &lt;img src=&#34;./figure/figure_01.webp&#34; width=&#34;1080&#34; height=&#34;1080&#34; alt=&#34;figure_01&#34; style=&#34;margin-top:0.5rem; margin-bottom: 0rem;&#34;&gt;
            &lt;/a&gt;
            &lt;img src=&#34;./figure/figure_01_insight.webp&#34; width=&#34;1080&#34; height=&#34;490&#34; alt=&#34;figure_01_insight&#34; style=&#34;margin-top:0rem; margin-bottom: 0.5rem;&#34;&gt;
        
&lt;/div&gt;

        &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
            &lt;a href=&#34;https://facebook.com/4217675061623491&#34; target=&#34;_blank&#34;&gt;
                &lt;img src=&#34;./figure/figure_02.webp&#34; width=&#34;1080&#34; height=&#34;1080&#34; alt=&#34;figure_02&#34; style=&#34;margin-top:0.5rem; margin-bottom: 0rem;&#34;&gt;
            &lt;/a&gt;
            &lt;img src=&#34;./figure/figure_02_insight.webp&#34; width=&#34;1080&#34; height=&#34;490&#34; alt=&#34;figure_02_insight&#34; style=&#34;margin-top:0rem; margin-bottom: 0.5rem;&#34;&gt;
        
&lt;/div&gt;

        &lt;div class=&#34;w-size6 respon5 p-l-2 p-r-2&#34;&gt;
  
            &lt;a href=&#34;https://facebook.com/4206103716113959&#34; target=&#34;_blank&#34;&gt;
                &lt;img src=&#34;./figure/figure_03.webp&#34; width=&#34;1080&#34; height=&#34;1080&#34; alt=&#34;figure_03&#34; style=&#34;margin-top:0.5rem; margin-bottom: 0rem;&#34;&gt;
            &lt;/a&gt;
            &lt;img src=&#34;./figure/figure_03_insight.webp&#34; width=&#34;1080&#34; height=&#34;490&#34; alt=&#34;figure_03_insight&#34; style=&#34;margin-top:0rem; margin-bottom: 0.5rem;&#34;&gt;
        
&lt;/div&gt;

    &lt;/div&gt;
    &lt;div class=&#34;t-right&#34;&gt;
        &lt;a href=&#34;https://alanhung.dev/project/videography/&#34; target=&#34;_blank&#34;&gt;
        &lt;span id=&#34;search-pattern-brute-force-run&#34; style=&#34;color: #BB86FC;&#34;&gt;See more&lt;/span&gt;
        &lt;/a&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;h1 id=&#34;4-conclusion&#34;&gt;4. Conclusion&lt;/h1&gt;
&lt;p&gt;In this document, we outline the issues with the original workflow, which include waste in resources and time, bottleneck, inefficiency, and unreliability. We present a revised workflow that integrates an online collaboration platform, an in-house library, and a machine learning algorithm to solve these issues. This workflow can be operated under the same operational budget as the previous one, while also outperforming it in productivity and post popularity, which are measured in the number of posts and average number of reactions per post.&lt;/p&gt;
&lt;p&gt;We also discuss a comparison with our competitor. Despite the competitor starting on social media three years earlier than us, we managed to surpass them with our revised workflow in 2021.&lt;/p&gt;
&lt;script type=&#34;text/javascript&#34; src=&#34;./js/plot.js&#34;&gt;&lt;/script&gt;
&lt;script&gt;
    figClosed({figuresIndex: [1], closeInner: true, closeOuter: true, allDevice: true})
&lt;/script&gt;
</description>
    </item>
    
  </channel>
</rss>
