Skip to content

Survey client ​

Survey client is Vue.js based application and scaffolded with vite. Docs outline specific settings for deployment of the application. But feel free to dive in to vite docs if any further modifications are required.

Basic configuration options can be set through .env file. Further vite configuration can be tweak through vite.config.ts.

Environment file contains common variables, server variables and SPA variables. Optionally, SPA can be served using tiny http server (server/index.js).

Common variables ​

NODE_ENV ​

Node environment. Defaults to development.

BASE_DIR ​

Directory to build the SPA. Defaults to dist.

BASE_URL ​

Base URL where to server the SPA. Defaults to /.

API_HOST ​

API Server base URL. Defaults to http://localhost:3100 for local development.

Server variables ​

Only when serving SPA with locally provided http server (server/index.js).

SERVER_NAME ​

Server name applications. Default to Intake24 Survey Server.

SERVER_URL ​

Server host. Defaults to localhost.

SERVER_PORT ​

Server port. Defaults to 3300.

SERVER_STATIC ​

Directory, which should be served as public by the http server. Defaults to $BASE_DIR.

SERVER_API_HOST ​

API Server base URL. Defaults to $API_HOST.

SERVER_IMG_CDN ​

CDN Base URL (if deployment is using CDN to Images delivery). Defaults to $API_HOST.

Vite build vars ​

OUTPUT_DIR ​

Directory to build the SPA. Defaults to $BASE_DIR.

EMPTY_OUT_DIR ​

Whether to empty the output directory before building. Defaults to true.

PRODUCTION_SOURCE_MAP ​

Flag whether to include source maps to production build or not. Defaults to false.

DISABLE_PWA ​

Flag whether to disable PWA functionality. Defaults to false.

LEGACY ​

Flag whether to target legacy browsers. Defaults to false. See vite-legacy for more details.

Vite dev server vars ​

DEV_HTTPS ​

Flag whether to use HTTPS protocol, for development purposes. Defaults to false.

Certificates are generated by mkcert & vite-plugin-mkcert.

  • firstly boot up any frontend application in dev mode, which will generate certificates on first run
  • then boot up API server in dev mode
  • certificates are stored in user home directory by default, i.e. ~/vite-plugin-mkcert

For production, it is recommended to use http protocol and reverse proxy (e.g. nginx) to handle HTTPS.

DEV_MKCERT_PATH ​

Path to local certificates folder. Certificates are stored in user home directory by default, i.e. resolves to default: ~/vite-plugin-mkcert.

Vite public vars ​

VITE_APP_NAME ​

SPA application name. Defaults to Intake24 Survey.

VITE_APP_BASE_URL ​

Base URL where to server the SPA. Defaults to $BASE_URL.

VITE_APP_PREFIX ​

Prefix to be used for application data stored in browser storage. Defaults to it24s.

VITE_API_HOST ​

API Server base URL. Defaults to $API_HOST.

VITE_API_URL ​

API Server context URL to be appended to VITE_API_HOST. Defaults to api.

VITE_ACL_SIGNUP_ENABLED ​

Flag whether to allow admin tool sign-ups. Defaults to true. Flag only enables sign-up view in the application. Sign-ups also has to be enabled in API Server ACL settings.

Captcha settings ​

VITE_CAPTCHA_PROVIDER ​

Captcha provider. Possible values g-captcha or re-captcha.

VITE_CAPTCHA_SITEKEY ​

Captcha provider sitekey. Refer to your provider, how to obtain the key.

VITE_GOOGLE_ANALYTICS_ID ​

Google Analytics ID. Disabled if not set.

VITE_GTM_CONTAINER_ID ​

Google Tag Manger Container ID. Disabled if not set.

VITE_CLARITY_PROJECT_ID ​

Microsoft Clarity project ID. Disabled if not set.

VITE_WEBPUSH_PUBLIC_KEY ​

Webpush public key for we-push notifications.