An application for managing multiple websites in Lighthouse.
The server of the application runs an Express server and uses web sockets to push the state of the audits to the client. It uses the Lighthouse package to run the audits from the server.
The client is build with React.
Endpoint / Required role | None | Viewer | User | Admin | Super admin |
---|---|---|---|---|---|
/api/get-current-user |
✓ | ✓ | ✓ | ✓ | ✓ |
/api/data/sections |
✓ | ✓ | ✓ | ✓ | ✓ |
/api/token/* |
- | - | ✓ | ✓ | ✓ |
/api/actions/* |
- | - | ✓ | ✓ | ✓ |
/api/admin/section/* |
- | - | - | ✓ | ✓ |
/api/admin/page-group/* |
- | - | - | ✓ | ✓ |
/api/admin/page/* |
- | - | - | ✓ | ✓ |
/api/admin/info/* |
- | - | - | - | ✓ |
/api/admin/user/* |
- | - | - | - | ✓ |
Requirements and instructions for installing and running the application in development or production.
- Yarn >= 1.22
- Node >= 16
- MongoDB
- Google Chrome (Headless)
- Azure AD application
- Make sure all required environment variables are available
NODE_ENV
should bedevelopment
orproduction
PORT
port that the application will run on, defaults to3000
MONGO_CONNECTION_STR
full MongoDB connection url with credentialsAUTH_AD_TENANT_ID
,AUTH_AD_CLIENT_ID
andAUTH_AD_ISSUER
for Azure AD
- Run install yarn install script
yarn
in the root of the project
- Run yarn dev script
yarn dev
in project root to run both back end and front end applications.- For running only back end
yarn dev:server
- For running only front end
yarn dev:client
(requires running server)
- For running only back end
- Access the application on
http://localhost:<port>
, port being the environment variablePORT
- Run yarn dev script
yarn build
in project root to build both back end and front end applications. - Run the server from the build dir in the repo
node .build/server/server.js
Credit to Volvo Cars (Global Online Business) where this application has been developed as a side project.