diff --git a/.editorconfig b/.editorconfig
index 3bc2f6f9..6e87a003 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,15 +1,13 @@
-# https://editorconfig.org
+# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
-end_of_line = lf
-indent_size = 2
indent_style = space
+indent_size = 2
insert_final_newline = true
-max_line_length = 80
trim_trailing_whitespace = true
[*.md]
-max_line_length = 0
+max_line_length = off
trim_trailing_whitespace = false
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 00000000..79cb7074
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,3 @@
+node_modules
+
+vite.config.ts
\ No newline at end of file
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index fef5086a..00000000
--- a/.eslintrc
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "parser": "@typescript-eslint/parser",
- "plugins": ["@typescript-eslint"],
- "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
- "parserOptions": { "ecmaVersion": 2018, "sourceType": "module" },
- "rules": {
- "max-len": ["error", { "code": 130 }]
- }
-}
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 00000000..9ca2e830
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,35 @@
+{
+ "root": true,
+ "ignorePatterns": ["**/*"],
+ "plugins": ["@nx"],
+ "overrides": [
+ {
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
+ "rules": {
+ "@nx/enforce-module-boundaries": [
+ "error",
+ {
+ "enforceBuildableLibDependency": true,
+ "allow": [],
+ "depConstraints": [
+ {
+ "sourceTag": "*",
+ "onlyDependOnLibsWithTags": ["*"]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "files": ["*.ts", "*.tsx"],
+ "extends": ["plugin:@nx/typescript"],
+ "rules": {}
+ },
+ {
+ "files": ["*.js", "*.jsx"],
+ "extends": ["plugin:@nx/javascript"],
+ "rules": {}
+ }
+ ]
+}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index 3b08475a..00000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: Build
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
- workflow_dispatch:
-
-jobs:
- build:
- name: Build
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Setup Node
- uses: actions/setup-node@v3
- with:
- node-version: 16.x
- registry-url: https://registry.npmjs.org/
-
- - name: Cache Node Modules
- uses: actions/cache@v3
- with:
- path: node_modules
- key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-node-
-
- - name: Install NPM Dependencies
- run: npm install && npm run install:all
-
- - name: Build solution
- if: always()
- run: npm run build:all
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..64ac636f
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,29 @@
+name: CI
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+
+jobs:
+ main:
+ name: Continuous Integration (CI)
+ runs-on: ubuntu-latest
+ permissions:
+ contents: 'read'
+ actions: 'read'
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - uses: nrwl/nx-set-shas@v3
+ with:
+ main-branch-name: 'master'
+
+ - run: npm ci
+
+ - run: npx nx format:check
+ - run: npx nx affected -t lint --parallel=3
+ - run: npx nx affected -t test --parallel=3
+ - run: npx nx affected -t build --parallel=3
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
deleted file mode 100644
index 150bf0cd..00000000
--- a/.github/workflows/codeql.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
-name: 'CodeQL'
-
-on:
- push:
- branches: ['master']
- pull_request:
- # The branches below must be a subset of the branches above
- branches: ['master']
- schedule:
- - cron: '31 11 * * 0'
-
-jobs:
- analyze:
- name: Analyze
- runs-on: ubuntu-latest
- permissions:
- actions: read
- contents: read
- security-events: write
-
- strategy:
- fail-fast: false
- matrix:
- language: ['javascript']
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
-
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
- # queries: security-extended,security-and-quality
-
- # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
-
- # âšī¸ Command-line programs to run using the OS shell.
- # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
-
- # If the Autobuild fails above, remove it and uncomment the following three lines.
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
-
- # - run: |
- # echo "Run, Build Application using script"
- # ./location_of_script_within_repo/buildscript.sh
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
- with:
- category: '/language:${{matrix.language}}'
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index da312675..f54ae807 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -5,74 +5,33 @@ on:
branches:
- master
workflow_dispatch:
+ workflow_run:
+ workflows: [CI]
+ types:
+ - completed
env:
REGISTRY: ghcr.io
- IMAGE_NAME_BACKEND: ${{ github.repository }}/backend
- IMAGE_NAME_FRONTEND: ${{ github.repository }}/frontend
+ NX_AFFECTED: true
+ NX_AFFECTED_BASE: origin/master
jobs:
- backend-deployment:
- name: Build and publish backend image
+ affected-deployment:
+ name: Build and publish affected images
runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
-
+ permissions: 'write-all'
steps:
- name: Checkout repository
- uses: actions/checkout@v3
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v1
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
-
- - name: Log in to the Container registry
- uses: docker/login-action@v1
+ uses: actions/checkout@v4
with:
- registry: ${{ env.REGISTRY }}
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
+ fetch-depth: 0
- - name: Install npm dependencies
- run: npm ci
-
- - name: Extract metadata (tags, labels) for Docker
- id: meta
- uses: docker/metadata-action@v1
+ - uses: nrwl/nx-set-shas@v3
with:
- images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_BACKEND }}
+ main-branch-name: 'master'
- - name: Build and push Docker image
- uses: docker/build-push-action@v2
- with:
- context: ./apps/backend
- file: ./apps/backend/Dockerfile
- platforms: linux/amd64,linux/arm64
- push: true
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
- cache-from: type=gha
- cache-to: type=gha,mode=max
-
- frontend-deployment:
- name: Build and publish frontend image
- runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v1
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
+ - name: Install dependencies
+ run: npm ci
- name: Log in to the Container registry
uses: docker/login-action@v1
@@ -81,23 +40,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- - name: Extract metadata (tags, labels) for Docker
- id: meta
- uses: docker/metadata-action@v1
- with:
- images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_FRONTEND }}
-
- - name: Build and push Docker image
- uses: docker/build-push-action@v2
- with:
- context: ./apps/frontend
- file: ./apps/frontend/Dockerfile.prod
- platforms: linux/amd64,linux/arm64
- push: true
- build-args: |
- API_DOMAIN=${{ secrets.API_DOMAIN }}
- DOMAIN=${{ secrets.DOMAIN }}
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
- cache-from: type=gha
- cache-to: type=gha,mode=max
+ - name: Build & Push Affected Images to Registry
+ id: deploy-images-to-registry
+ run: |
+ npx nx affected -t "push-image-to-registry" --repository=${{ github.repository }} --github-sha="$GITHUB_SHA"
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
deleted file mode 100644
index 9dc3ad14..00000000
--- a/.github/workflows/lint.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: Lint
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
- workflow_dispatch:
-
-jobs:
- lint:
- name: Lint
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Setup Node
- uses: actions/setup-node@v3
- with:
- node-version: 16.x
- registry-url: https://registry.npmjs.org/
-
- - name: Cache Node Modules
- uses: actions/cache@v3
- with:
- path: node_modules
- key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-node-
-
- - name: Install NPM Dependencies
- run: npm install && npm run install:all
-
- - name: Prettier Check
- if: always()
- run: npm run fmt.check
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
deleted file mode 100644
index f46d5a5f..00000000
--- a/.github/workflows/test.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: Test
-
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
- workflow_dispatch:
-
-jobs:
- test:
- name: Test
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Setup Node
- uses: actions/setup-node@v3
- with:
- node-version: 16.x
- registry-url: https://registry.npmjs.org/
-
- - name: Cache Node Modules
- uses: actions/cache@v3
- with:
- path: node_modules
- key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-node-
-
- - name: Install NPM Dependencies
- run: npm install && npm run install:all
-
- - name: Run tests
- if: always()
- run: npm run test:all
diff --git a/.gitignore b/.gitignore
index 343a08b9..abc3bc8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,21 +1,42 @@
-# Coverage reports
-coverage
+# See http://help.github.com/ignore-files/ for more about ignoring files.
-# API keys and secrets
+# Secrets
.env
-# Dependency directory
+# compiled output
+dist
+tmp
+/out-tsc
+
+# dependencies
node_modules
-bower_components
-# Editors
-.idea
-*.iml
-.vscode
+# IDEs and editors
+/.idea
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# IDE - VSCode
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
-# OS metadata
+# misc
+/.sass-cache
+/connect.lock
+/coverage
+/libpeerconnection.log
+npm-debug.log
+yarn-error.log
+testem.log
+/typings
+
+# System Files
.DS_Store
Thumbs.db
-
-# Ignore built ts files
-dist/
\ No newline at end of file
diff --git a/.husky/pre-commit b/.husky/pre-commit
deleted file mode 100644
index ca7c756b..00000000
--- a/.husky/pre-commit
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env sh
-. "$(dirname -- "$0")/_/husky.sh"
-
-npx --no-install lint-staged
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
index acbb6895..9481e77e 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,10 +1,3 @@
-# Files Prettier should not format
-**/*.log
-**/.DS_Store
-*.
-**/dist
-**/node_modules
-
-# Ignore all build directories on frontend
-apps/frontend/server
-
+# Add files here to ignore them from prettier formatting
+/dist
+/coverage
\ No newline at end of file
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..d5e772e4
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,4 @@
+{
+ "singleQuote": true,
+ "printWidth": 140
+}
diff --git a/.prettierrc.json b/.prettierrc.json
deleted file mode 100644
index 1ed22e40..00000000
--- a/.prettierrc.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "trailingComma": "es5",
- "tabWidth": 2,
- "semi": true,
- "singleQuote": true,
- "useTabs": false,
- "printWidth": 130
-}
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 00000000..6a302fe5
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,8 @@
+{
+ "recommendations": [
+ "nrwl.angular-console",
+ "esbenp.prettier-vscode",
+ "dbaeumer.vscode-eslint",
+ "firsttris.vscode-jest-runner"
+ ]
+}
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index f3d3c5da..00000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-We as members, contributors, and leaders pledge to make participation in our
-community a harassment-free experience for everyone, regardless of age, body
-size, visible or invisible disability, ethnicity, sex characteristics, gender
-identity and expression, level of experience, education, socio-economic status,
-nationality, personal appearance, race, religion, or sexual identity
-and orientation.
-
-We pledge to act and interact in ways that contribute to an open, welcoming,
-diverse, inclusive, and healthy community.
-
-## Our Standards
-
-Examples of behavior that contributes to a positive environment for our
-community include:
-
-- Demonstrating empathy and kindness toward other people
-- Being respectful of differing opinions, viewpoints, and experiences
-- Giving and gracefully accepting constructive feedback
-- Accepting responsibility and apologizing to those affected by our mistakes,
- and learning from the experience
-- Focusing on what is best not just for us as individuals, but for the
- overall community
-
-Examples of unacceptable behavior include:
-
-- The use of sexualized language or imagery, and sexual attention or
- advances of any kind
-- Trolling, insulting or derogatory comments, and personal or political attacks
-- Public or private harassment
-- Publishing others' private information, such as a physical or email
- address, without their explicit permission
-- Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Enforcement Responsibilities
-
-Community leaders are responsible for clarifying and enforcing our standards of
-acceptable behavior and will take appropriate and fair corrective action in
-response to any behavior that they deem inappropriate, threatening, offensive,
-or harmful.
-
-Community leaders have the right and responsibility to remove, edit, or reject
-comments, commits, code, wiki edits, issues, and other contributions that are
-not aligned to this Code of Conduct, and will communicate reasons for moderation
-decisions when appropriate.
-
-## Scope
-
-This Code of Conduct applies within all community spaces, and also applies when
-an individual is officially representing the community in public spaces.
-Examples of representing our community include using an official e-mail address,
-posting via an official social media account, or acting as an appointed
-representative at an online or offline event.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported to the community leaders responsible for enforcement.
-All complaints will be reviewed and investigated promptly and fairly.
-
-All community leaders are obligated to respect the privacy and security of the
-reporter of any incident.
-
-## Enforcement Guidelines
-
-Community leaders will follow these Community Impact Guidelines in determining
-the consequences for any action they deem in violation of this Code of Conduct:
-
-### 1. Correction
-
-**Community Impact**: Use of inappropriate language or other behavior deemed
-unprofessional or unwelcome in the community.
-
-**Consequence**: A private, written warning from community leaders, providing
-clarity around the nature of the violation and an explanation of why the
-behavior was inappropriate. A public apology may be requested.
-
-### 2. Warning
-
-**Community Impact**: A violation through a single incident or series
-of actions.
-
-**Consequence**: A warning with consequences for continued behavior. No
-interaction with the people involved, including unsolicited interaction with
-those enforcing the Code of Conduct, for a specified period of time. This
-includes avoiding interactions in community spaces as well as external channels
-like social media. Violating these terms may lead to a temporary or
-permanent ban.
-
-### 3. Temporary Ban
-
-**Community Impact**: A serious violation of community standards, including
-sustained inappropriate behavior.
-
-**Consequence**: A temporary ban from any sort of interaction or public
-communication with the community for a specified period of time. No public or
-private interaction with the people involved, including unsolicited interaction
-with those enforcing the Code of Conduct, is allowed during this period.
-Violating these terms may lead to a permanent ban.
-
-### 4. Permanent Ban
-
-**Community Impact**: Demonstrating a pattern of violation of community
-standards, including sustained inappropriate behavior, harassment of an
-individual, or aggression toward or disparagement of classes of individuals.
-
-**Consequence**: A permanent ban from any sort of public interaction within
-the community.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage],
-version 2.1, available at
-[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
-
-Community Impact Guidelines were inspired by
-[Mozilla's code of conduct enforcement ladder][mozilla coc].
-
-For answers to common questions about this code of conduct, see the FAQ at
-[https://www.contributor-covenant.org/faq][faq]. Translations are available at
-[https://www.contributor-covenant.org/translations][translations].
-
-[homepage]: https://www.contributor-covenant.org
-[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
-[mozilla coc]: https://github.com/mozilla/diversity
-[faq]: https://www.contributor-covenant.org/faq
-[translations]: https://www.contributor-covenant.org/translations
diff --git a/CONTRIBUTING.MD b/CONTRIBUTING.MD
deleted file mode 100644
index 98473f27..00000000
--- a/CONTRIBUTING.MD
+++ /dev/null
@@ -1,104 +0,0 @@
-# Contributing Guidelines
-
-## Opening an issue:
-
-Thank you for taking the time to open an issue.
-
-Before opening an issue, please be sure that your issue hasn't already been asked by someone.
-
-Here are a few things that will help us resolve your issues:
-
-- A descriptive title that gives an idea of what your issue refers to
-- A thorough description of the issue, (one word descriptions are very hard to understand)
-- Screenshots (if appropriate)
-- Links (if appropriate)
-