Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
443 commits
Select commit Hold shift + click to select a range
b0ff2d1
Merge branch 'sprint_2/login-registration-main' into test/store-pages…
ElenaYrm Aug 24, 2023
ee774e6
fix: dublicate metaData in auth middleware file after merge
ElenaYrm Aug 24, 2023
745b0f8
refactor: add prefix Test to tests
GermanGrib Aug 24, 2023
02a5c6f
Merge pull request #23 from ElenaYrm/feat/tests-footer-utils-shared
GermanGrib Aug 24, 2023
34171bf
Merge branch 'sprint_2/login-registration-main' into test/store-pages…
ElenaYrm Aug 24, 2023
a0bff1f
fix: test errors
ElenaYrm Aug 24, 2023
eda826d
feat: add test workflow
ElenaYrm Aug 24, 2023
c21367e
fix: workflow name
ElenaYrm Aug 24, 2023
7ba7da7
fix: test error
ElenaYrm Aug 24, 2023
c6aaf9d
Merge pull request #25 from ElenaYrm/test/store-pages-loginForm
ElenaYrm Aug 24, 2023
5092220
Merge pull request #22 from ElenaYrm/sprint_2/login-registration-main
ElenaYrm Aug 25, 2023
39d0c8c
refactor: add mixin to common components
ElenaYrm Aug 26, 2023
6f86370
refactor: change styles to common components
ElenaYrm Aug 26, 2023
cbf04e3
refactor: change styles to pages
ElenaYrm Aug 26, 2023
3a31223
refactor: change styles to rest components
ElenaYrm Aug 26, 2023
4a1a90f
fix: tests snapshots
ElenaYrm Aug 26, 2023
35b799b
feat: add tabs & personal information view
GermanGrib Aug 26, 2023
9fa41f0
Merge pull request #26 from ElenaYrm/fix/styles
ElenaYrm Aug 26, 2023
b52a063
feat: add third tab layout
GermanGrib Aug 26, 2023
26c98bc
feat: start make styles to FirstTab
GermanGrib Aug 26, 2023
28c3e18
conflicts resolve
GermanGrib Aug 26, 2023
6f0ec0d
feat: styles to first tab 80%
GermanGrib Aug 26, 2023
7c33596
feat: add Product page to Router
HereEast Aug 27, 2023
8009fa7
feat: add catalog page and route
ElenaYrm Aug 27, 2023
fadb5a1
refactor: distruct Profile component
GermanGrib Aug 27, 2023
cdb7543
feat: add updateUserInfo method sdk
GermanGrib Aug 27, 2023
c244538
feat: create parseProductData func
HereEast Aug 28, 2023
6b641ba
feat: create IProduct interface
HereEast Aug 28, 2023
0766ccd
feat: create initialProduct object
HereEast Aug 28, 2023
5668c3a
feat: add loader component
ElenaYrm Aug 28, 2023
4d5c726
feat: add fetchProduct data and getProductData func
HereEast Aug 28, 2023
0f9c5ea
feat: create product slice and add to store
HereEast Aug 28, 2023
eedd190
feat: add initialProductMock to storeMock file
HereEast Aug 28, 2023
8c8d82f
feat: add logic to fetch and save product data
HereEast Aug 28, 2023
6b27766
fix: fix failed tests
HereEast Aug 28, 2023
fee0602
fix: update fetchProductData func
HereEast Aug 28, 2023
4505bca
refactor: remove getProductData func
HereEast Aug 28, 2023
621f14d
feat: create Product slice type
HereEast Aug 28, 2023
5d40c7c
feat: create Product thunk
HereEast Aug 28, 2023
1649270
feat: create Product slice
HereEast Aug 28, 2023
7d5fcf1
fix: update product in store
HereEast Aug 29, 2023
b345b43
fix: update getting product logic in Product component
HereEast Aug 29, 2023
0d3a75c
refactor: move LANG_CODE to constants
HereEast Aug 29, 2023
50061cf
fix: fix tests
HereEast Aug 29, 2023
e258a72
Merge pull request #28 from ElenaYrm/feat/product-request
HereEast Aug 29, 2023
0f4a42a
refactor: resolve merge conflicts
ElenaYrm Aug 29, 2023
94cd1c3
feat: add close btn for every Tab
GermanGrib Aug 29, 2023
e3c31d3
feat: install swiper
HereEast Aug 29, 2023
604d253
feat: add basic styles for Slider
HereEast Aug 29, 2023
022bae8
refactor: replace edit btn from profile page to components
GermanGrib Aug 29, 2023
a7239b2
feat: create Slider component
HereEast Aug 30, 2023
b1dc893
feat: add Slider to Product page
HereEast Aug 30, 2023
b21d73e
feat: add remove controls if 1 image in the gallery
HereEast Aug 30, 2023
3059f2d
fix: install back @types/react-dom, @types/react
HereEast Aug 30, 2023
4d78951
refactor: update classNames
HereEast Aug 30, 2023
c594c21
fix: fix tests
HereEast Aug 30, 2023
ad53222
feat: add getProductList sdk request
HereEast Aug 30, 2023
a27b809
feat: add parseProductListData func
HereEast Aug 30, 2023
90a5f57
feat: add initial states and types
HereEast Aug 30, 2023
e9acf35
feat: add getSearchParams func
HereEast Aug 30, 2023
dae1fe1
feat: create productList thunk and slice, add them to store
HereEast Aug 30, 2023
e9c607c
Merge pull request #29 from ElenaYrm/feat/product-slider
HereEast Aug 30, 2023
864639d
fix: bugs in tabs with valdiation and errors with values
GermanGrib Aug 30, 2023
bb725ba
Merge pull request #30 from ElenaYrm/product-list-store
HereEast Aug 31, 2023
49b45ce
Merge branch 'sprint_3/catalog-product-profile' into feat/catalog
ElenaYrm Aug 31, 2023
e324d1d
refactor: change product list slice to catalog slice
ElenaYrm Aug 31, 2023
b9565e0
feat: add filters components
ElenaYrm Aug 31, 2023
eb6ae6c
feat: add search and sorting components
ElenaYrm Aug 31, 2023
4ef9d6f
feat: add product list and card components
ElenaYrm Aug 31, 2023
77bcf82
fix: update parseProductData func
HereEast Aug 31, 2023
4b4b043
feat: add Profile Context
GermanGrib Aug 31, 2023
2dea4a7
fix: update helpers functions
HereEast Aug 31, 2023
5956b00
feat: add styles for Product page
HereEast Aug 31, 2023
43e7a5d
feat: create Accordion element
HereEast Aug 31, 2023
edc0a10
feat: create formatPrice func
HereEast Aug 31, 2023
ab5871c
feat: add product details to Product page
HereEast Aug 31, 2023
e99d6f5
refactor: refactor Accordion code
HereEast Aug 31, 2023
dd45736
fix: update IProduct interface
HereEast Aug 31, 2023
4510ce9
Merge branch 'sprint_3/catalog-product-profile' into feat/product-info
HereEast Aug 31, 2023
4e847ce
fix: fix initial product state and interface
HereEast Aug 31, 2023
b452e09
Merge pull request #31 from ElenaYrm/feat/product-info
HereEast Aug 31, 2023
5cacc45
feat: add categories loading info and breadcrumbs component
ElenaYrm Aug 31, 2023
9130e4b
refactor: catalog page and product list
ElenaYrm Aug 31, 2023
1ac4454
fix: merge conflicts
ElenaYrm Aug 31, 2023
081cdd9
fix: test errors
ElenaYrm Aug 31, 2023
60b5e73
Merge pull request #32 from ElenaYrm/feat/catalog
ElenaYrm Aug 31, 2023
bbd92c6
feat: add close fullscreen Slider on button
HereEast Aug 31, 2023
ca8e8bb
feat: add modal window component
GermanGrib Aug 31, 2023
6ba3c45
feat: add scss styles to Product page
HereEast Aug 31, 2023
f19ce66
feat: add thunk to load user id if user is authotized
ElenaYrm Sep 1, 2023
2f78750
feat: add user slice
ElenaYrm Sep 1, 2023
6d58a6c
fix: test errors
ElenaYrm Sep 1, 2023
9835c89
Merge pull request #33 from ElenaYrm/feat/user-store
ElenaYrm Sep 1, 2023
7e3e42f
resolve conflicts: merge sprint_3 branch
GermanGrib Sep 1, 2023
b0b2790
refactor: update paths in Router
HereEast Sep 1, 2023
8f9b4ae
refactor: update paths links
HereEast Sep 1, 2023
48bdaed
feat: change testUser to user from store
GermanGrib Sep 1, 2023
ac969fc
refactor: prefix to token in local storage
ElenaYrm Sep 1, 2023
09c2d90
feat: upd user info work
GermanGrib Sep 1, 2023
6534d77
feat: create ProductDetails component
HereEast Sep 1, 2023
d3842a4
refactor: refactor Product page code
HereEast Sep 1, 2023
67c7d52
Merge branch 'sprint_3/catalog-product-profile' into feat/product-pag…
HereEast Sep 1, 2023
519d2c6
feat: add remove address thunk
GermanGrib Sep 1, 2023
d6212d4
feat: add Loader on loading status
HereEast Sep 1, 2023
0fababf
feat: add defaultAddressId active state
GermanGrib Sep 2, 2023
458d3b7
feat: add addNewAddress posibility
GermanGrib Sep 2, 2023
85cc941
feat: changeAddress opportunity
GermanGrib Sep 2, 2023
5e5b674
feat: save active state of tabs on rerender
GermanGrib Sep 2, 2023
4717b61
refactor: refactor Slider code
HereEast Sep 3, 2023
a6159c6
Merge pull request #34 from ElenaYrm/feat/product-page-styles
HereEast Sep 3, 2023
d4d630a
feat: add new link to Header and add mobile view style
HereEast Sep 3, 2023
0813359
feat: update Home page with project info
HereEast Sep 3, 2023
b1a0fe9
fix: date request
GermanGrib Sep 3, 2023
3569cf7
feat: styles for mobile
GermanGrib Sep 4, 2023
78e9074
feat: handle error on Product page
HereEast Sep 4, 2023
b57c72c
fix: change func for removeEventListener
HereEast Sep 4, 2023
13e0c82
feat: add styles to filters
ElenaYrm Sep 4, 2023
2b5d5b8
feat: add styles for search, sorting and category filter
ElenaYrm Sep 4, 2023
027e3ea
feat: add product card styles
ElenaYrm Sep 4, 2023
fb83593
refactor: styles in tabs
GermanGrib Sep 4, 2023
77863f4
feat: add styles to breadcrumbs and catalog page
ElenaYrm Sep 4, 2023
e1e1ee7
feat: add mobile styles
ElenaYrm Sep 4, 2023
898c9cb
fix: issues with requests when edit and remove addresses
GermanGrib Sep 4, 2023
a87f0cc
merge sprint3 branch
GermanGrib Sep 4, 2023
d2a6680
resolve conflicts
GermanGrib Sep 4, 2023
bb2cf36
Merge pull request #35 from ElenaYrm/feat/header-main
HereEast Sep 4, 2023
c0cfcb7
fix: test extractLocalUser
GermanGrib Sep 4, 2023
ea26c34
feat: add mobile filters
ElenaYrm Sep 4, 2023
e1ebef0
Merge pull request #36 from ElenaYrm/feat/profile-page
ElenaYrm Sep 4, 2023
6ba6356
fix: resolve merge conflicts
ElenaYrm Sep 4, 2023
c11ba18
fix: errors
ElenaYrm Sep 4, 2023
345e201
fix: lint and tests errors
ElenaYrm Sep 4, 2023
4eaf568
Merge pull request #37 from ElenaYrm/feat/catalog-styles
ElenaYrm Sep 4, 2023
55ac021
fix: update styles
HereEast Sep 4, 2023
809c436
Merge branch 'sprint_3/catalog-product-profile' into fix/styles-profile
HereEast Sep 6, 2023
7b0a876
fix: fx Home page tests
HereEast Sep 6, 2023
a467f85
Merge pull request #39 from ElenaYrm/fix/styles-profile
HereEast Sep 6, 2023
f72f221
fix: add addresses
GermanGrib Sep 6, 2023
818df5d
Merge branch 'sprint_3/catalog-product-profile' into feat/profile-page
GermanGrib Sep 6, 2023
a1f0b5b
refactor: return warnings
GermanGrib Sep 6, 2023
f53530c
feat: add check to Loader test
GermanGrib Sep 6, 2023
4b8240e
Merge pull request #40 from ElenaYrm/feat/profile-page
GermanGrib Sep 6, 2023
da16127
feat: add tests
ElenaYrm Sep 6, 2023
91ea03a
feat: add store slice tests
HereEast Sep 7, 2023
aa70d10
feat: add store selectors tests
HereEast Sep 7, 2023
51acb37
Merge pull request #41 from ElenaYrm/test/utils-pages
ElenaYrm Sep 8, 2023
0a70abb
fix: update messages
HereEast Sep 8, 2023
25073a5
Merge pull request #43 from ElenaYrm/feat/store-test
ElenaYrm Sep 8, 2023
9b2e360
Merge pull request #38 from ElenaYrm/sprint_3/catalog-product-profile
ElenaYrm Sep 8, 2023
85da867
feat: add actions to current branch (deploy)
ElenaYrm Sep 8, 2023
d60b309
feat: add empty Cart view
HereEast Sep 9, 2023
b1f050d
refactor: move Empty Cart view to EmptyCart component
HereEast Sep 9, 2023
2cd90fe
feat: add aboutTabs tabsBody rsLogo teamProcess components
GermanGrib Sep 9, 2023
89fbf1b
feat: add sdk requests for cart
ElenaYrm Sep 9, 2023
ddd658d
feat: add cart slice and thunks
ElenaYrm Sep 9, 2023
921b3ea
feat: add anonymous login thunk
ElenaYrm Sep 9, 2023
43f8ef1
feat: add cart info to components
ElenaYrm Sep 9, 2023
f907aea
fix: tests
ElenaYrm Sep 9, 2023
103369c
refactor: refactor code
HereEast Sep 9, 2023
8a2ac7b
refactor: refactor code
HereEast Sep 9, 2023
bc356f7
feat: create CartList component
HereEast Sep 9, 2023
1a00d8c
feat: create Total component
HereEast Sep 9, 2023
395f3e5
feat: create Cart page view
HereEast Sep 9, 2023
0c2c7c4
feat: add styles to mobile cards and rslogo link
GermanGrib Sep 10, 2023
117977e
feat: styles to hide and show cards
GermanGrib Sep 10, 2023
890dd39
fix: snapshots in tests
GermanGrib Sep 10, 2023
b82cf21
feat: add promo codes
ElenaYrm Sep 11, 2023
cf808a7
refactor: create separate Description component
GermanGrib Sep 11, 2023
3cafa86
Merge pull request #44 from ElenaYrm/feat/cart-requests
ElenaYrm Sep 12, 2023
6617ba8
merge sprint_4
GermanGrib Sep 12, 2023
c33b8ad
Merge branch 'sprint_4/basket-about_us' of https://github.com/ElenaYr…
HereEast Sep 12, 2023
aad6fb3
feat: add functionality to Cart page
HereEast Sep 12, 2023
9b56c59
refactor: styles optimizations
GermanGrib Sep 13, 2023
2f83144
fix : snapshots
GermanGrib Sep 13, 2023
de96989
feat: add infinite scroll to catalog page
ElenaYrm Sep 13, 2023
f02d85c
feat: add request to discounts codes
ElenaYrm Sep 13, 2023
4511990
feat: add discounts to cart slice
ElenaYrm Sep 13, 2023
cc21f11
feat: add Cart buttons to Product page and Cards on Catalog page
HereEast Sep 13, 2023
fdebf59
fix: update Button event type
HereEast Sep 13, 2023
399e270
refactor: change token flow to anonymous user
ElenaYrm Sep 13, 2023
c9ce7e2
refactor: remove unnessecery code
GermanGrib Sep 13, 2023
4c9011d
Merge pull request #46 from ElenaYrm/feat/discount-code
ElenaYrm Sep 13, 2023
66cd3e0
fix: update styles
HereEast Sep 13, 2023
e359630
Merge branch 'sprint_4/basket-about_us' into feat/about-us
GermanGrib Sep 13, 2023
8eaafc0
Merge branch 'feat/discount-code' of https://github.com/ElenaYrm/eCom…
HereEast Sep 13, 2023
909199a
Merge branch 'sprint_4/basket-about_us' into feat/infinite-scroll
ElenaYrm Sep 13, 2023
67aefb8
Merge pull request #45 from ElenaYrm/feat/about-us
GermanGrib Sep 13, 2023
4dd5569
feat: update Cart, add error for Promo code
HereEast Sep 13, 2023
c3a3e78
fix: fix total price count
HereEast Sep 13, 2023
336248d
refactor: clean code
HereEast Sep 14, 2023
2469e70
Merge pull request #47 from ElenaYrm/feat/cart
HereEast Sep 14, 2023
ea5b326
refactor: add common component to filters
ElenaYrm Sep 14, 2023
f91988e
refactor: change the updating products list after changing search params
ElenaYrm Sep 14, 2023
4a0aee5
fix: merge conflicts
ElenaYrm Sep 14, 2023
6f3dfa0
feat: add styles to loader
ElenaYrm Sep 14, 2023
ac8a88d
feat: update About page
HereEast Sep 14, 2023
cd0deac
feat: add Cart icon and cart count to Header
HereEast Sep 14, 2023
cabfb06
feat: add errors on Cart
HereEast Sep 14, 2023
94ebe0f
fix: update About
HereEast Sep 14, 2023
a0ff7ed
Merge pull request #48 from ElenaYrm/feat/infinite-scroll
ElenaYrm Sep 15, 2023
70204fe
feat: add cart selectors test
ElenaYrm Sep 15, 2023
4687c85
refactor: mock data for store and slices
ElenaYrm Sep 15, 2023
94659d5
fix: fix Cart error message
HereEast Sep 15, 2023
42441e9
fix: fix Cart count indicator
HereEast Sep 15, 2023
8601691
feat: add cart slice test
ElenaYrm Sep 15, 2023
3edd06c
fix: getUserAge test error
ElenaYrm Sep 15, 2023
692ce97
feat: add test to getLocalCart function
ElenaYrm Sep 15, 2023
45593c1
feat: add clear Cart confirm popup
HereEast Sep 15, 2023
6493026
feat: add test to splitToParagraphs function
ElenaYrm Sep 15, 2023
4ab8260
feat: add popup on Checkout
HereEast Sep 15, 2023
8d262dd
feat: add bios and photos on About page
HereEast Sep 15, 2023
16184e5
feat: add error messages on Cart
HereEast Sep 15, 2023
0934d42
feat: add types to Loader and tests to this components
ElenaYrm Sep 16, 2023
2e1647a
refactor: home tests
ElenaYrm Sep 16, 2023
86bf5ee
feat: add Teamwork and Process text on About page
HereEast Sep 16, 2023
a78fb98
Merge branch 'feat/infinite-scroll' of https://github.com/ElenaYrm/eC…
HereEast Sep 16, 2023
536729b
fix: resolve conflicts in ProductsList file
HereEast Sep 16, 2023
f40cbcb
Merge pull request #49 from ElenaYrm/feat/cart-errors-fixes
HereEast Sep 16, 2023
20f4dc5
refactor: page tests
ElenaYrm Sep 16, 2023
9fde7dd
fix: merge conflicts
ElenaYrm Sep 16, 2023
4ca08dd
refactor: cart slice and utils tests
ElenaYrm Sep 16, 2023
89c65fc
refactor: loginForm test
ElenaYrm Sep 16, 2023
0b1f0c9
feat: add test to description component
GermanGrib Sep 16, 2023
3fe26e9
feat: tab test
GermanGrib Sep 16, 2023
6a0b4a9
feat: add AboutTabs test
GermanGrib Sep 16, 2023
7ff87c4
feat: edit Readme
HereEast Sep 16, 2023
2766496
refactor: edit contribution list content
HereEast Sep 16, 2023
e4e6ff4
feat: update Home page
HereEast Sep 17, 2023
7b82a0b
Merge pull request #50 from ElenaYrm/test/store-pages-utils
ElenaYrm Sep 17, 2023
b9ef58c
feat: add Teamwork text
HereEast Sep 17, 2023
24b827c
feat: add ContentBlock component for About page
HereEast Sep 17, 2023
995bdcf
fix: fix naming
HereEast Sep 17, 2023
d9e2ab9
fix: change px to rem
HereEast Sep 18, 2023
1ce254e
Merge branch 'sprint_4/basket-about_us' of https://github.com/ElenaYr…
HereEast Sep 18, 2023
2a6f283
fix: update Home snapshot tests
HereEast Sep 18, 2023
cb15d8d
fix: update types naming
HereEast Sep 18, 2023
ebc4498
Merge pull request #51 from ElenaYrm/refactor/about-tests-optimization
GermanGrib Sep 18, 2023
3b3748e
refactor: update Home content
HereEast Sep 18, 2023
787b17b
fix: fix public paths
HereEast Sep 18, 2023
320f626
fix: fix thunk
HereEast Sep 18, 2023
eefc9a2
fix: fix Home snapshot tests
HereEast Sep 18, 2023
59f5da0
Merge branch 'sprint_4/basket-about_us' of https://github.com/ElenaYr…
HereEast Sep 18, 2023
c285110
fix: fix Tab tests and TeamProcess tests
HereEast Sep 18, 2023
0360f15
Merge pull request #53 from ElenaYrm/feat/about-content
HereEast Sep 18, 2023
f925e67
refactor: filters and items per page
ElenaYrm Sep 18, 2023
6f25848
fix: update styles and hover states
HereEast Sep 18, 2023
ff0d86f
Merge pull request #55 from ElenaYrm/fix/project-styles
HereEast Sep 18, 2023
1fe8b3b
Merge pull request #54 from ElenaYrm/feat/product-list
ElenaYrm Sep 18, 2023
45a8354
refactor: readme file
ElenaYrm Sep 19, 2023
525f49c
Merge pull request #52 from ElenaYrm/sprint_4/basket-about_us
ElenaYrm Sep 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VITE_CTP_PROJECT_KEY=art
VITE_CTP_CLIENT_SECRET=tCcZh5XwKU1grwM-dpEcRnvynmgwxasp
VITE_CTP_CLIENT_ID=j_yucI-j56zVM3IHDqo7Cfxi
VITE_CTP_AUTH_URL=https://auth.europe-west1.gcp.commercetools.com
VITE_CTP_API_URL=https://api.europe-west1.gcp.commercetools.com
VITE_CTP_SCOPES=manage_my_payments:art view_standalone_prices:art manage_my_orders:art manage_customers:art manage_my_profile:art view_payments:art view_messages:art introspect_oauth_tokens:art create_anonymous_token:art view_quote_requests:art manage_my_quotes:art view_quotes:art manage_my_quote_requests:art view_published_products:art view_discount_codes:art manage_my_shopping_lists:art manage_orders:art view_categories:art view_shopping_lists:art manage_my_business_units:art manage_order_edits:art view_cart_discounts:art view_attribute_groups:art view_project_settings:art view_staged_quotes:art view_product_selections:art view_products:art
46 changes: 46 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: [
'react-refresh',
'prettier',
],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
"prettier/prettier": [
"error",
{
"endOfLine": "lf"
}
],
"indent": ["error", 2, { "SwitchCase": 1 }],
"no-console": "warn",
"prefer-const": "error",
"quotes": ["error", "single"],
"jsx-quotes": ["error", "prefer-double"],
"max-len": ["error", {
"code": 120,
"ignoreUrls": true,
"ignoreRegExpLiterals": true,
'ignoreStrings': true
}],
"comma-dangle": ["error", "always-multiline"],
"semi": ["error", "always"],
"no-var": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-function-return-type": "error",
},
}
24 changes: 24 additions & 0 deletions .github/workflows/deploy-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
workflow_call:
inputs:
deploy-dir:
required: true
type: string

