/nextjs-project-installation-dashboard

[[ 🔷 Mirrored from Azure DevOps 🔷]] Frontend Dashboard for displaying current projects a user is assigned to.

Primary LanguageTypeScript

UoW Frontend App

This is an web application for automating the installation of multiple software packages by creating shell scripts (.sh) and configuration files (.config), that include the packages to install at a pinned version.

Note

This repository was created within Azure DevOps and is now being mirrored to this GitHub repository. Source of truth will always be the Azure DevOps repository. Please see Terraform1 repository for deploying the application to Azure Web Apps. Alternatively, if running locally the [Backend service]2 must also be running to accept API requests.

Roadmap

More work needs to be completed for the final version of the application. Below are additional things required for a clearer vision of what is envisioned of this application.

Implement Next-Auth.js

Implement Next-Auth.js configured to the Azure Active Directory, so only authenticated users are able to access the dashboard, additionally sending their access token as part of the header to the backend service.

This will involve creating various routes, e.g. login, logout etc.

Getting Started

  1. First install the node packages for this project
    npm install
  2. Next, run the development server
    npm run dev
  3. Open http://localhost:3000 with your browser to see the result.
  4. You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

Note: This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Environment variables

Environment variable Description Default value Required?
NEXT_PUBLIC_BACKEND_SERVICE_URL The endpoint to the backend RESTful service N/A Yes

Learn More

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

Deploy on Azure Web App

The easiest way to deploy the Next.js app is to use the Azure Web App, this project has been configured to automatically deploy changes made to the master branch to an environment variable, see /azure-pipeline/azure-pipelines.yml the following variables are required to be set.

Pipeline variables

Variable Description Default value Required?
azureSubscription The Azure Subscription that contains the Azure Web App N/A Yes
NEXT_PUBLIC_BACKEND_SERVICE_URL The endpoint to the backend RESTful service N/A Yes
projectPoolName The azure agent pool that the job will run on N/A Yes
reactStartUpCommand The start-up command to start the next.js web application pm2 start /home/site/wwwroot/ecosystem.config.js --no-daemon No
webAppName The name of the created Azure Web App N/A Yes

Checkout Deploy to App Service using Azure Pipelines for more details.

Footnotes

  1. My Azure DevOps organisation / project is private, Terraform repository is mirrored here in GitHub. ↩

  2. My Azure DevOps organisation / project is private, FastAPI repository is mirrored here in GitHub. ↩