Our webapp's frontend
Find a file
2026-05-21 12:21:48 -06:00
.vscode added vscode settings to make tabs smaller by default 2024-11-13 10:59:51 -06:00
public added the intellifarms branding to the whilelabel 2026-04-08 11:37:48 -06:00
src redesigned white labeling code 2026-05-21 11:03:34 -06:00
.env can now deploy with a chosen whitelabel 2026-05-21 12:21:48 -06:00
.gitignore folderized app files 2024-10-21 15:21:22 -06:00
.gitlab-ci.yml trying to fix the tag for the streamline image 2025-06-11 14:01:11 -06:00
deploy.sh can now deploy with a chosen whitelabel 2026-05-21 12:21:48 -06:00
docker-compose.dev.yml added dns 2024-10-30 14:21:52 -06:00
docker-compose.local.yml build for local server and deployment script 2026-04-22 14:27:58 -06:00
docker-compose.prod.yml added docker-compose for production 2025-04-22 11:22:02 -06:00
docker-compose.staging.yml added staging yml file 2025-04-17 15:46:06 -06:00
docker-compose.streamline.yml added streamline docker compose and build steps 2025-06-11 10:42:19 -06:00
Dockerfile added Dockerfile 2024-10-09 14:37:39 -06:00
eslint.config.js switched to vite instead of create-react-app to stayed updated in packages 2024-10-21 14:32:25 -06:00
index.html setting runtime config for crisp before i load it 2025-12-22 11:55:17 -06:00
indexLocal.html local authentication placeholder 2026-04-29 10:20:44 -06:00
indexV2.html setting runtime config for crisp before i load it 2025-12-22 11:55:17 -06:00
nginx.conf added changes that prevent nginx welcome error 2026-01-19 14:53:03 -06:00
package-lock.json hotfix for when adding alerts from the bin page the conditions in the interaction were being showed in the converted value 2026-04-27 09:12:14 -06:00
package.json redesigned white labeling code 2026-05-21 11:03:34 -06:00
README.md set up the bones for the whitelabel, just need to generate the icons from a logo once we get it 2026-04-02 11:43:43 -06:00
tsconfig.app.json changed imports to remove legacy 2025-05-08 11:24:21 -06:00
tsconfig.json bins page now has the add bin button 2025-03-10 12:51:40 -06:00
tsconfig.node.json added ts config so that it could compile using absolute paths without error 2024-11-14 15:27:54 -06:00
vite.config.ts local authentication placeholder 2026-04-29 10:20:44 -06:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

White-labeling

Steps to add a new white label

  1. Client Instructions:
  • supply assets and colours to be used for the white-label (favicon if necessary)
  • determine a sub-domain to use as mask, dashboard is preferred (ex: dashboard.example.com)
  • add a CNAME record pointing their custom subdomain (ex: dashboard.example.com) to brandxtech.ca
  • add a login button on their website point to /login of their custom subdomain (ex: dashboard.example.com/login)

It is recommended to start with the Auth0 stage once everything from the client has been recieved as things like the client ID will be needed in other stages

Frontend Steps

  1. Create a PWA folder in public that is named after the client and generate PWA assets using this website (use the company logo but you might need to use a custom favicon depending on the result)
  1. Create a white-label branding folder in src/assets/whitelabels and create a darkLogo.png and lightLogo.png from the client's logo
  2. In src/services/whiteLabel.ts, add a new Whitelabel instance with the required fields and add its hostname mapping to the whitelabels map
  3. If there are any pages specific to the whitelabel be sure to update the side and bottom navigator

Backend Steps

  1. In dynamic-config.prod.yml, add a router entry for the new whitelabel
  2. In pond/http/server.go, add the sub-domain to the allowedOrigins
  3. In pond/whitelabel.go, add an entry for the new white label

Auth0 Steps

  1. Create a new Single Page App on Auth0 using React as the tech
  2. Once you have the client ID add it to your .env file in the frontend
  3. Adjust settings accordingly in the new application
    • use a image bucket like postimg to store their company logo and favicon
    • add a whitelabel logo
    • allow necessary origins, callback URLs, and CORS domains to the application settings (see other applications/whitelabels as a guideline)
    • customize the Universal Login page to handle the new whitelabel
      • check if the client ID matches this client's Auth0 application
      • change the Universal Login theme using white-label colours and images stored in a bucket (ex: postimg)

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname,
    },
  },
})
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
  // Set the react version
  settings: { react: { version: '18.3' } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs['jsx-runtime'].rules,
  },
})