This project serves as the front-end for gradestats, separate from the api which is its own project.
Live version can be found at grades.no
First, run the development server:
# Install dependencies
npm i
# Run development server
npm run dev
Open http://localhost:3000 with your browser to see the result.
Variables have to be added in a lot of places to make everything work correctly!
- Add them to the
/common/constants
file where they are used. Here you can also add defaults. - Add them to the Dockerfile to make them available to production.
- Add the variables to the
secrets
in the github repository, which is where we store variables for production. - Proxy the variables in the required github actions files.
- Add them to the list of variables below to make it easier to keep track for everyone involved.
Private variables have to be set in the runtime environment to be kept private.
# How many courses should be pre-rendered at build time
NEXT_PUBLIC_BUILD_TIME_COURSE_LIMIT # Default = 100
# Base url of the api backend
NEXT_PUBLIC_GRADES_API_URL # Default = https://grades.no, for local backend it should be 'http://localhost:8000'
# Sentry url/id for error logging
NEXT_PUBLIC_SENTRY_DSN # Default = undefined
# Google analytics tracking ID
NEXT_PUBLIC_GA_TRACKING_ID # Default = __REPLACE_ME__
# Actual URL of the hosted project. Important for linking. for prod it should be https://grades.no
NEXT_PUBLIC_CANONICAL_URL # Default = http://localhost:3000
# Redirect url for next auth
NEXTAUTH_URL #
# Client ID for dataporten/FEIDE client for OIDC
NEXT_PUBLIC_FEIDE_CLIENT_ID # Default = undefined
# Client Secret for dataporten/FEIDE client for OIDC. HAS TO BE KEPT SECRET
NEXT_PRIVATE_FEIDE_CLIENT_SECRET # Default = undefined
# Base url for OIDC authentication (for auto discovery)
NEXT_PUBLIC_FEIDE_AUTH_ENDPOINT # Default = https://auth.dataporten.no