diff --git a/.dockerignore b/.dockerignore
index 6492e7b9..cf09adce 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,5 +1,5 @@
#
-# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
diff --git a/.eslintrc.json b/.eslintrc.json
index 360245e4..9568e048 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,8 +1,112 @@
{
- "extends": ["next/core-web-vitals", "prettier"],
- "plugins": ["prettier"],
- "ignorePatterns": ["**/dist/*.js", "/docs/**", "/out/**"],
+ "plugins": ["prettier", "@typescript-eslint", "import"],
+ "parserOptions": {
+ "project": "./tsconfig.json"
+ },
+ "parser": "@typescript-eslint/parser",
+ "extends": [
+ "plugin:@typescript-eslint/strict-type-checked",
+ "plugin:@typescript-eslint/stylistic-type-checked",
+ "plugin:import/recommended",
+ "plugin:import/typescript",
+ "next/core-web-vitals",
+ "prettier"
+ ],
+ "ignorePatterns": [
+ "**/dist/*",
+ "/docs/**",
+ "/out/**",
+ "**/jest.config.js",
+ "**/next.config.js",
+ "**/postcss.config.js",
+ "**/tailwind.config.js"
+ ],
"rules": {
- "prettier/prettier": "error"
- }
+ "prettier/prettier": "error",
+ "import/order": [
+ "warn",
+ {
+ "groups": ["builtin", "external", "internal", ["parent", "sibling"]],
+ "pathGroupsExcludedImportTypes": ["builtin"],
+ "newlines-between": "never",
+ "alphabetize": {
+ "order": "asc",
+ "caseInsensitive": true
+ }
+ }
+ ],
+ "import/no-empty-named-blocks": "error",
+ "import/no-mutable-exports": "error",
+ "import/no-cycle": "error",
+ "import/extensions": [
+ "warn",
+ "always",
+ {
+ "ts": "never",
+ "tsx": "never",
+ "js": "never",
+ "jsx": "never",
+ "mjs": "never"
+ }
+ ],
+ "import/newline-after-import": "warn",
+ "import/no-anonymous-default-export": "warn",
+ "import/no-default-export": "error",
+ "@typescript-eslint/consistent-type-imports": [
+ "warn",
+ {
+ "prefer": "type-imports",
+ "fixStyle": "inline-type-imports",
+ "disallowTypeAnnotations": false
+ }
+ ],
+ "@typescript-eslint/no-misused-promises": [
+ "error",
+ {
+ "checksVoidReturn": {
+ "attributes": false
+ }
+ }
+ ],
+ "import/no-duplicates": [
+ "error",
+ {
+ "prefer-inline": true
+ }
+ ],
+ // false negatives
+ "import/namespace": ["off"],
+ "no-empty-pattern": "off",
+ // make sure to `await` inside try…catch
+ "@typescript-eslint/return-await": ["error", "in-try-catch"],
+ "@typescript-eslint/no-confusing-void-expression": [
+ "error",
+ { "ignoreArrowShorthand": true }
+ ],
+ // empty interfaces are fine, e.g. React component that extends other component, but with no additional props
+ "@typescript-eslint/no-empty-interface": "off",
+ "@typescript-eslint/array-type": [
+ "warn",
+ { "default": "array-simple", "readonly": "array-simple" }
+ ],
+ // allow unused vars prefixed with `_`
+ "@typescript-eslint/no-unused-vars": [
+ "error",
+ { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
+ ],
+ // numbers and booleans are fine in template strings
+ "@typescript-eslint/restrict-template-expressions": [
+ "error",
+ { "allowNumber": true, "allowBoolean": true }
+ ],
+ "react/no-unescaped-entities": "off"
+ },
+ "overrides": [
+ {
+ "files": ["app/**/*.ts?(x)"],
+ "rules": {
+ "import/no-default-export": "off"
+ }
+ }
+ ]
}
diff --git a/.eslintrc.json.license b/.eslintrc.json.license
index dc192b8f..b42956e4 100644
--- a/.eslintrc.json.license
+++ b/.eslintrc.json.license
@@ -1,5 +1,5 @@
-This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index b9be6bee..25bced06 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -1,5 +1,5 @@
#
-# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index b65f48a6..4ffcd0e1 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -1,5 +1,5 @@
#
-# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
@@ -28,11 +28,11 @@ jobs:
actions: read
contents: read
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v3
- with:
- languages: javascript-typescript
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: javascript-typescript
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 55611233..19ce7d8e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,5 +1,5 @@
#
-# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
@@ -21,19 +21,11 @@ jobs:
permissions:
contents: read
checks: write
- nextjsgithubpages:
- name: Deploy Next.js site to GitHub Pages
- needs: buildandtest
- uses: StanfordBDHG/.github/.github/workflows/nextjs-github-pages.yml@v2
- permissions:
- contents: read
- pages: write
- id-token: write
dockerimage:
name: Docker Build and Push
uses: StanfordBDHG/.github/.github/workflows/docker-build-and-push.yml@v2
with:
- imageName: stanfordbdhg/nextjstemplate
+ imageName: stanfordbdhg/engagehfwebfrontend
environment: package
permissions:
contents: read
diff --git a/.github/workflows/monthly-markdown-link-check.yml b/.github/workflows/monthly-markdown-link-check.yml
index f2379e91..cdc704e6 100644
--- a/.github/workflows/monthly-markdown-link-check.yml
+++ b/.github/workflows/monthly-markdown-link-check.yml
@@ -1,5 +1,5 @@
#
-# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
@@ -10,7 +10,7 @@ name: Monthly Markdown Link Check
on:
schedule:
- - cron: "0 8 1 * *"
+ - cron: '0 8 1 * *'
jobs:
markdown_link_check:
diff --git a/.gitignore b/.gitignore
index 5ab1665c..4c60f504 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
#
-# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..1b5fad5c
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,10 @@
+#
+# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
+#
+# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
+#
+# SPDX-License-Identifier: MIT
+#
+
+**/dist
+node_modules
diff --git a/.prettierrc.cjs b/.prettierrc.cjs
index 95aa3f1c..3440dccb 100644
--- a/.prettierrc.cjs
+++ b/.prettierrc.cjs
@@ -1,5 +1,5 @@
//
-// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+// This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
diff --git a/CITATION.cff b/CITATION.cff
index 13cecdf4..91f02c99 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -1,5 +1,5 @@
#
-# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
@@ -15,6 +15,7 @@ authors:
- family-names: 'Ravi'
given-names: 'Vishnu'
orcid: 'https://orcid.org/0000-0003-0359-1275'
-title: 'NextJSTemplate'
-doi: '10.5281/zenodo.10052055'
-url: 'https://github.com/StanfordBDHG/NextJSTemplate'
+ - family-names: 'Arkadiusz'
+ given-names: 'Bachorski'
+title: 'ENGAGE-HF Web Frontend'
+url: 'https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend'
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 9ed8f51e..7ca9bfeb 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -1,6 +1,6 @@
-# Stanford Biodesign Digital Health Next.js Template Contributors
+# Stanford Biodesign Digital Health ENGAGE-HF open-source project
- [Paul Schmiedmayer](https://github.com/PSchmiedmayer)
- [Vishnu Ravi](https://github.com/vishnuravi)
diff --git a/Dockerfile b/Dockerfile
index 0eb4dc74..49d0c9dc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
#
-# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+# This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
# Based on the docker file found at https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile.
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
diff --git a/README.md b/README.md
index 323c1f7a..8634a32d 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# Biodesign Digital Health Next.js Template
+# Stanford Biodesign Digital Health ENGAGE-HF Web Frontend
-[![Build and Test](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/build-and-test.yml)
-[![Deployment](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/main.yml/badge.svg)](https://github.com/StanfordBDHG/NextJSTemplate/actions/workflows/main.yml)
-[![codecov](https://codecov.io/gh/StanfordBDHG/NextJSTemplate/graph/badge.svg?token=dfQW5eZ2up)](https://codecov.io/gh/StanfordBDHG/NextJSTemplate)
-[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10052055.svg)](https://doi.org/10.5281/zenodo.10052055)
+[![Build and Test](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/actions/workflows/build-and-test.yml)
+[![Deployment](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/actions/workflows/main.yml/badge.svg)](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/actions/workflows/main.yml)
+[![codecov](https://codecov.io/gh/StanfordBDHG/ENGAGE-HF-Web-Frontend/graph/badge.svg?token=PsKyNz7Woe)](https://codecov.io/gh/StanfordBDHG/ENGAGE-HF-Web-Frontend)
-## How To Use This Template
+## How To Use ENGAGE-HF Web Frontend
-The template repository contains a template for a Next.js project providing automated GitHub Actions and setups for code linting, testing & test coverage reports, docker deployments, a docker compose setup, local packages for modular deployment, and documentation generation & deployment.
-
-Follow these steps to customize it to your needs:
-
-1. Rename the Next.js project.
-2. Modify, add, or remove the local packages found at `/packages/*` to separate code into smaller modules.
-3. Add dependencies and edit the project in `/app` and the local Node packages.
-
-The main application is automatically deployed to https://stanfordbdhg.github.io/NextJSTemplate/.
-
-The documentation of the local packages is automatically deployed to https://stanfordbdhg.github.io/NextJSTemplate/docs.
+The ENGAGE-HF Web Frontend repository contains a Next.js project providing automated GitHub Actions and setups for code linting, testing & test coverage reports, docker deployments, a docker compose setup, local packages for modular deployment.
## Getting Started
@@ -73,12 +62,12 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next
## License
-This project is licensed under the MIT License. See [Licenses](https://github.com/StanfordBDHG/NextJSTemplate/tree/main/LICENSES) for more information.
+This project is licensed under the MIT License. See [Licenses](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/tree/main/LICENSES) for more information.
## Contributors
This project is developed as part of the Stanford Byers Center for Biodesign at Stanford University.
-See [CONTRIBUTORS.md](https://github.com/StanfordBDHG/NextJSTemplate/tree/main/CONTRIBUTORS.md) for a full list of all Next.js Template contributors.
+See [CONTRIBUTORS.md](https://github.com/StanfordBDHG/ENGAGE-HF-Web-Frontend/tree/main/CONTRIBUTORS.md) for a full list of all contributors.
![Stanford Byers Center for Biodesign Logo](https://raw.githubusercontent.com/StanfordBDHG/.github/main/assets/biodesign-footer-light.png#gh-light-mode-only)
![Stanford Byers Center for Biodesign Logo](https://raw.githubusercontent.com/StanfordBDHG/.github/main/assets/biodesign-footer-dark.png#gh-dark-mode-only)
diff --git a/app/favicon.ico.license b/app/favicon.ico.license
index dc192b8f..b42956e4 100644
--- a/app/favicon.ico.license
+++ b/app/favicon.ico.license
@@ -1,5 +1,5 @@
-This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
diff --git a/app/globals.css b/app/globals.css
index d5a05891..6a942e75 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -1,6 +1,6 @@
/*
-This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
diff --git a/app/layout.tsx b/app/layout.tsx
index 4045408c..94c49e70 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,5 +1,5 @@
//
-// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+// This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
@@ -11,8 +11,8 @@ import type { ReactNode } from 'react'
import './globals.css'
export const metadata: Metadata = {
- title: 'Next.js Template',
- description: 'Stanford Biodesign Digital Health Next.js Template',
+ title: 'ENGAGE-HF Web Frontend',
+ description: 'Stanford Biodesign Digital Health ENGAGE-HF Web Frontend',
}
interface RootLayoutProps {
diff --git a/app/page.test.tsx b/app/page.test.tsx
index df14aeec..23dee619 100644
--- a/app/page.test.tsx
+++ b/app/page.test.tsx
@@ -1,5 +1,5 @@
//
-// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
+// This source file is part of the Stanford Biodesign Digital Health ENGAGE-HF open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
@@ -11,11 +11,11 @@ import '@testing-library/jest-dom'
import Home from './page'
describe('Home Component', () => {
- it('renders the Stanford Biodesign Digital Health Next.js Template heading', () => {
+ it('renders the Stanford Biodesign Digital Health ENGAGE-HF Web Frontend heading', () => {
render(