Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d9393d3
feat: add folder structure (#2)
maria-akulova May 2, 2024
1ba5324
Dt 32 create project commerce tools (#5)
comtvset May 2, 2024
72e15e0
DT-88 / init project (#4)
maria-akulova May 2, 2024
7ddd3fd
DT-30 / add PR template (#3)
maria-akulova May 2, 2024
6abbb12
DT-57 add eslint script (#11)
maria-akulova May 3, 2024
251f795
DT-51 add type scrypt (#7)
maria-akulova May 3, 2024
671e88d
DT-54 add husky (#10)
maria-akulova May 3, 2024
d84932c
DT-53 add prettier (#9)
maria-akulova May 3, 2024
e01f852
DT-52 add eslint (#8)
maria-akulova May 3, 2024
964f6ea
DT-50_setupVite (#6)
maria-akulova May 3, 2024
f184a5a
DT-79 add detailed description how to run project (#16)
maria-akulova May 4, 2024
5dad12b
DT-90_huskyScript (#13)
maria-akulova May 4, 2024
62d444a
DT-58 add script prettier (#12)
maria-akulova May 4, 2024
f1311d2
DT-78 describe all availabe scripts (#14)
maria-akulova May 4, 2024
30ee139
DT-77 add comprehensive description (#15)
maria-akulova May 4, 2024
3a93fcd
DT-91 fix trailing comma (#17)
maria-akulova May 6, 2024
43c6ea4
DT-92 add .gitignore file (#18)
comtvset May 6, 2024
3fac6c1
DT-55 Install and configure Vitest and add 1 file of test (#19)
comtvset May 6, 2024
fbf6f5f
Merge branch 'main' into develop
comtvset May 7, 2024
495c3c8
DT-60 add script run test (#20)
comtvset May 7, 2024
412f9b6
Dt 94 eslint failed (#22)
maria-akulova May 8, 2024
917e419
DT-111 rss validation registration form (#27)
maria-akulova May 15, 2024
9ab38fa
Sprint 2 (#26)
comtvset May 23, 2024
edd5d9b
Sprint 3 (#78)
comtvset Jun 7, 2024
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
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**/node_modules/*
node_modules/

dist/
build/
out//**/node_modules/*
node_modules/

dist/
build/
out/
**/*.cjs
!**/*.ts
113 changes: 113 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:prettier/recommended',
'airbnb',
'plugin:react/jsx-runtime',
],
ignorePatterns: ['dist', 'node_modules', 'build', 'public', 'assets'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'react-refresh',
'@typescript-eslint',
'unused-imports',
'simple-import-sort',
'prettier',
'unicorn',
'@stylistic/eslint-plugin-js',
'react',
'react-hooks',
],
rules: {
'@typescript-eslint/no-floating-promises': [
'error',
{
ignoreIIFE: true,
},
],
eqeqeq: 'error',
'operator-linebreak': ['error', 'after', { overrides: { '?': 'before', ':': 'before' } }],
'no-console': 'warn',
'no-undef': 'off',
'no-unused-vars': 'off',
'no-shadow': 'off',
'implicit-arrow-linebreak': 'off',
'arrow-body-style': 'off',
'object-curly-newline': [
'error',
{
ObjectExpression: { consistent: true, multiline: true },
ObjectPattern: { consistent: true, multiline: true },
ImportDeclaration: { consistent: true, multiline: true },
ExportDeclaration: { consistent: true, multiline: true },
},
],
'import/prefer-default-export': 'off',
'import/no-unresolved': 'error',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
'prettier/prettier': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/no-shadow': ['error'],

'react/jsx-filename-extension': [1, { extensions: ['.js', '.ts', '.tsx', '.jsx'] }],
'react/jsx-one-expression-per-line': [1, { allow: 'single-child' }],
'react/display-name': 'off',
'react/react-in-jsx-scope': 'off',
'react/require-default-props': [1, { ignoreFunctionalComponents: true }],
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'react-refresh/only-export-components': [
'warn',
{
allowConstantExport: true,
},
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'jsx-a11y/label-has-associated-control': [
2,
{
labelComponents: ['CustomInputLabel'],
labelAttributes: ['label'],
controlComponents: ['CustomInput'],
depth: 3,
},
],
},
settings: {
'import/resolver': {
typescript: {},
},
},
noInlineConfig: true,
};
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1. Acceptance criteria:

-
-

2. Screenshot (not technical tasks):

3. Comments
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,10 @@ dist
# TernJS port file
.tern-port
.DS_Store

# do not track package-lock.json file
package-lock.json

# Vite

.vite
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
npm run format
npm run ci:format

2 changes: 2 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm run lint
npm test
4 changes: 4 additions & 0 deletions .lintstagedrs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{json,tsx,ts,html}": ["prettier --write --ignore-unknown"],
"*.{tsx,ts}": ["eslint --quiet --fix"]
}
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Add files here to ignore them from prettier formatting
/dist
node_modules
**/*.mp3
**/*.jpg
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trailingComma: 'all'
tabWidth: 2
semi: true
singleQuote: true
printWidth: 100
179 changes: 178 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,178 @@
# eCommerce-Application
# eCommerce-Application

It's a comprehensive online shopping portal that provides an interactive and seamless experience to users. From product discovery to checkout, the application ensures a smooth journey for the user, enhancing their engagement and boosting their purchasing confidence

## Goals

1. Sell products via site

2. RSS students demonstrate acquired knowledge and ability to work in a team.

## Pages

1. Login and Registration pages 🖥️
2. Main page 🏠
3. Catalog Product page 📋
4. Detailed Product page 🔎
5. User Profile page 👤
6. Basket page 🛒
7. About Us page 🙋‍♂️🙋‍♀️

## Technology Stack

0. TypeScript
1. React
2. Vite
3. Loadash
4. AntDesign
5. SCSS
6. HTML
7. CSS
8. 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.
9. Linters: ESLint, Prettier, airbnb rules
10. Husky
11. git
12. Jest

## Organization

0. Agile / Scrum
1. Jira (Board, Dashboard, Releases, Sprint, Poker Planning, Automation)
2. Confluence (Knowledge Base, MoMs, Agreements, Roles and Responsibilities etc..)
3. GitHub (Pull Request, workflow, Review)

## Design

This is a [link](https://www.figma.com/design/vjzFNPME7k3at8mZA0J1AR/Cozy-House?node-id=0%3A1&t=pkImd2amNwJgTpT2-1) to our project design.

## Setup project locally

1. Install Node.js version >= 20.0.0
2. Clone this [repository](https://github.com/comtvset/eCommerce-Application)
3. Go to the root of project
4. To install all dependencies run code

```
npm i
```

5. Run project in browser locally

```
npm run dev
```

# Scripts:

The project has a few scripts for working with different tools. The common rules how to use them.

1. Open package.json
2. Find section '_scripts_'
3. Select the tool you want to apply
4. Open terminal and run command like: npm run ...

Example:

```
// run Eslint
npm run lint
```

## List of scripts

### dev

to run the whole project in browser using development mode

Example:

```
npm run dev
```

### build

to create deployment build for production

Example:

```
npm run build
```

### preview

previewing the build locally

Example:

```
npm run preview
```

### prepare

automatically added by _husky init_ command to prevent fail

Example:

```
npm run prepare
```

### lint

start check of code quality with additional params. At the end you can find list of errors/warning in the terminal:

--cache - check only changed files

--ext - check only file with specified extensions

--report-unused-disable-directives
This option causes ESLint to report directive comments like // eslint-disable-line when no errors would have been reported on that line anyway.

--max-warnings - Number of warnings to trigger nonzero exit code

Example:

```
npm run lint
```

### format

start check of code quality with additional params. At the end you can find list of errors/warning in the terminal:

--cache - check only changed files

--write - format a certain file

Example:

```
npm run format
```

### ci:format

start check of code quality with additional params. At the end you can find list of errors/warning in the terminal:

--cache - check only changed files

--write - to format a file in-place

Example:

```
npm run ci:format
```

### test

to run the test

Example:

```
npm run test
```
11 changes: 11 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="src/public/favicon.png" />
<title>Cozy House</title>
</head>
<body></body>
<script type="module" src="./src/index.tsx"></script>
</html>
5 changes: 5 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[[redirects]]
from = "/*"
to = "/index.html"
status = 200

Loading