jobs:
deploy:
runs-on: self-hosted
steps:
- uses: actions/download-artifact@v3
with:
name: build.tar.gz
path: ./
- name: Deploy
run: |
set -xe
echo "Deploy app"
tar -xzf build.tar.gz
rm -rf ${{ inputs.deploy-dir }} || true
mkdir -pv ${{ inputs.deploy-dir }}
mv dist ${{ inputs.deploy-dir }}/
rm build.tar.gz
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build

on:
push:
branches: [ 'sprint_2/login-registration-main', 'sprint_3/catalog-product-profile', 'sprint_4/basket-about_us' ]
pull_request:
branches: [ 'sprint_2/login-registration-main', 'sprint_3/catalog-product-profile', 'sprint_4/basket-about_us' ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Build
run: |
echo "Build app"
npm i
npm run build
tar -czf build.tar.gz ./dist
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: build.tar.gz
path: build.tar.gz
retention-days: 7
deploy_v1:
needs: build
if: github.event_name != 'pull_request'
uses: "./.github/workflows/deploy-template.yaml"
with:
deploy-dir: "/var/www/ecommerse/v1"
18 changes: 18 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tests

on:
pull_request:
branches: [ 'sprint_2/login-registration-main', 'sprint_3/catalog-product-profile', 'sprint_4/basket-about_us' ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Tests
run: |
npm i
npm run test
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"tabWidth": 2,
"printWidth": 120,
"singleQuote": true,
"bracketSameLine": false,
"trailingComma": "all",
"bracketSpacing": true,
"end_of_line": "lf"
}
102 changes: 102 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Online Store

**SCOOP** is an online shopping app that provides an interactive and seamless digital experience.

Users can browse through a vast range of products, view detailed descriptions, add their favorite items to the basket, and proceed to checkout. It includes features such as login and registration, product search, product categorization, sorting, and other.

It's fully responsive, ensuring it looks great on various devices with a minimum resolution of 390px.

**Key pages:**
- Main page
- Login and Registration
- Catalog
- Product page
- User Profile
- Basket
- About

The application is powered by CommerceTools, a leading provider of commerce solutions for B2C and B2B enterprises. CommerceTools offers a cloud-native, microservices-based commerce platform that enables brands to create unique and engaging digital commerce experiences.
<br></br>
# **📚 Technology Stack**
- `TypeScript` `React` `Redux Toolkit` `React Router`
- `Vite`
- `ESLint` `Prettier` `Husky`
- `JEST` `Testing Library`
- `Sass` `Classnames`
- `SDK CommerceTools`

- `CommerceTools`

Used CommerceTools as a **public API** to intergrate its functionality with the current project, and get access to various features and functionalities that CommerceTools offers, such as retrieving product information, processing orders, managing inventory, and other.
<br></br>
# ⚒️ Scripts

```jsx
npm run build // build the project,
// compile the source code and generate production-ready output files

npm run preview // preview the project

npm run dev // starts a dev server for further development

npm run lint // run a code linter, which checks the code for
// potential errors, coding style violations, and other issues

npm lint:fix // automatically fix some of the issues
// reported by the linter (ex: formatting problems)

npm run prettier // run the Prettier code formatter to ensure
// consistent code formatting throughout the project

npm run prepare // automatically executed before the package is published.
// It prepares the project for distribution (transpile, clean, or compress files)

npm run test // run automated tests for the project
// to ensure its functionality and detect any issues
```
<br></br>
# 🧑‍💻 Set up and run the project locally

1. Open the folder in your IDE where you'll be working on this project.
2. Open the Terminal (Important: Make sure it's in the same folder).
3. Start here:

```tsx
// Clone the project
git clone https://github.com/ElenaYrm/eCommerce-App.git

// Switch to develop branch
git checkout develop

// Install the dependencies
npm install (or npm i)
```

4. To preview:

```tsx
// Run the application
npm run dev (or npm run preview)
```

5. To contribute:

```tsx
// Create a new branch from develop (required)
git checkout -b feat/issueName-description
```

6. Commit changes
7. Pull-request to develop → Use [template](https://github.com/ElenaYrm/eCommerce-App/blob/main/.github/pull_request_template.md)
8. You are awesome!
<br></br>
# 👯‍♂️ Team

[German](https://github.com/germangrib)
[Elena](https://github.com/ElenaYrm)
[Nastia](https://github.com/HereEast)
<br></br>
# ⬇️ Important

1. Please, **do not merge changes** without any of the team’s assignment.
2. All the visual materials and data you see on this website are meant **for learning purposes only**. We're not running a commercial project here, it's all about education and exploration! However, if you ever feel that any content on this website infringes on your rights or if you have any concerns, please don't hesitate to reach out to any of the team members above 🙂
24 changes: 24 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/images/favic.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Scoop Art</title>
<script>
window.global = window;
</script>
<script type="module">
import process from "process";
import EventEmitter from "events";
import {Buffer} from "buffer/";
window.Buffer = Buffer;
window.process = process;
window.EventEmitter = EventEmitter;
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
1 change: 1 addition & 0 deletions jest-setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom';
Loading