diff --git a/apps/demo-app-video/.env-cmdrc.json b/apps/demo-app-video/.env-cmdrc.json deleted file mode 100644 index 83bc50d45..000000000 --- a/apps/demo-app-video/.env-cmdrc.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "local": { - "PORT": "17200", - "HTTPS": "true", - "ESLINT_NO_DEV_ERRORS": "true", - "REACT_APP_ENVIRONMENT": "local", - "REACT_APP_LIVE_CONFIG_ID": "demo-app-video-development", - "REACT_APP_USE_LOCAL_CONFIG": "true", - "REACT_APP_AUTH_DOMAIN": "idp.preview.monk.ai", - "REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/", - "REACT_APP_AUTH_CLIENT_ID": "w9MTl518yqWl0dVE8oUbkxc3gnrI0sgH", - "REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304", - "REACT_APP_SENTRY_DEBUG": "true" - }, - "development": { - "REACT_APP_ENVIRONMENT": "development", - "REACT_APP_LIVE_CONFIG_ID": "demo-app-video-development", - "REACT_APP_AUTH_DOMAIN": "idp.preview.monk.ai", - "REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/", - "REACT_APP_AUTH_CLIENT_ID": "w9MTl518yqWl0dVE8oUbkxc3gnrI0sgH", - "REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304" - }, - "staging": { - "REACT_APP_ENVIRONMENT": "staging", - "REACT_APP_LIVE_CONFIG_ID": "demo-app-video-staging", - "REACT_APP_AUTH_DOMAIN": "idp.preview.monk.ai", - "REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/", - "REACT_APP_AUTH_CLIENT_ID": "w9MTl518yqWl0dVE8oUbkxc3gnrI0sgH", - "REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304" - }, - "preview": { - "REACT_APP_ENVIRONMENT": "preview", - "REACT_APP_LIVE_CONFIG_ID": "demo-app-video-preview", - "REACT_APP_AUTH_DOMAIN": "idp.preview.monk.ai", - "REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/", - "REACT_APP_AUTH_CLIENT_ID": "w9MTl518yqWl0dVE8oUbkxc3gnrI0sgH", - "REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304" - }, - "backend-staging-qa": { - "REACT_APP_ENVIRONMENT": "backend-staging-qa", - "REACT_APP_LIVE_CONFIG_ID": "demo-app-video-backend-staging-qa", - "REACT_APP_AUTH_DOMAIN": "idp.staging.monk.ai", - "REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/", - "REACT_APP_AUTH_CLIENT_ID": "PLGfABs0AWNwZaokEg3GeU4m01RhIvyi", - "REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304" - } -} diff --git a/apps/demo-app-video/.eslintignore b/apps/demo-app-video/.eslintignore deleted file mode 100644 index 3c3629e64..000000000 --- a/apps/demo-app-video/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/apps/demo-app-video/.eslintrc.js b/apps/demo-app-video/.eslintrc.js deleted file mode 100644 index b26896911..000000000 --- a/apps/demo-app-video/.eslintrc.js +++ /dev/null @@ -1,14 +0,0 @@ -const OFF = 0; -const WARN = 1; -const ERROR = 2; - -module.exports = { - extends: ['@monkvision/eslint-config-typescript-react'], - parserOptions: { - project: ['./tsconfig.json'], - }, - rules: { - 'import/no-extraneous-dependencies': OFF, - 'no-console': OFF, - } -} diff --git a/apps/demo-app-video/.gitignore b/apps/demo-app-video/.gitignore deleted file mode 100644 index 0ec2ddf7c..000000000 --- a/apps/demo-app-video/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# builds -build/ -lib/ -dist/ -module/ -commonjs/ -typescript/ -web-build/ - -# modules -node_modules/ -coverage/ -.expo/ -.docusaurus/ - -# logs -npm-debug.* -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# cache -.eslintcache - -# misc -.DS_Store diff --git a/apps/demo-app-video/LICENSE b/apps/demo-app-video/LICENSE deleted file mode 100644 index a3592ab9e..000000000 --- a/apps/demo-app-video/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -The Clear BSD License - -Copyright (c) [2022] [Monk](http://monk.ai) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted (subject to the limitations in the disclaimer -below) provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY -THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/apps/demo-app-video/README.md b/apps/demo-app-video/README.md deleted file mode 100644 index 3e259b8a5..000000000 --- a/apps/demo-app-video/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# Monk Demo App -This application is a demo app used to showcase how to implement the Monk workflow (authentication, inspection creation, -inspection capture and inspection report) using the MonkJs SDK. - -# Features -This app contains the following features : -- Authentication guards to enforce user log in -- User log in with browser pop-up using Auth0 and token caching in the local storage -- Automatic creation of a Monk inspection -- Inspection capture using the PhotoCapture workflow -- Redirection to the Monk inspection report app (since the inspection report component is not yet available in MonkJs - 4.0) -- Possiblity of passing the following configuration in the URL search params : - - Encrypted authentication token using ZLib (the user does not have to log in) - - Inspection ID (instead of creating a new one automatically) - - Vehicle type used for the Sights (default one is CUV) - - Application language (English / French / German / Dutch) - -# Running the App -In order to run the app, you will need to have [NodeJs](https://nodejs.org/en) >= 16 and -[Yarn 3](https://yarnpkg.com/getting-started/install) installed. Then, you'll need to install the required dependencies -using the following command : - -```bash -yarn install -``` - -You then need to copy the local environment configuration available in the `env.txt` file at the root of the directory -into an env file called `.env` : - -```bash -cp env.txt .env -``` - -You can then start the app by running : - -```bash -yarn start -``` - -The application is by default available at `https://localhost:17200/`. - -# Building the App -To build the app, you simply need to run the following command : - -```bash -yarn build -``` - -Don't forget to update the environment variables defined in your `.env` file for the target website. - -# Testing -## Running the Tests -To run the tests of the app, simply run the following command : - -```bash -yarn test -``` - -To run the tests as well as collecgt coverage, run the following command : - -```bash -yarn test:coverage -``` - -## Analyzing Bundle Size -After building the app using the `yarn build` command, you can analyze the bundle size using the following command : - -```bash -yarn analyze -``` - -This will open a new window on your desktop browser where you'll be able to see the sizes of each module in the final -app. diff --git a/apps/demo-app-video/jest.config.js b/apps/demo-app-video/jest.config.js deleted file mode 100644 index 518bba263..000000000 --- a/apps/demo-app-video/jest.config.js +++ /dev/null @@ -1,13 +0,0 @@ -const { react } = require('@monkvision/jest-config'); - -module.exports = { - ...react({ monorepo: true }), - coverageThreshold: { - global: { - branches: 0, - functions: 0, - lines: 0, - statements: 0, - }, - }, -}; diff --git a/apps/demo-app-video/package.json b/apps/demo-app-video/package.json deleted file mode 100644 index 86b5f415f..000000000 --- a/apps/demo-app-video/package.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "name": "monk-demo-app-video", - "version": "4.5.5", - "license": "BSD-3-Clause-Clear", - "packageManager": "yarn@3.2.4", - "description": "MonkJs demo app for Video capture with React and TypeScript", - "author": "monkvision", - "private": true, - "scripts": { - "start": "env-cmd -e local react-scripts start", - "build:development": "env-cmd -e development react-scripts build", - "build:staging": "env-cmd -e staging react-scripts build", - "build:preview": "env-cmd -e preview react-scripts build", - "build:backend-staging-qa": "env-cmd -e backend-staging-qa react-scripts build", - "test": "jest --passWithNoTests", - "test:coverage": "jest --coverage --passWithNoTests", - "analyze": "source-map-explorer 'build/static/js/*.js'", - "eject": "react-scripts eject", - "prettier": "prettier --check ./src", - "prettier:fix": "prettier --write ./src", - "eslint": "eslint --format=pretty ./src", - "eslint:fix": "eslint --fix --format=pretty ./src", - "lint": "yarn run prettier && yarn run eslint", - "lint:fix": "yarn run prettier:fix && yarn run eslint:fix" - }, - "dependencies": { - "@auth0/auth0-react": "^2.2.4", - "@monkvision/analytics": "4.5.5", - "@monkvision/common": "4.5.5", - "@monkvision/common-ui-web": "4.5.5", - "@monkvision/inspection-capture-web": "4.5.5", - "@monkvision/monitoring": "4.5.5", - "@monkvision/network": "4.5.5", - "@monkvision/posthog": "4.5.5", - "@monkvision/sentry": "4.5.5", - "@monkvision/sights": "4.5.5", - "@monkvision/types": "4.5.5", - "@types/babel__core": "^7", - "@types/jest": "^27.5.2", - "@types/node": "^16.18.18", - "@types/react": "^17.0.2", - "@types/react-dom": "^17.0.2", - "@types/react-router-dom": "^5.3.3", - "@types/sort-by": "^1", - "axios": "^1.5.0", - "i18next": "^23.4.5", - "i18next-browser-languagedetector": "^7.1.0", - "jest-watch-typeahead": "^2.2.2", - "localforage": "^1.10.0", - "match-sorter": "^6.3.4", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-i18next": "^13.2.0", - "react-router-dom": "^6.22.3", - "react-scripts": "5.0.1", - "sort-by": "^1.2.0", - "source-map-explorer": "^2.5.3", - "typescript": "^4.9.5", - "web-vitals": "^2.1.4" - }, - "devDependencies": { - "@babel/core": "^7.22.9", - "@monkvision/eslint-config-base": "4.5.5", - "@monkvision/eslint-config-typescript": "4.5.5", - "@monkvision/eslint-config-typescript-react": "4.5.5", - "@monkvision/jest-config": "4.5.5", - "@monkvision/prettier-config": "4.5.5", - "@monkvision/test-utils": "4.5.5", - "@monkvision/typescript-config": "4.5.5", - "@testing-library/dom": "^8.20.0", - "@testing-library/jest-dom": "^5.16.5", - "@testing-library/react": "^12.1.5", - "@testing-library/react-hooks": "^8.0.1", - "@testing-library/user-event": "^12.1.5", - "@typescript-eslint/eslint-plugin": "^5.43.0", - "@typescript-eslint/parser": "^5.43.0", - "env-cmd": "^10.1.0", - "eslint": "^8.29.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-prettier": "^8.5.0", - "eslint-formatter-pretty": "^4.1.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jest": "^25.3.0", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-react": "^7.27.1", - "eslint-plugin-react-hooks": "^4.3.0", - "eslint-utils": "^3.0.0", - "jest": "^29.3.1", - "prettier": "^2.7.1", - "regexpp": "^3.2.0", - "ts-jest": "^29.0.3" - }, - "prettier": "@monkvision/prettier-config", - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} diff --git a/apps/demo-app-video/public/favicon.ico b/apps/demo-app-video/public/favicon.ico deleted file mode 100644 index 6e6a629b0..000000000 Binary files a/apps/demo-app-video/public/favicon.ico and /dev/null differ diff --git a/apps/demo-app-video/public/index.html b/apps/demo-app-video/public/index.html deleted file mode 100644 index 0c27df4db..000000000 --- a/apps/demo-app-video/public/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - Vehicle Inspection - - - -
- - diff --git a/apps/demo-app-video/public/logo192.png b/apps/demo-app-video/public/logo192.png deleted file mode 100644 index 0690e33a3..000000000 Binary files a/apps/demo-app-video/public/logo192.png and /dev/null differ diff --git a/apps/demo-app-video/public/logo512.png b/apps/demo-app-video/public/logo512.png deleted file mode 100644 index 03813dd12..000000000 Binary files a/apps/demo-app-video/public/logo512.png and /dev/null differ diff --git a/apps/demo-app-video/public/manifest.json b/apps/demo-app-video/public/manifest.json deleted file mode 100644 index 5634c25b3..000000000 --- a/apps/demo-app-video/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "Monk Demo App", - "name": "Monk Inspection Demo Application", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#274B9F", - "background_color": "#202020" -} diff --git a/apps/demo-app-video/public/robots.txt b/apps/demo-app-video/public/robots.txt deleted file mode 100644 index e9e57dc4d..000000000 --- a/apps/demo-app-video/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/apps/demo-app-video/src/components/App.tsx b/apps/demo-app-video/src/components/App.tsx deleted file mode 100644 index b86bf83c1..000000000 --- a/apps/demo-app-video/src/components/App.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { Outlet, useNavigate } from 'react-router-dom'; -import { getEnvOrThrow, MonkProvider } from '@monkvision/common'; -import { useTranslation } from 'react-i18next'; -import { LiveConfigAppProvider } from '@monkvision/common-ui-web'; -import { LiveConfig } from '@monkvision/types'; -import { Page } from '../pages'; -import * as config from '../local-config.json'; -import { AppContainer } from './AppContainer'; - -const localConfig = - process.env['REACT_APP_USE_LOCAL_CONFIG'] === 'true' - ? (config as unknown as LiveConfig) - : undefined; - -export function App() { - const navigate = useNavigate(); - const { i18n } = useTranslation(); - - return ( - navigate(Page.CREATE_INSPECTION)} - onFetchLanguage={(lang) => i18n.changeLanguage(lang)} - lang={i18n.language} - > - - - - - - - ); -} diff --git a/apps/demo-app-video/src/components/AppContainer.tsx b/apps/demo-app-video/src/components/AppContainer.tsx deleted file mode 100644 index 2f56046c5..000000000 --- a/apps/demo-app-video/src/components/AppContainer.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { PropsWithChildren } from 'react'; -import { MonkThemeProvider, useMonkAppState, useMonkTheme } from '@monkvision/common'; - -function RootStylesContainer({ children }: PropsWithChildren) { - const { rootStyles } = useMonkTheme(); - - return ( -
- {children} -
- ); -} - -export function AppContainer({ children }: PropsWithChildren) { - const { config } = useMonkAppState(); - - return ( - - {children} - - ); -} diff --git a/apps/demo-app-video/src/components/AppRouter.tsx b/apps/demo-app-video/src/components/AppRouter.tsx deleted file mode 100644 index f4e88010a..000000000 --- a/apps/demo-app-video/src/components/AppRouter.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { MemoryRouter, Navigate, Route, Routes } from 'react-router-dom'; -import { AuthGuard } from '@monkvision/common-ui-web'; -import { - CreateInspectionPage, - InspectionCompletePage, - LoginPage, - Page, - VideoCapturePage, -} from '../pages'; -import { App } from './App'; - -export function AppRouter() { - return ( - - - }> - } /> - } /> - } /> - - - - } - index - /> - - - - } - index - /> - } /> - - - - ); -} diff --git a/apps/demo-app-video/src/components/index.ts b/apps/demo-app-video/src/components/index.ts deleted file mode 100644 index 724f3116e..000000000 --- a/apps/demo-app-video/src/components/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './App'; -export * from './AppRouter'; -export * from './AppContainer'; diff --git a/apps/demo-app-video/src/i18n.ts b/apps/demo-app-video/src/i18n.ts deleted file mode 100644 index be8ddfaeb..000000000 --- a/apps/demo-app-video/src/i18n.ts +++ /dev/null @@ -1,28 +0,0 @@ -import i18n from 'i18next'; -import I18nextBrowserLanguageDetector from 'i18next-browser-languagedetector'; -import { initReactI18next } from 'react-i18next'; -import { monkLanguages } from '@monkvision/types'; -import en from './translations/en.json'; -import fr from './translations/fr.json'; -import de from './translations/de.json'; -import nl from './translations/nl.json'; - -i18n - .use(I18nextBrowserLanguageDetector) - .use(initReactI18next) - .init({ - compatibilityJSON: 'v3', - fallbackLng: 'en', - interpolation: { escapeValue: false }, - supportedLngs: monkLanguages, - nonExplicitSupportedLngs: true, - resources: { - en: { translation: en }, - fr: { translation: fr }, - de: { translation: de }, - nl: { translation: nl }, - }, - }) - .catch(console.error); - -export default i18n; diff --git a/apps/demo-app-video/src/index.css b/apps/demo-app-video/src/index.css deleted file mode 100644 index 404c8fcb4..000000000 --- a/apps/demo-app-video/src/index.css +++ /dev/null @@ -1,16 +0,0 @@ -html, -body, -#root, -.app-container { - height: 100dvh; - width: 100%; - text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; -} - -body { - margin: 0; - background-color: #000000; - font-family: sans-serif; - color: white; -} diff --git a/apps/demo-app-video/src/index.tsx b/apps/demo-app-video/src/index.tsx deleted file mode 100644 index 9a5832da1..000000000 --- a/apps/demo-app-video/src/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import ReactDOM from 'react-dom'; -import { MonitoringProvider } from '@monkvision/monitoring'; -import { AnalyticsProvider } from '@monkvision/analytics'; -import { Auth0Provider } from '@auth0/auth0-react'; -import { getEnvOrThrow } from '@monkvision/common'; -import { sentryMonitoringAdapter } from './sentry'; -import { posthogAnalyticsAdapter } from './posthog'; -import { AppRouter } from './components'; -import './index.css'; -import './i18n'; - -ReactDOM.render( - - - - - - - , - document.getElementById('root'), -); diff --git a/apps/demo-app-video/src/local-config.json b/apps/demo-app-video/src/local-config.json deleted file mode 100644 index 70228dee8..000000000 --- a/apps/demo-app-video/src/local-config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "demo-app-video-local", - "description": "Config for the local Video Demo App.", - "workflow": "video", - "allowManualLogin": true, - "fetchFromSearchParams": true, - "allowCreateInspection": true, - "createInspectionOptions": { - "tasks": ["damage_detection"], - "isVideoCapture": true - }, - "apiDomain": "api.preview.monk.ai/v1", - "thumbnailDomain": "europe-west1-monk-preview-321715.cloudfunctions.net/image_resize", - "startTasksOnComplete": true, - "enforceOrientation": "portrait", - "minRecordingDuration": 15000, - "maxRetryCount": 3, - "maxUploadDurationWarning": 15000, - "useAdaptiveImageQuality": true, - "format": "image/jpeg", - "quality": 0.6, - "resolution": "4K", - "allowImageUpscaling": false, - "requiredApiPermissions": [ - "monk_core_api:compliances", - "monk_core_api:damage_detection", - "monk_core_api:images_ocr", - "monk_core_api:wheel_analysis", - "monk_core_api:inspections:create", - "monk_core_api:inspections:read", - "monk_core_api:inspections:update", - "monk_core_api:inspections:write" - ] -} diff --git a/apps/demo-app-video/src/pages/CreateInspectionPage/CreateInspectionPage.module.css b/apps/demo-app-video/src/pages/CreateInspectionPage/CreateInspectionPage.module.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/demo-app-video/src/pages/CreateInspectionPage/CreateInspectionPage.tsx b/apps/demo-app-video/src/pages/CreateInspectionPage/CreateInspectionPage.tsx deleted file mode 100644 index 2f8763f99..000000000 --- a/apps/demo-app-video/src/pages/CreateInspectionPage/CreateInspectionPage.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { useTranslation } from 'react-i18next'; -import { useNavigate } from 'react-router-dom'; -import { CreateInspection } from '@monkvision/common-ui-web'; -import { Page } from '../pages'; - -export function CreateInspectionPage() { - const navigate = useNavigate(); - const { i18n } = useTranslation(); - - return ( - navigate(Page.VIDEO_CAPTURE)} - lang={i18n.language} - /> - ); -} diff --git a/apps/demo-app-video/src/pages/CreateInspectionPage/index.ts b/apps/demo-app-video/src/pages/CreateInspectionPage/index.ts deleted file mode 100644 index cd6c862e8..000000000 --- a/apps/demo-app-video/src/pages/CreateInspectionPage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './CreateInspectionPage'; diff --git a/apps/demo-app-video/src/pages/InspectionCompletePage/InspectionCompletePage.module.css b/apps/demo-app-video/src/pages/InspectionCompletePage/InspectionCompletePage.module.css deleted file mode 100644 index 388f806e2..000000000 --- a/apps/demo-app-video/src/pages/InspectionCompletePage/InspectionCompletePage.module.css +++ /dev/null @@ -1,12 +0,0 @@ -.container { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - font-size: 20px; - text-align: center; - padding: 20px; - box-sizing: border-box; -} diff --git a/apps/demo-app-video/src/pages/InspectionCompletePage/InspectionCompletePage.tsx b/apps/demo-app-video/src/pages/InspectionCompletePage/InspectionCompletePage.tsx deleted file mode 100644 index aeebf187e..000000000 --- a/apps/demo-app-video/src/pages/InspectionCompletePage/InspectionCompletePage.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { useTranslation } from 'react-i18next'; -import styles from './InspectionCompletePage.module.css'; - -export function InspectionCompletePage() { - const { t } = useTranslation(); - - return
{t('inspection-complete.thank-message')}
; -} diff --git a/apps/demo-app-video/src/pages/InspectionCompletePage/index.ts b/apps/demo-app-video/src/pages/InspectionCompletePage/index.ts deleted file mode 100644 index 8371ececb..000000000 --- a/apps/demo-app-video/src/pages/InspectionCompletePage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './InspectionCompletePage'; diff --git a/apps/demo-app-video/src/pages/LoginPage/LoginPage.module.css b/apps/demo-app-video/src/pages/LoginPage/LoginPage.module.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/demo-app-video/src/pages/LoginPage/LoginPage.tsx b/apps/demo-app-video/src/pages/LoginPage/LoginPage.tsx deleted file mode 100644 index 3dd42f596..000000000 --- a/apps/demo-app-video/src/pages/LoginPage/LoginPage.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { useNavigate } from 'react-router-dom'; -import { Login } from '@monkvision/common-ui-web'; -import { useTranslation } from 'react-i18next'; -import { Page } from '../pages'; - -export function LoginPage() { - const { i18n } = useTranslation(); - const navigate = useNavigate(); - - return navigate(Page.CREATE_INSPECTION)} />; -} diff --git a/apps/demo-app-video/src/pages/LoginPage/index.ts b/apps/demo-app-video/src/pages/LoginPage/index.ts deleted file mode 100644 index f772190eb..000000000 --- a/apps/demo-app-video/src/pages/LoginPage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './LoginPage'; diff --git a/apps/demo-app-video/src/pages/VideoCapturePage/VideoCapturePage.module.css b/apps/demo-app-video/src/pages/VideoCapturePage/VideoCapturePage.module.css deleted file mode 100644 index 8b5fde5ec..000000000 --- a/apps/demo-app-video/src/pages/VideoCapturePage/VideoCapturePage.module.css +++ /dev/null @@ -1,12 +0,0 @@ -.container { - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; -} - -.error-message { - text-align: center; - padding-bottom: 20px; -} diff --git a/apps/demo-app-video/src/pages/VideoCapturePage/VideoCapturePage.tsx b/apps/demo-app-video/src/pages/VideoCapturePage/VideoCapturePage.tsx deleted file mode 100644 index 7e3dcfd35..000000000 --- a/apps/demo-app-video/src/pages/VideoCapturePage/VideoCapturePage.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { useTranslation } from 'react-i18next'; -import { VideoCapture } from '@monkvision/inspection-capture-web'; -import { useMonkAppState } from '@monkvision/common'; -import { CaptureWorkflow } from '@monkvision/types'; -import { useNavigate } from 'react-router-dom'; -import { Page } from '../pages'; -import styles from './VideoCapturePage.module.css'; - -export function VideoCapturePage() { - const { i18n } = useTranslation(); - const navigate = useNavigate(); - const { config, authToken, inspectionId } = useMonkAppState({ - requireInspection: true, - requireWorkflow: CaptureWorkflow.VIDEO, - }); - - const handleComplete = () => { - navigate(Page.INSPECTION_COMPLETE); - }; - - return ( -
- -
- ); -} diff --git a/apps/demo-app-video/src/pages/VideoCapturePage/index.ts b/apps/demo-app-video/src/pages/VideoCapturePage/index.ts deleted file mode 100644 index 061d5e6dd..000000000 --- a/apps/demo-app-video/src/pages/VideoCapturePage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './VideoCapturePage'; diff --git a/apps/demo-app-video/src/pages/index.ts b/apps/demo-app-video/src/pages/index.ts deleted file mode 100644 index 29940989d..000000000 --- a/apps/demo-app-video/src/pages/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './pages'; -export * from './LoginPage'; -export * from './CreateInspectionPage'; -export * from './VideoCapturePage'; -export * from './InspectionCompletePage'; diff --git a/apps/demo-app-video/src/pages/pages.ts b/apps/demo-app-video/src/pages/pages.ts deleted file mode 100644 index 5496c56e8..000000000 --- a/apps/demo-app-video/src/pages/pages.ts +++ /dev/null @@ -1,6 +0,0 @@ -export enum Page { - LOG_IN = '/log-in', - CREATE_INSPECTION = '/create-inspection', - VIDEO_CAPTURE = '/video-capture', - INSPECTION_COMPLETE = '/inspection-complete', -} diff --git a/apps/demo-app-video/src/posthog.ts b/apps/demo-app-video/src/posthog.ts deleted file mode 100644 index b10d03bbd..000000000 --- a/apps/demo-app-video/src/posthog.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PosthogAnalyticsAdapter } from '@monkvision/posthog'; -import { getEnvOrThrow } from '@monkvision/common'; - -export const posthogAnalyticsAdapter = new PosthogAnalyticsAdapter({ - token: 'phc_9mKWu5rYzvrUT6Bo3bTzrclNa5sOILKthH9BA9sna0M', - api_host: 'https://eu.posthog.com', - environnement: getEnvOrThrow('REACT_APP_ENVIRONMENT'), - projectName: 'demo-app', - release: '1.0.0', -}); diff --git a/apps/demo-app-video/src/react-app-env.d.ts b/apps/demo-app-video/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5fc..000000000 --- a/apps/demo-app-video/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/apps/demo-app-video/src/sentry.ts b/apps/demo-app-video/src/sentry.ts deleted file mode 100644 index ac97afe24..000000000 --- a/apps/demo-app-video/src/sentry.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { SentryMonitoringAdapter } from '@monkvision/sentry'; -import { getEnvOrThrow } from '@monkvision/common'; - -export const sentryMonitoringAdapter = new SentryMonitoringAdapter({ - dsn: getEnvOrThrow('REACT_APP_SENTRY_DSN'), - environment: getEnvOrThrow('REACT_APP_ENVIRONMENT'), - debug: process.env['REACT_APP_SENTRY_DEBUG'] === 'true', - tracesSampleRate: 0.025, - release: '1.0', -}); diff --git a/apps/demo-app-video/src/setupTests.ts b/apps/demo-app-video/src/setupTests.ts deleted file mode 100644 index 8f2609b7b..000000000 --- a/apps/demo-app-video/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/apps/demo-app-video/src/translations/de.json b/apps/demo-app-video/src/translations/de.json deleted file mode 100644 index e5017015e..000000000 --- a/apps/demo-app-video/src/translations/de.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "inspection-complete": { - "thank-message": "Vielen Dank, dass Sie sich die Zeit genommen haben, die Inspektion durchzuführen." - } -} diff --git a/apps/demo-app-video/src/translations/en.json b/apps/demo-app-video/src/translations/en.json deleted file mode 100644 index ed563f756..000000000 --- a/apps/demo-app-video/src/translations/en.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "inspection-complete": { - "thank-message": "Thank you for taking the time to complete the inspection." - } -} diff --git a/apps/demo-app-video/src/translations/fr.json b/apps/demo-app-video/src/translations/fr.json deleted file mode 100644 index c6c4b3bf1..000000000 --- a/apps/demo-app-video/src/translations/fr.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "inspection-complete": { - "thank-message": "Merci d'avoir pris le temps pour compléter l'inspection." - } -} diff --git a/apps/demo-app-video/src/translations/nl.json b/apps/demo-app-video/src/translations/nl.json deleted file mode 100644 index 233b8b728..000000000 --- a/apps/demo-app-video/src/translations/nl.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "inspection-complete": { - "thank-message": "Bedankt voor het nemen van de tijd om de inspectie te voltooien." - } -} diff --git a/apps/demo-app-video/tsconfig.build.json b/apps/demo-app-video/tsconfig.build.json deleted file mode 100644 index 73e2cff13..000000000 --- a/apps/demo-app-video/tsconfig.build.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["src"], - "exclude": ["test"] -} diff --git a/apps/demo-app-video/tsconfig.json b/apps/demo-app-video/tsconfig.json deleted file mode 100644 index 60b0893a5..000000000 --- a/apps/demo-app-video/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "@monkvision/typescript-config/tsconfig.react.json", - "include": ["src", "test"] -} diff --git a/yarn.lock b/yarn.lock index 0161eb8c2..a6f989692 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15369,79 +15369,6 @@ __metadata: languageName: node linkType: hard -"monk-demo-app-video@workspace:apps/demo-app-video": - version: 0.0.0-use.local - resolution: "monk-demo-app-video@workspace:apps/demo-app-video" - dependencies: - "@auth0/auth0-react": ^2.2.4 - "@babel/core": ^7.22.9 - "@monkvision/analytics": 4.5.5 - "@monkvision/common": 4.5.5 - "@monkvision/common-ui-web": 4.5.5 - "@monkvision/eslint-config-base": 4.5.5 - "@monkvision/eslint-config-typescript": 4.5.5 - "@monkvision/eslint-config-typescript-react": 4.5.5 - "@monkvision/inspection-capture-web": 4.5.5 - "@monkvision/jest-config": 4.5.5 - "@monkvision/monitoring": 4.5.5 - "@monkvision/network": 4.5.5 - "@monkvision/posthog": 4.5.5 - "@monkvision/prettier-config": 4.5.5 - "@monkvision/sentry": 4.5.5 - "@monkvision/sights": 4.5.5 - "@monkvision/test-utils": 4.5.5 - "@monkvision/types": 4.5.5 - "@monkvision/typescript-config": 4.5.5 - "@testing-library/dom": ^8.20.0 - "@testing-library/jest-dom": ^5.16.5 - "@testing-library/react": ^12.1.5 - "@testing-library/react-hooks": ^8.0.1 - "@testing-library/user-event": ^12.1.5 - "@types/babel__core": ^7 - "@types/jest": ^27.5.2 - "@types/node": ^16.18.18 - "@types/react": ^17.0.2 - "@types/react-dom": ^17.0.2 - "@types/react-router-dom": ^5.3.3 - "@types/sort-by": ^1 - "@typescript-eslint/eslint-plugin": ^5.43.0 - "@typescript-eslint/parser": ^5.43.0 - axios: ^1.5.0 - env-cmd: ^10.1.0 - eslint: ^8.29.0 - eslint-config-airbnb-base: ^15.0.0 - eslint-config-prettier: ^8.5.0 - eslint-formatter-pretty: ^4.1.0 - eslint-plugin-eslint-comments: ^3.2.0 - eslint-plugin-import: ^2.26.0 - eslint-plugin-jest: ^25.3.0 - eslint-plugin-jsx-a11y: ^6.7.1 - eslint-plugin-prettier: ^4.2.1 - eslint-plugin-promise: ^6.1.1 - eslint-plugin-react: ^7.27.1 - eslint-plugin-react-hooks: ^4.3.0 - eslint-utils: ^3.0.0 - i18next: ^23.4.5 - i18next-browser-languagedetector: ^7.1.0 - jest: ^29.3.1 - jest-watch-typeahead: ^2.2.2 - localforage: ^1.10.0 - match-sorter: ^6.3.4 - prettier: ^2.7.1 - react: ^17.0.2 - react-dom: ^17.0.2 - react-i18next: ^13.2.0 - react-router-dom: ^6.22.3 - react-scripts: 5.0.1 - regexpp: ^3.2.0 - sort-by: ^1.2.0 - source-map-explorer: ^2.5.3 - ts-jest: ^29.0.3 - typescript: ^4.9.5 - web-vitals: ^2.1.4 - languageName: unknown - linkType: soft - "monk-demo-app@workspace:apps/demo-app": version: 0.0.0-use.local resolution: "monk-demo-app@workspace:apps/demo-app"