Skip to content

StanfordBDHG/NextJSTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Biodesign Digital Health Next.js Template

Build and Test Deployment codecov DOI

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 & 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.

Getting Started

You can run the project using the following command. You will need to install Node.js and npm, e.g., using homebrew (recommended for macOS) or the official Node.js installer.

  1. Install All Dependencies
npm install
  1. Start the Next.js Application
npm run dev

Open http://localhost:3000 with your browser to see the result.

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

Docker

  1. Install Docker on your machine.
  2. Build the image and run the docker compose setup: docker compose -f docker-compose-development.yml up.

You can view your images created with docker images.

Open http://localhost with your browser to see the result. You can visit http://localhost:8080 to see the reverse proxy setup before the main application.

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

Every version of the application on the main branch is automatically packaged into docker images using the main tag. Every release is also published using the latest and respective version tags.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

License

This project is licensed under the MIT License. See Licenses for more information.

Contributors

This project is developed as part of the Stanford Byers Center for Biodesign at Stanford University. See CONTRIBUTORS.md for a full list of all Next.js Template contributors.

Stanford Byers Center for Biodesign Logo Stanford Byers Center for Biodesign Logo