Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Template #9

Merged
merged 4 commits into from
Oct 29, 2023
Merged
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
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.json.license
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand All @@ -17,6 +17,9 @@ jobs:
reuseaction:
name: REUSE Compliance Check
uses: StanfordBDHG/.github/.github/workflows/reuse.yml@v2
markdownlinkcheck:
name: Markdown Link Check
uses: StanfordBDHG/.github/.github/workflows/markdown-link-check.yml@v2
eslint:
name: ESLint
uses: StanfordBDHG/.github/.github/workflows/eslint.yml@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand All @@ -26,4 +26,4 @@ jobs:
name: Docker Build and Push
uses: StanfordBDHG/.github/.github/workflows/docker-build-and-push.yml@v2
with:
imageName: stanfordbdhg/typescripttemplate
imageName: stanfordbdhg/nextjstemplate
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.license
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)

Expand Down
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand All @@ -12,5 +12,5 @@ authors:
- family-names: 'Schmiedmayer'
given-names: 'Paul'
orcid: 'https://orcid.org/0000-0002-8607-9148'
title: 'TypeScriptTemplate'
url: 'https://github.com/StanfordBDHG/TypeScriptTemplate'
title: 'NextJSTemplate'
url: 'https://github.com/StanfordBDHG/NextJSTemplate'
4 changes: 2 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!--

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)

SPDX-License-Identifier: MIT

-->

# Stanford Biodesign Digital Health TypeScript Template Contributors
# Stanford Biodesign Digital Health Next.js Template Contributors

- [Paul Schmiedmayer](https://github.com/PSchmiedmayer)
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Next.js Template 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)
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<!--

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)

SPDX-License-Identifier: MIT

-->

# TypeScript Template
# Biodesign Digital Health Next.js Template

