Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
4e14cae
docs: add pull request template
Howl404 Jul 31, 2023
4d9e580
docs: update readme.md
AcademeG1 Jul 30, 2023
1db5663
Merge pull request #4 from Howl404/update-readme
Howl404 Aug 1, 2023
afeedca
Merge pull request #3 from Howl404/pull-request-template
Howl404 Aug 1, 2023
6fbf6da
feat: create vite app, react, eslint
Howl404 Aug 1, 2023
3123fff
feat: eslint rules, airbnb, prettier
Howl404 Aug 1, 2023
5a76d32
feat: lint fix script
Howl404 Aug 1, 2023
e8a0124
feat: add sass
Howl404 Aug 1, 2023
397415c
refactor: move project to main folder
Howl404 Aug 1, 2023
cb8b03a
feat: husky
Howl404 Aug 1, 2023
3ad15ed
feat: jest
Howl404 Aug 1, 2023
6bb52eb
feat: folder structure
Howl404 Aug 1, 2023
a5e3b17
refactor: move vite logo
Howl404 Aug 1, 2023
851d4fb
Merge pull request #5 from Howl404/vite-setup
Howl404 Aug 2, 2023
7ae3e08
docs: update readme
Howl404 Aug 2, 2023
9393c36
fix: typo
Howl404 Aug 2, 2023
d37a981
Merge pull request #6 from Howl404/readme-update
Howl404 Aug 2, 2023
6fd2946
feat: translate readme to english
Howl404 Aug 2, 2023
165cfd9
Merge pull request #7 from Howl404/readme-translate
Howl404 Aug 3, 2023
bf9c660
feat: basic routing and registration form
Howl404 Aug 10, 2023
19d4618
feat: add page 404
capapa Aug 10, 2023
815b071
feat: add all inputs, pattern validation, postal codes, styles
Howl404 Aug 10, 2023
309387d
feat: add header component and styles for header
AcademeG1 Aug 11, 2023
42c2c81
refactor: remove unnecessary styles
AcademeG1 Aug 11, 2023
5c8b44b
feat: anon token, register user, interfaces
Howl404 Aug 14, 2023
4446452
Merge pull request #9 from Howl404/release/create-header
Howl404 Aug 14, 2023
c9ec4d4
Merge pull request #10 from Howl404/release/page404
Howl404 Aug 14, 2023
eefc14f
fix: type error, variable name
Howl404 Aug 14, 2023
20d9230
refactor: apply prettier
Howl404 Aug 14, 2023
365a1f3
feat: add basic routing with template pages
Howl404 Aug 14, 2023
c16e926
feat: add links
Howl404 Aug 14, 2023
6b03d64
feat: add form for sign in, add email and password validation rules, …
AcademeG1 Aug 15, 2023
ca49a3d
Merge branch 'release/login-registration-main' into release/login-sig…
AcademeG1 Aug 15, 2023
5b06b39
refactor: delete unnecessary export
Howl404 Aug 15, 2023
47b51a5
feat: add billing and shipping address
capapa Aug 15, 2023
800c41e
feat: add Implement error handling
capapa Aug 15, 2023
bb22b60
refactor: delete unnecessary type
Howl404 Aug 15, 2023
48ec29a
fix: eslint errors, name variable, English translation, switch change…
AcademeG1 Aug 16, 2023
8c336c5
fix: style form, refactor code
AcademeG1 Aug 17, 2023
3959d22
feat: not found page, move header
Howl404 Aug 17, 2023
cde334f
feat: auto login user, save tokens to cookies
Howl404 Aug 17, 2023
c9153a4
fix: typo
Howl404 Aug 17, 2023
6c1bf32
refactor: remove the extra null check
AcademeG1 Aug 18, 2023
66762e4
Merge pull request #11 from Howl404/release/login-sign-in-main
AcademeG1 Aug 18, 2023
b157497
Merge branch 'release/login-registration-main' into release/main-page…
AcademeG1 Aug 18, 2023
bbb4bc6
Merge pull request #12 from Howl404/release/main-page-enhancements
Howl404 Aug 18, 2023
735d9b1
refactor: delete comments
Howl404 Aug 18, 2023
3b333fb
fix: not able to register if pressed before fully complete form
Howl404 Aug 18, 2023
257eca5
feat: interface for cart
Howl404 Aug 18, 2023
8784fb0
feat: responsive for register page
Howl404 Aug 18, 2023
dbdcf21
feat: redirect authorized user, get anon token if not, create cart be…
Howl404 Aug 18, 2023
825ade9
Merge branch 'release/login-registration-main' into registration-page
Howl404 Aug 18, 2023
af4d525
Merge pull request #13 from Howl404/registration-page
Howl404 Aug 18, 2023
16f1051
refactor: folders, files names
Howl404 Aug 18, 2023
705396c
feat: aliases, move interface
Howl404 Aug 18, 2023
f3d5cd3
fix: working show button
Howl404 Aug 18, 2023
de39d43
refactor: move interface
Howl404 Aug 18, 2023
077bb6e
feat: cookies after login, error handler, save tokens
Howl404 Aug 18, 2023
464114c
feat: add aliases
Howl404 Aug 18, 2023
80c4b25
feat: responsive, move same styles to components
Howl404 Aug 18, 2023
bddbf7a
feat: add favicon, change title
Howl404 Aug 20, 2023
74a02de
Merge pull request #14 from Howl404/release/cookies-errors-refactor
Howl404 Aug 20, 2023
7e8f92c
feat: errors next to input, required symbol in label, checkbox instea…
Howl404 Aug 20, 2023
dd8e9e9
feat: add adaptive header and add burger menu
AcademeG1 Aug 21, 2023
b3261b1
Merge pull request #15 from Howl404/release/login-errors-display
Howl404 Aug 21, 2023
1aec22a
feat: add buttons to pages on home page
Howl404 Aug 21, 2023
dcac08a
feat: add change header depending on authorization
AcademeG1 Aug 21, 2023
a6f7955
refactor: header file name
Howl404 Aug 21, 2023
92672e0
fix: route in home after log out
AcademeG1 Aug 21, 2023
65ea5c4
Merge branch 'release/create-header-burger' of https://github.com/How…
AcademeG1 Aug 21, 2023
311dec6
Merge pull request #17 from Howl404/release/main-navigation
Howl404 Aug 21, 2023
c539853
Merge branch 'release/login-registration-main' into release/create-he…
AcademeG1 Aug 21, 2023
eaaa5ef
Merge pull request #16 from Howl404/release/create-header-burger
AcademeG1 Aug 21, 2023
6aca337
fix: header profile infinite requests
Howl404 Aug 21, 2023
331c9c7
fix: pattern console error
Howl404 Aug 21, 2023
db117f7
Merge pull request #18 from Howl404/release/fix
Howl404 Aug 21, 2023
af11064
feat: message after account creation
Howl404 Aug 21, 2023
fa4e40f
feat: errors if trying to access login\register while authorized
Howl404 Aug 21, 2023
f7f4ec4
Merge pull request #19 from Howl404/release/messages-to-user
capapa Aug 21, 2023
173f869
Merge pull request #20 from Howl404/release/login-registration-main
Howl404 Aug 21, 2023
c2504ae
fix: correct date
Howl404 Aug 23, 2023
a8efd5f
fix: ignore space
Howl404 Aug 23, 2023
846adab
Merge pull request #22 from Howl404/release/space-fix
Howl404 Aug 23, 2023
5cc05ef
Merge pull request #21 from Howl404/release/date-fix
Howl404 Aug 23, 2023
c172cb6
feat: configure jest, install npm packages, test for ButtonsAccount
Howl404 Aug 23, 2023
adce5f3
feat: script for running jest with coverage mode
Howl404 Aug 23, 2023
ef95ff0
feat: form input test, mock for style import
Howl404 Aug 23, 2023
c0a9373
feat: test for form errors components
Howl404 Aug 24, 2023
3e5117f
feat: jest aliases, registration page basic test
Howl404 Aug 24, 2023
a6818e4
feat: assets mock, header test
Howl404 Aug 24, 2023
a74ef62
feat: include ts files in coverage
Howl404 Aug 24, 2023
b45a8b8
feat: add test form address
capapa Aug 25, 2023
58e233f
feat: add test for SignInForm component, toggles pasword visibility
AcademeG1 Aug 25, 2023
b617da1
feat: add test block spacebar key on email and password input fileds …
AcademeG1 Aug 25, 2023
3e9c0bd
Merge branch 'release/tests' of https://github.com/Howl404/eCommerce-…
AcademeG1 Aug 25, 2023
0983da5
feat: add test renders properly for Home component
AcademeG1 Aug 25, 2023
3e51fda
feat: add test navigates to /login and /register on buttons clicks fo…
AcademeG1 Aug 25, 2023
2c14b6e
feat: add test renders LoginForm component for LoginPage
AcademeG1 Aug 25, 2023
5a5a077
feat: add test render NotFound component without crashing for NotFoun…
AcademeG1 Aug 25, 2023
27bc814
feat: add test displays "404" text for NotFound page
AcademeG1 Aug 25, 2023
b8c9cca
feat: add test displays "Page not found" text for NotFound page
AcademeG1 Aug 25, 2023
71b13c9
feat: add test displays "Home" button for NotFound page
AcademeG1 Aug 25, 2023
7110f3f
feat: add tests for authservice
AcademeG1 Aug 25, 2023
039c024
refactor: change path for Header component in app.tsx
AcademeG1 Aug 25, 2023
2380e5e
refactor: delete comments
Howl404 Aug 25, 2023
912e703
Merge pull request #23 from Howl404/release/tests
capapa Aug 26, 2023
8fb0963
Merge pull request #24 from Howl404/release/login-registration-main
Howl404 Aug 26, 2023
69c78a4
feat: fetch products and display them, routing for catalog page
Howl404 Aug 26, 2023
cda0c82
feat: display discounted price
Howl404 Aug 26, 2023
6ef3244
feat: routing for user profile, fetch user data and display them on p…
AcademeG1 Aug 27, 2023
5320434
fix: fix the output of the address
AcademeG1 Aug 27, 2023
bb5207e
feat: change styles
Howl404 Aug 28, 2023
5807136
feat: add routing account pages, add page account information and sty…
AcademeG1 Aug 28, 2023
c8fa9f7
feat: add address book page and control icon buttons
AcademeG1 Aug 28, 2023
fe4c326
feat: add a popup for update addresses and sent requests with an addr…
AcademeG1 Aug 28, 2023
f827883
feat: robust filter by category, interfaces, styles
Howl404 Aug 29, 2023
10748ad
feat: price range, filter by price
Howl404 Aug 29, 2023
135f4cd
feat: add modal for change password and email, add connect to API and…
AcademeG1 Aug 29, 2023
013f805
feat: filter by brand, sort
Howl404 Aug 29, 2023
9d2a868
feat: get category be slug in url
Howl404 Aug 30, 2023
af83678
feat: breadcrumb, navigation bar
Howl404 Aug 31, 2023
e44908e
feat: categorycard tests
Howl404 Aug 31, 2023
e541418
feat: breadcrumb test
Howl404 Aug 31, 2023
f12b9a0
feat: price range tests
Howl404 Aug 31, 2023
2c7b885
feat: product card test
Howl404 Sep 1, 2023
90b9e8e
feat: responsive, lint to product page, search
Howl404 Sep 2, 2023
78a2b1f
fix: error in test
Howl404 Sep 2, 2023
18e2f67
feat: sorting and api tests
Howl404 Sep 2, 2023
2a003de
feat: categories closed by default
Howl404 Sep 3, 2023
2a3e60e
fix: return profile scope
Howl404 Sep 3, 2023
506a6b9
feat: get token to see products\categories if it do not exist, get it…
Howl404 Sep 3, 2023
4b5eed3
fix: disable cart creation, change test
Howl404 Sep 3, 2023
5fbbf44
fix: unnecessary import
Howl404 Sep 3, 2023
69a7238
feat: change to key
Howl404 Sep 3, 2023
08b8804
refactor: rename catalog product card
Howl404 Sep 3, 2023
7bd2541
feat: add default billing address, add error and request
AcademeG1 Sep 3, 2023
8abac9f
feat: add product page
capapa Sep 4, 2023
406d566
Merge pull request #26 from Howl404/release/access-token
Howl404 Sep 4, 2023
9f76afa
feat: add description to productPage
capapa Sep 4, 2023
20739cd
feat: add checkbox for set default address and fix bug
AcademeG1 Sep 4, 2023
569f040
feat: check for valid input before saving address
Howl404 Sep 4, 2023
b1cc5f5
feat: add swiper
capapa Sep 4, 2023
0b6ace2
feat: check before adding new address
Howl404 Sep 4, 2023
d8b0020
feat: add modal img
capapa Sep 4, 2023
3df0a36
feat: check before changing account information, email\password
Howl404 Sep 4, 2023
0de59ca
Merge pull request #25 from Howl404/release/catalog-page
Howl404 Sep 4, 2023
bb0595d
feat: add format price
capapa Sep 4, 2023
326da03
fix: test error
Howl404 Sep 4, 2023
c222b51
Merge branch 'release/catalog-product-profile' into release/header-us…
Howl404 Sep 4, 2023
a487a11
Merge pull request #27 from Howl404/release/header-users-access-profile
Howl404 Sep 4, 2023
4f224f0
feat: add responsive
capapa Sep 4, 2023
ab28125
fix: lint errors
Howl404 Sep 4, 2023
06ef987
feat: add responsive
capapa Sep 4, 2023
b7f8312
feat: del comment
capapa Sep 4, 2023
7db43bb
Merge branch 'release/catalog-product-profile' into release/product-page
Howl404 Sep 4, 2023
a3d5972
feat: fix mistakes after merge
Howl404 Sep 4, 2023
f53d73a
feat: change interface name
Howl404 Sep 4, 2023
b0620ed
fix: error empty discount
capapa Sep 4, 2023
66539b5
fix: error empty discount
capapa Sep 4, 2023
4d43ee3
fix: return product catalog
Howl404 Sep 4, 2023
0d5f9a5
Merge pull request #29 from Howl404/release/product-page
Howl404 Sep 4, 2023
9a50a47
Merge branch 'release/catalog-product-profile' into release/lint-errors
Howl404 Sep 4, 2023
d75420e
Merge pull request #28 from Howl404/release/lint-errors
Howl404 Sep 4, 2023
17a3132
fix: fix add addresses and update page
AcademeG1 Sep 5, 2023
6d66ef6
fix: fix add addresses and update page
AcademeG1 Sep 5, 2023
7956ea7
feat: fix forms
Howl404 Sep 5, 2023
696d2d0
fix: discount price
capapa Sep 5, 2023
a8cd509
feat: sync two swipers
Howl404 Sep 5, 2023
6cda6ee
fix: disable scroll with open modal, disable search in header
Howl404 Sep 6, 2023
4af18c3
feat: responsive
Howl404 Sep 6, 2023
ec28162
Merge pull request #31 from Howl404/release/product-page
Howl404 Sep 7, 2023
931893a
fix: addresses in profile and field in information account
AcademeG1 Sep 7, 2023
e01fb06
Merge branch 'release/catalog-product-profile' into release/header-us…
AcademeG1 Sep 7, 2023
a99686f
fix: delete unnecessary code, fix imports
Howl404 Sep 7, 2023
2fbc3a0
Merge pull request #32 from Howl404/release/header-users-access-profile
Howl404 Sep 7, 2023
a55d953
Merge pull request #30 from Howl404/release/catalog-product-profile
Howl404 Sep 7, 2023
246d08e
Update README.md
Howl404 Oct 27, 2023
b70fb6a
Sprint 4: Basket Page, Catalog Page Enhancements, and About Us Page I…
Howl404 Oct 27, 2023
8340273
Update README.md
Howl404 Oct 27, 2023
852b1ca
Update README.md
Howl404 Oct 27, 2023
035731d
Update README.md
Howl404 Dec 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module.exports = {
root: true,
env: { browser: true, es2021: true },
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs', 'vite.config.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['react', '@typescript-eslint', 'prettier'],
rules: {
'class-methods-use-this': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/array-type': ['error', { default: 'array' }],
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'explicit',
overrides: {
accessors: 'explicit',
constructors: 'no-public',
methods: 'explicit',
properties: 'explicit',
parameterProperties: 'explicit',
},
},
],
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-inferrable-types': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
},
};
32 changes: 32 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#### Description 📑

