Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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 .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PORT=3005
DB_HOST=localhost
DB_USER=postgres
DB_PASSWORD=
DB_DATABASE=postgres
CLIENT_HOST=http://localhost:5173
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
JWT_KEY=
JWT_REFRESH_KEY=

File renamed without changes.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ node_modules
# MacOS
.DS_Store

# env files
*.env
.env*
.env

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider ignoring other environment-file variants to avoid accidental commits. For example use a pattern like .env* or explicitly add .env.local, .env.production, .env.test so all env variants are covered.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider ignoring other environment-file variants to avoid accidental commits. For example use a pattern like .env* or explicitly add .env.local, .env.production, .env.test so all env variants are covered.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider ignoring other environment-file variants to avoid accidental commits. For example use a pattern like .env* or explicitly add .env.local, .env.production, .env.test so all env variants are covered.

2 changes: 2 additions & 0 deletions client/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
APP_API_URL=http://127.0.0.1:5000
ESLINT_NO_DEV_ERRORS=true
2 changes: 2 additions & 0 deletions client/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
/node_modules
84 changes: 84 additions & 0 deletions client/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
module.exports = {
env: {
browser: true
},
extends: [
'plugin:react/recommended',
"plugin:react-hooks/recommended",
'plugin:prettier/recommended',
'plugin:cypress/recommended',
],
parserOptions: {
ecmaVersion: "2024",
sourceType: "module",
},
overrides: [
{
'files': ['**/*.spec.jsx'],
'rules': {
'react/jsx-filename-extension': ['off'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You define react/jsx-filename-extension inside the overrides as ['off'] and again later at top-level as [1, {extensions: ['.jsx']}]. This duplicate may be confusing — the last definition wins. If the intent is to disable the rule for test files only, keep the override but use the standard severity format (e.g., 'off' instead of ['off']) and remove or clarify the top-level setting.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You define react/jsx-filename-extension inside the overrides as ['off'] and again later at top-level as [1, {extensions: ['.jsx']}]. This duplicate may be confusing — the last definition wins. If the intent is to disable the rule for test files only, keep the override but use the standard severity format (e.g., 'off' instead of ['off']) and remove or clarify the top-level setting.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You define react/jsx-filename-extension inside the overrides as ['off'] and again later at top-level as [1, {extensions: ['.jsx']}]. This duplicate may be confusing — the last definition wins. If the intent is to disable the rule for test files only, keep the override but use the standard severity format (e.g., 'off' instead of ['off']) and remove or clarify the top-level setting.

}
}
],
plugins: [
'jsx-a11y',
'import',
'react-hooks',
'prettier'
],
rules: {
// JS
'semi': 'off',
'prefer-const': 2,
curly: [2, 'all'],
'max-len': ['error', {
ignoreTemplateLiterals: true,
ignoreComments: true,
}],
'no-redeclare': [2, {builtinGlobals: true}],
'no-console': 2,
'operator-linebreak': 0,
'brace-style': [2, '1tbs'],
'arrow-body-style': 0,
'arrow-parens': 0,
'no-param-reassign': [2, {props: true}],
'padding-line-between-statements': [
2,
{blankLine: 'always', prev: '*', next: 'return'},
{blankLine: 'always', prev: ['const', 'let', 'var'], next: '*'},
{blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var']},
{blankLine: 'always', prev: 'directive', next: '*'},
{blankLine: 'always', prev: 'block-like', next: '*'},
],
'implicit-arrow-linebreak:': 0,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule key is mistyped: it includes a trailing colon in the property name. The intended rule is implicit-arrow-linebreak (without a colon) — with the current key ESLint will not match/apply this rule. Remove the extra colon from the property name.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule key is mistyped: it includes a trailing colon in the property name. The intended rule is implicit-arrow-linebreak (without a colon) — with the current key ESLint will not match/apply this rule. Remove the extra colon from the property name.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule key is mistyped: it includes a trailing colon in the property name. The intended rule is implicit-arrow-linebreak (without a colon) — with the current key ESLint will not match/apply this rule. Remove the extra colon from the property name.


// React
'react/prop-types': 0,
'react/require-default-props': 0,
'import/prefer-default-export': 0,
'standard/no-callback-literal': 0,
'react/jsx-filename-extension': [1, {extensions: ['.jsx']}],
'react/destructuring-assignment': 0,
'react/jsx-props-no-spreading': 0,
'react/state-in-constructor': [2, 'never'],
'react-hooks/rules-of-hooks': 2,
'jsx-a11y/label-has-associated-control': ["error", {
assert: "either",
}],
'jsx-a11y/label-has-for': [2, {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule jsx-a11y/label-has-for is deprecated in newer versions of eslint-plugin-jsx-a11y in favor of label-has-associated-control. Consider removing or replacing this deprecated rule to avoid plugin warnings/errors.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule jsx-a11y/label-has-for is deprecated in newer versions of eslint-plugin-jsx-a11y in favor of label-has-associated-control. Consider removing or replacing this deprecated rule to avoid plugin warnings/errors.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule jsx-a11y/label-has-for is deprecated in newer versions of eslint-plugin-jsx-a11y in favor of label-has-associated-control. Consider removing or replacing this deprecated rule to avoid plugin warnings/errors.

components: ['Label'],
required: {
some: ['id', 'nesting'],
},
allowChildren: true,
}],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off'
},
ignorePatterns: ['dist', '.eslintrc.cjs', 'vite.config.ts', 'src/vite-env.d.ts', 'cypress'],
settings: {
react: {
version: 'detect',
},
},
};
10 changes: 10 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.idea

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These patterns have a leading space ( .idea) so Git will treat the space as part of the filename and the actual .idea directory will not be ignored. Remove the leading space so the entry is .idea.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These patterns have a leading space ( .idea) so Git will treat the space as part of the filename and the actual .idea directory will not be ignored. Remove the leading space so the entry is .idea.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These patterns have a leading space ( .idea) so Git will treat the space as part of the filename and the actual .idea directory will not be ignored. Remove the leading space so the entry is .idea.

.vscode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as line 1: leading space before .vscode prevents correct matching. Remove the leading space so the entry is .vscode.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as line 1: leading space before .vscode prevents correct matching. Remove the leading space so the entry is .vscode.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as line 1: leading space before .vscode prevents correct matching. Remove the leading space so the entry is .vscode.

build

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before build — remove the space so build is ignored as intended.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before build — remove the space so build is ignored as intended.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before build — remove the space so build is ignored as intended.

dist

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before dist — remove the space so dist is ignored as intended.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before dist — remove the space so dist is ignored as intended.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before dist — remove the space so dist is ignored as intended.

node_modules

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before node_modules — remove the space so node_modules is ignored (this is important to avoid committing dependencies).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before node_modules — remove the space so node_modules is ignored (this is important to avoid committing dependencies).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before node_modules — remove the space so node_modules is ignored (this is important to avoid committing dependencies).

.DS_Store

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before .DS_Store — remove the space so .DS_Store files are ignored on macOS.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before .DS_Store — remove the space so .DS_Store files are ignored on macOS.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leading space before .DS_Store — remove the space so .DS_Store files are ignored on macOS.


npm-debug.log*
yarn-debug.log*
yarn-error.log*
2 changes: 2 additions & 0 deletions client/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/build
11 changes: 11 additions & 0 deletions client/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"arrowParens": "avoid",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"jsxSingleQuote": false,
"printWidth": 80,
"semi": true,
"bracketSpacing": true,
"bracketSameLine": false
}
1 change: 1 addition & 0 deletions client/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
4 changes: 4 additions & 0 deletions client/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: "@mate-academy/stylelint-config",
rules: {}
};
12 changes: 12 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Login App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
Loading
Loading