[![Build and Test](https://github.com/StanfordBDHG/TypeScriptTemplate/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/StanfordBDHG/TypeScriptTemplate/actions/workflows/build-and-test.yml)
[![Deployment](https://github.com/StanfordBDHG/TypeScriptTemplate/actions/workflows/main.yml/badge.svg)](https://github.com/StanfordBDHG/TypeScriptTemplate/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/StanfordBDHG/TypeScriptTemplate/graph/badge.svg?token=dfQW5eZ2up)](https://codecov.io/gh/StanfordBDHG/TypeScriptTemplate)
[![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)

## How To Use This Template

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 and deployment.
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 NextJS project.
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/TypeScriptTemplate/.
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/TypeScriptTemplate/docs.
The documentation of the local packages is automatically deployed to https://stanfordbdhg.github.io/NextJSTemplate/docs.

## Getting Started

Expand All @@ -44,7 +44,7 @@ npm install
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.<!-- markdown-link-check-disable-line -->

You can edit the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

Expand All @@ -55,7 +55,7 @@ You can edit the page by modifying `app/page.tsx`. The page auto-updates as you

You can view your images created with `docker images`.

Open [http://localhost](http://localhost) with your browser to see the result. You can visit [http://localhost:8080](http://localhost:8080) to see the reverse proxy setup before the main application.
Open [http://localhost](http://localhost) with your browser to see the result. You can visit [http://localhost:8080](http://localhost:8080) to see the reverse proxy setup before the main application.<!-- markdown-link-check-disable-line -->

The `docker-compose.yml` setup contains a production-ready setup using a reverse proxy.

Expand All @@ -72,12 +72,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/TemplatePackage/tree/main/LICENSES) for more information.
This project is licensed under the MIT License. See [Licenses](https://github.com/StanfordBDHG/NextJSTemplate/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/TemplatePackage/tree/main/CONTRIBUTORS.md) for a full list of all TemplatePackage contributors.
See [CONTRIBUTORS.md](https://github.com/StanfordBDHG/NextJSTemplate/tree/main/CONTRIBUTORS.md) for a full list of all Next.js Template 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)
2 changes: 1 addition & 1 deletion app/favicon.ico.license
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)

Expand Down
2 changes: 1 addition & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)

Expand Down
6 changes: 3 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
Expand All @@ -11,8 +11,8 @@ import type { ReactNode } from 'react'
import './globals.css'

export const metadata: Metadata = {
title: 'TypeScript Template',
description: 'Stanford Biodesign Digital Health TypeScript Template',
title: 'Next.js Template',
description: 'Stanford Biodesign Digital Health Next.js Template',
}

interface RootLayoutProps {
Expand Down
6 changes: 3 additions & 3 deletions app/page.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
Expand All @@ -12,11 +12,11 @@ import '@testing-library/jest-dom'
import Home from './page'

describe('Home Component', () => {
it('renders the Stanford Biodesign Digital Health TypeScript Template heading', () => {
it('renders the Stanford Biodesign Digital Health Next.js Template heading', () => {
const { getByText } = render(<Home />)

const headingElement = getByText(
/Welcome to the Stanford Biodesign Digital Health TypeScript Template/i,
/Welcome to the Stanford Biodesign Digital Health Next.js Template/i,
)

expect(headingElement).toBeInTheDocument()
Expand Down
2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
Expand Down
12 changes: 6 additions & 6 deletions docker-compose-development.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# Based on the Apodini workflow found at: https://github.com/Apodini/ApodiniExample/docker-compose-development.yml
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
Expand All @@ -10,10 +10,10 @@
version: '3.9'

services:
# An TypeScript Template
stanford-bdhg-typescript-template:
container_name: 'stanford-bdhg-typescript-template'
image: 'stanfordbdgh/typescripttemplate:dev'
# An Next.js Template
stanford-bdhg-nextjs-template:
container_name: 'stanford-bdhg-nextjs-template'
image: 'stanfordbdgh/nextjstemplate:dev'
build:
context: ./
dockerfile: ./Dockerfile
Expand Down Expand Up @@ -47,7 +47,7 @@ services:
# 8080 on the container is mapped to 8080 on the server/VM/your Machine.
# Port 8080 is where the api traefik dashboard is located
- '8080:8080'
# Port 80 is where our stanford-bdhg-typescript-template is running
# Port 80 is where our stanford-bdhg-nextjs-template is running
- '80:80'
# Traefik needs the docker.sock to detect new docker container
volumes:
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
# Based on the Apodini workflow found at: https://github.com/Apodini/ApodiniExample/docker-compose.yml
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
Expand All @@ -10,10 +10,10 @@
version: '3.9'

services:
# An TypeScript Template
stanford-bdhg-typescript-template:
container_name: 'stanford-bdhg-typescript-template'
image: 'ghcr.io/stanfordbdhg/typescripttemplate:latest'
# An Next.js Template
stanford-bdhg-nextjs-template:
container_name: 'stanford-bdhg-nextjs-template'
image: 'ghcr.io/stanfordbdhg/nextjstemplate:latest'
expose:
- '80'
command: ['node', 'server.js']
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-lock.json.license

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "typescripttemplate",
"name": "nextjstemplate",
"version": "0.1.0",
"license": "MIT",
"description": "Stanford Biodesign Digital Health TypeScript Template",
"description": "Stanford Biodesign Digital Health Next.js Template",
"keywords": [
"Stanford",
"Biodesign"
],
"repository": {
"type": "git",
"url": "https://github.com/StanfordBDHG/TypeScriptTemplate"
"url": "https://github.com/StanfordBDHG/NextJSTemplate"
},
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package.json.license
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)

Expand Down
2 changes: 1 addition & 1 deletion packages/example-package/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
# This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
#
# SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
#
Expand Down
2 changes: 1 addition & 1 deletion packages/example-package/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
Based on the https://github.com/Gerrit0/typedoc-packages-example repository.

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
Expand Down
2 changes: 1 addition & 1 deletion packages/example-package/package.json.license
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)

Expand Down
4 changes: 2 additions & 2 deletions packages/example-package/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
Expand All @@ -17,7 +17,7 @@
export function generateGreeting(): Greeting {
return {
message: 'Welcome',
project: 'Stanford Biodesign Digital Health TypeScript Template',
project: 'Stanford Biodesign Digital Health Next.js Template',
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/example-package/tsconfig.json.license
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project

SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)

Expand Down
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This source file is part of the Stanford Biodesign Digital Health TypeScript Template open-source project
// This source file is part of the Stanford Biodesign Digital Health Next.js Template open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md)
//
Expand Down
Loading