Dashboard for Witty
Handles registration, SSO, user license management, organization rules and personal/team statistics by integrating with https://github.com/witty-works/nlp_api as well as https://github.com/witty-works/browser-extension and https://github.com/witty-works/word-plugin
Based on
For deployment we recommend https://docs.platform.sh/
-
Clone Code
- Make sure to add your SSH key to github
- Run
git clone git@github.com:witty-works/dashboard.git - Get a current env file from a co-worker or
cp .env.example .env(might need to set some API keys in order for the next steps to work) - Install Lando https://docs.lando.dev/basics/installation.html
- On Windows 10 use WSL2 https://blog.calevans.com/2020/06/18/making-lando-work-inside-wsl2/
- Run
lando start - Run
lando composer install - Run
lando artisan migrate - Run
lando artisan storage:link - Run
lando npm install --save - Run
lando npm run dev - Install the lando certificate in your browser
- Go to the website and create an account
- Run
lando artisan lumki:setup(answer yes, ie. hit enter, for every question)
-
Install Platform.sh CLI https://docs.platform.sh/development/cli.html
- Run
platform login - Run
platform project:set-remote(selectdashboard) - Run
platform listto find out what commands are available - Run
platform help [command]to find out details about a command
- Run
-
Install Sentry CLI https://docs.sentry.io/product/cli/installation/
- Run
sentry-cli login - Run
cp .sentryclirc.example .sentryclirc - Edit
.sentryclircto add the auth token from https://sentry.io/settings/account/api/auth-tokens/
- Run
Note: Route caching is not supported by the multilingual route extension used in this project. Avoid running php artisan route:cache or similar commands, as it may break route localization.
See docs/docker.md for Docker/Lando development workflow.
Go to https://dashboard.lndo.site
Use gitflow to do feature or hotfix branches: https://nvie.com/posts/a-successful-git-branching-model/
See here for installation instructions: https://github.com/nvie/gitflow/wiki/Installation
- For local test emails see: http://mail.lndo.site/
See docs/docker.md for translation workflow and troubleshooting.
See docs/release.md for release and hotfix instructions, including git config and deployment steps.
See docs/subscriptions.md for user management, superadmin rights, and impersonation instructions.
- Docker & Local Development
- Stripe CLI Integration
- Sentry CLI Integration
- Release & Hotfix Process
- Subscription & Team Management
Use for the integration with the NLP API.
APP_NLP_API_SYNC_ENDPOINT— Main endpoint for NLP API syncAPP_NLP_API_SYNC_ENDPOINT_2— (Optional) Secondary endpoint for NLP API syncAPP_NLP_API_SYNC_USER— Username for NLP API syncAPP_NLP_API_SYNC_PASSWORD— Password for NLP API syncAPP_NLP_API_SYNC_CONFIGS— Enable/disable sync configsAPP_NLP_API_SYNC_DELAY_PER_COUNT— Delay per sync count (default: 0.1)
Enabled the browser extension integration.
BROWSER_VERSION_CHROME— Latest supported Chrome versionBROWSER_VERSION_EDGE— Latest supported Edge versionBROWSER_VERSION_FIREFOX— Latest supported Firefox version
Used for application overlays for onboarding.
HELPHERO_JS_ENABLED— Enable Helphero JS widgetHELPHERO_APP_ID— Helphero App ID
Only used for local development to ease translation maintenance.
TRANSLATIONIO_KEY— API key for Translation.io integration
Posthog is used both for analytics of usage of the dashboard as well as for collecting statistics in the Witty client applications (browser extension, Microsoft Word Add-in).
POSTHOG_ENABLED— Enable PostHog analyticsPOSTHOG_JS_ENABLED— Enable PostHog JS trackingPOSTHOG_API_KEY— API key for PostHogPOSTHOG_HOST— Host URL for PostHog instancePOSTHOG_DEBUG— Enable debug mode for PostHogPOSTHOG_PROJECT_ID— Project ID for PostHogPOSTHOG_PERSONAL_API_KEY— Personal API key for PostHogPOSTHOG_INSIGHTS_CACHE_TIME— Cache time for insights (seconds)POSTHOG_DASHBOARD_USER_ID— Dashboard user ID overridePOSTHOG_DASHBOARD_TEAM_ID— Dashboard team ID overridePOSTHOG_RATE_LIMIT— API rate limit (default: 16)POSTHOG_RATE_INTERVAL_SECONDS— API rate interval in seconds (default: 60)POSTHOG_RATE_MULTIPLIER— API rate multiplier (default: 3)
Relevant for the Microsoft Word Add-in integration.
OFFICE365_CLIENT_ID— Client ID for Microsoft Office 365 SSOOFFICE365_CLIENT_SECRET— Client Secret for Microsoft Office 365 SSOOFFICE365_REDIRECT_URI— Redirect URI for Office 365 SSO callbackOFFICE365_TENANT_ID— (Optional) Tenant ID for restricting SSO to a specific organization