###### Please include a summary of the changes.

#### Related task 🔍

ID of the task: #TASK_NUMBER - SUBTASK_NUMBER

Link to the task: (Optional)

###### If you have completed the task in one PR, don't include the subtask number

#### Reason for change

###### Please include a reason for changes.

###### If changes related to the task, ignore this.


#### Type of change ❔

- [ ] New feature
- [ ] Bug fix
- [ ] Refactoring
- [ ] Other

#### Checklist ✅

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] My changes generate no new warnings
- [ ] New and existing unit tests pass locally with my changes
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm run format
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.md
*.json
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"tabWidth": 2,
"trailingComma": "all",
"singleQuote": true,
"useTabs": false,
"printWidth": 120
}
63 changes: 61 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,61 @@
# eCommerce-Application
RS School eCommerce project
# Project "Tech Hub"
RS School eCommerce project - is a team task in which the team needs to develop an eCommerce application.

## Deploy - https://techhub-rss.netlify.app/ (till January 27 2024)

### Project description
It's a web application that allows users to browse, select, add to basket and buy various digital appliances. The main goal of the project is to learn how to use frontend technologies and provide a convenient platform for buying products.

### Project goals
#### Main goals of the project are:
* Register and login systems
* User-friendly interface for browsing and selecting products
* Filter product by characteristics and categories
* Cart and promocodes
* Detailed page of every product


### Technology stack
1. Frontend:
* HTML/CSS/TypeScript
* React - for user interface creation
* Axios - for HTTP request to the server
2. Backend:
* commercetools
3. Additional instruments and technologies:
* Vite - project builder
* SASS - CSS framework with additional features
* Prettier - automatic code formatting to a single style
* ESLint - detecting errors and enforcing a consistent code style
* Jest - code testing
* Husky - running certain scripts before commits/pushes
* Git - for version control and project repository management
* GitHub - for hosting the repository
* VS Code - code editor

### Project team
* [Howl](https://github.com/Howl404)
* [Mikhail Ignatovich](https://github.com/academeg1)
* [Rashit Safiev](https://github.com/capapa)

### Scripts for running ESLint, Prettier, Jest, and initializing Husky:
* ESLint - npm run lint to check the code, npm run lint:fix will automatically fix possible errors after the check
* Prettier - npm run format for automatic formatting of the entire codebase
* Jest - npm run test to run tests, npm run test:watch runs tests in watch mode, allowing interaction with Jest and restarting tests on code changes
* Husky - npm run prepare to initialize Husky

### Project Installation and Launch
1. Clone the project repository to your computer: git clone https://github.com/Howl404/eCommerce-Application.git

2. Install project dependencies with the command: npm install

3. To run the application, execute the command: npm run dev

### Project build
1. Perform steps 1 and 2 from [Project Installation and Launch](#project-installation-and-launch)

2. Build the project with the command: npm run build

3. Use npm run preview to launch the project

#### Before commits, run the script for [Husky initialization](#scripts-for-running-eslint-prettier-jest-and-initializing-husky)
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./src/assets/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tech Hub</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./src/main.tsx"></script>
</body>
</html>
23 changes: 23 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(scss|css)$': '<rootDir>/src/styleMock.ts',
'\\.(png|svg)$': '<rootDir>/src/assetsMock.ts',
'^@src/(.*)$': '<rootDir>/src/$1',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@pages/(.*)$': '<rootDir>/src/pages/$1',
'^@services/(.*)$': '<rootDir>/src/services/$1',
'^@interfaces/(.*)$': '<rootDir>/src/interfaces/$1',
'^@assets/(.*)$': '<rootDir>/src/assets/$1',
},
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
testMatch: ['**/__tests__/**/*.(ts|tsx|js)'],
collectCoverageFrom: ['src/**/*.(ts|tsx)'],
};

export {};
Loading