app-tutor-ai-consumer 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/.adr-dir +1 -0
  2. package/.github/CODEOWNERS +1 -0
  3. package/.github/pull_request_template.md +46 -0
  4. package/.github/workflows/jira.yaml +13 -0
  5. package/.github/workflows/merge-checker.yaml +14 -0
  6. package/.github/workflows/pr-agent.yaml +17 -0
  7. package/.github/workflows/production.yml +155 -0
  8. package/.github/workflows/quality.yml +63 -0
  9. package/.github/workflows/rollback.yml +133 -0
  10. package/.github/workflows/staging.yml +153 -0
  11. package/.husky/commit-msg +1 -0
  12. package/.husky/post-merge +1 -0
  13. package/.husky/pre-commit +1 -0
  14. package/.nvmrc +1 -0
  15. package/.prettierignore +8 -0
  16. package/.prettierrc +20 -0
  17. package/.releaserc.json +22 -0
  18. package/CHANGELOG.md +7 -0
  19. package/babel.config.js +3 -0
  20. package/catalog-info.yaml +21 -0
  21. package/commitlint.config.js +8 -0
  22. package/config/certs/.keep +0 -0
  23. package/config/certs/ssl-generate.sh +12 -0
  24. package/config/rspack/rspack.config.js +176 -0
  25. package/config/rspack/utils/alias.js +12 -0
  26. package/config/rspack/utils/devserver.config.js +34 -0
  27. package/config/rspack/utils/envs.js +39 -0
  28. package/config/rspack/utils/paths.js +29 -0
  29. package/config/rspack/utils/plugins.js +41 -0
  30. package/config/vitest/__mocks__/i18n.tsx +15 -0
  31. package/config/vitest/index.ts +1 -0
  32. package/config/vitest/polyfills/global.js +19 -0
  33. package/config/vitest/setupTests.ts +26 -0
  34. package/config/vitest/vitest.config.mts +47 -0
  35. package/docs/README.md +15 -0
  36. package/docs/architecture/decisions/index.md +0 -0
  37. package/docs/architecture/decisions/templates/template.md +82 -0
  38. package/docs/architecture/design/index.md +0 -0
  39. package/environments/.env.development +42 -0
  40. package/environments/.env.production +41 -0
  41. package/environments/.env.staging +40 -0
  42. package/environments/.env.test +41 -0
  43. package/eslint.config.mjs +87 -0
  44. package/mkdocs.yaml +11 -0
  45. package/package.json +130 -0
  46. package/postcss.config.js +3 -0
  47. package/public/favicon.ico +0 -0
  48. package/public/index.html +18 -0
  49. package/scripts/generate-icon-types.js +31 -0
  50. package/src/@types/declarations.d.ts +25 -0
  51. package/src/@types/env.d.ts +1 -0
  52. package/src/@types/global.types.ts +64 -0
  53. package/src/@types/index.d.ts +16 -0
  54. package/src/config/i18n/constants.ts +9 -0
  55. package/src/config/i18n/hooks/index.ts +1 -0
  56. package/src/config/i18n/hooks/use-app-lang/index.ts +1 -0
  57. package/src/config/i18n/hooks/use-app-lang/use-app-lang.tsx +22 -0
  58. package/src/config/i18n/index.ts +5 -0
  59. package/src/config/i18n/init.ts +44 -0
  60. package/src/config/i18n/types.ts +5 -0
  61. package/src/config/i18n/utils/get-lang.ts +10 -0
  62. package/src/config/styles/global.css +171 -0
  63. package/src/config/styles/index.css +5 -0
  64. package/src/config/styles/shared-styles.module.css +16 -0
  65. package/src/config/tests/abstract-mock-generator.ts +9 -0
  66. package/src/config/tests/customRenderHook.tsx +32 -0
  67. package/src/config/tests/handlers.ts +7 -0
  68. package/src/config/tests/index.ts +4 -0
  69. package/src/config/tests/mockRequest.tsx +36 -0
  70. package/src/config/tests/types.ts +10 -0
  71. package/src/config/tests/utils.tsx +38 -0
  72. package/src/config/tests/worker.ts +5 -0
  73. package/src/config/tests/wrappers.tsx +50 -0
  74. package/src/development-bootstrap.tsx +26 -0
  75. package/src/index.tsx +26 -0
  76. package/src/lib/components/icons/icon-names.d.ts +2 -0
  77. package/src/lib/components/icons/icon.tsx +41 -0
  78. package/src/lib/components/icons/index.ts +1 -0
  79. package/src/lib/components/icons/send.svg +3 -0
  80. package/src/lib/components/index.ts +1 -0
  81. package/src/lib/components/spinner/index.ts +2 -0
  82. package/src/lib/components/spinner/spinner.tsx +25 -0
  83. package/src/lib/components/spinner/styles.module.css +31 -0
  84. package/src/lib/components/spinner/types.ts +1 -0
  85. package/src/lib/hooks/index.ts +1 -0
  86. package/src/lib/hooks/use-default-id/index.ts +1 -0
  87. package/src/lib/hooks/use-default-id/use-default-id.tsx +13 -0
  88. package/src/lib/utils/constants.ts +2 -0
  89. package/src/lib/utils/http-codes.ts +13 -0
  90. package/src/lib/utils/index.ts +3 -0
  91. package/src/lib/utils/languages.ts +7 -0
  92. package/src/main/index.ts +1 -0
  93. package/src/main/main.spec.tsx +15 -0
  94. package/src/main/main.tsx +27 -0
  95. package/src/main/styles.module.css +15 -0
  96. package/src/modules/create-message/components/chat-input/chat-input.tsx +29 -0
  97. package/src/modules/create-message/components/chat-input/index.ts +2 -0
  98. package/src/modules/create-message/components/chat-input/types.ts +3 -0
  99. package/src/modules/create-message/components/index.ts +1 -0
  100. package/src/modules/widget/components/ai-avatar/ai-avatar.tsx +59 -0
  101. package/src/modules/widget/components/ai-avatar/index.ts +1 -0
  102. package/src/modules/widget/components/greetings-card/greetings-card.tsx +40 -0
  103. package/src/modules/widget/components/greetings-card/index.ts +1 -0
  104. package/src/modules/widget/components/greetings-card/styles.module.css +9 -0
  105. package/src/modules/widget/components/index.ts +1 -0
  106. package/src/modules/widget/events.ts +21 -0
  107. package/src/modules/widget/index.ts +2 -0
  108. package/src/modules/widget/types.ts +7 -0
  109. package/src/types.ts +23 -0
  110. package/tailwind.config.js +8 -0
  111. package/tsconfig.json +128 -0
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ presets: ['@babel/preset-react', '@babel/preset-env', '@babel/preset-typescript']
3
+ }
@@ -0,0 +1,21 @@
1
+ apiVersion: backstage.io/v1alpha1
2
+ kind: Component
3
+ metadata:
4
+ namespace: hotmart-org
5
+ name: app-tutor-ai-consumer
6
+ description: Consumer components library for Hotmart Tutor Widget
7
+ tags: []
8
+ annotations:
9
+ github.com/project-slug: Hotmart-Org/app-tutor-ai-consumer
10
+ backstage.io/techdocs-ref: dir:.
11
+ spec:
12
+ type: microfront
13
+ lifecycle: experimental
14
+ owner: learning-experience
15
+ system: club
16
+ heimdall:
17
+ reportable: false
18
+ pci: false
19
+ impact: >
20
+ Tutor App widget will be offiline
21
+ squads: []
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ extends: ['@commitlint/config-conventional'],
3
+ ignores: [(message) => /^Bumps \\[.+]\\(.+\\) from .+ to .+\\.$/m.test(message)],
4
+ rules: {
5
+ 'body-max-line-length': [0],
6
+ 'footer-max-line-length': [0]
7
+ }
8
+ }
File without changes
@@ -0,0 +1,12 @@
1
+ # Step: 1
2
+ # Install mkcert tool - macOS; you can see the mkcert repo for details
3
+ brew install mkcert
4
+ # Step: 2
5
+ # Install nss (only needed if you use Firefox)
6
+ brew install nss
7
+ # Step: 3
8
+ # Setup mkcert on your machine (creates a CA)
9
+ mkcert -install
10
+ # Step: 4 (Final)
11
+ # at the project root directory run the following command
12
+ mkcert local.buildstaging.com localhost 127.0.0.1 ::1
@@ -0,0 +1,176 @@
1
+ const path = require('path')
2
+ const rspack = require('@rspack/core')
3
+ const packageJSON = require('../../package.json')
4
+ const { TsCheckerRspackPlugin } = require('ts-checker-rspack-plugin')
5
+ const paths = require('./utils/paths')
6
+ const alias = require('./utils/alias')
7
+ const { getEnvironmentPlugins } = require('./utils/plugins')
8
+
9
+ require('dotenv').config({
10
+ path: path.resolve(__dirname, `../../environments/.env.${process.env.NODE_ENV}`)
11
+ })
12
+
13
+ module.exports = async function (env) {
14
+ const productionMode = env?.production || env?.staging
15
+ const releaseFullName = `app-tutor-ai-consumer_v${packageJSON.version}`
16
+ const fileVersion = `${productionMode ? 'prod' : 'dev'}-${packageJSON?.version}`
17
+ const bundlePath = !productionMode
18
+ ? `${process?.env?.BUNDLE_PATH}/`
19
+ : `${process?.env?.BUNDLE_PATH}/${process.env.APP_NAME}/_current/`
20
+
21
+ /**
22
+ * @type {import('@rspack/cli').Configuration}
23
+ */
24
+ const config = {
25
+ mode: productionMode ? 'production' : 'development',
26
+ entry: productionMode ? paths.INDEX : paths.DEV_BOOTSTRAP,
27
+ ...(productionMode ? {} : require('./utils/devserver.config')),
28
+ optimization: {
29
+ usedExports: true,
30
+ ...(productionMode
31
+ ? {
32
+ minimize: true,
33
+ minimizer: [
34
+ new rspack.SwcJsMinimizerRspackPlugin({
35
+ minimizerOptions: {
36
+ compress: { passes: 4 }
37
+ },
38
+ extractComments: false
39
+ }),
40
+ new rspack.LightningCssMinimizerRspackPlugin()
41
+ ]
42
+ }
43
+ : {})
44
+ },
45
+ output: {
46
+ path: paths.DIST,
47
+ publicPath: bundlePath,
48
+ pathinfo: !productionMode,
49
+ filename: `[name].[fullhash].${fileVersion}.js`,
50
+ chunkFilename: `[name].[fullhash].chunk.${fileVersion}.js`,
51
+ sourceMapFilename: `[name].[fullhash].${fileVersion}.js.map`,
52
+ clean: true
53
+ },
54
+ devtool: productionMode ? false : 'cheap-module-source-map',
55
+ resolve: {
56
+ symlinks: !productionMode,
57
+ extensions: ['.tsx', '.ts', '.js', '.json'],
58
+ fallback: { 'process/browser': require.resolve('process/browser') },
59
+ alias
60
+ },
61
+ module: {
62
+ rules: [
63
+ {
64
+ test: /\.(js|tsx?)$/,
65
+ use: [
66
+ {
67
+ loader: 'builtin:swc-loader',
68
+ options: {
69
+ sourceMaps: !productionMode,
70
+ jsc: {
71
+ parser: {
72
+ syntax: 'typescript',
73
+ tsx: true
74
+ },
75
+ transform: {
76
+ react: {
77
+ runtime: 'automatic',
78
+ development: !productionMode,
79
+ refresh: !productionMode
80
+ }
81
+ }
82
+ },
83
+ env: {
84
+ targets: ['>0.2%', 'not dead', 'not ie <= 11', 'not op_mini all']
85
+ }
86
+ }
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ test: /\.css$/,
92
+ resourceQuery: { not: [/inline/] },
93
+ use: [
94
+ {
95
+ loader: !productionMode ? 'style-loader' : rspack.CssExtractRspackPlugin.loader,
96
+ options: {
97
+ attributes: {
98
+ [`mfe-${process.env.APP_NAME}-root`]: true
99
+ }
100
+ }
101
+ },
102
+ {
103
+ loader: 'css-loader',
104
+ options: {
105
+ sourceMaps: !productionMode,
106
+ modules: {
107
+ auto: true,
108
+ namedExport: false,
109
+ localIdentName: `[path][name]__[local]--[hash:base64:5]`
110
+ }
111
+ }
112
+ },
113
+ {
114
+ loader: 'postcss-loader',
115
+ options: {
116
+ postcssOptions: {
117
+ config: path.resolve(paths.ROOT, 'postcss.config.js')
118
+ }
119
+ }
120
+ }
121
+ ]
122
+ },
123
+ {
124
+ test: /\.svg$/,
125
+ resourceQuery: { not: [/url/] },
126
+ use: [
127
+ {
128
+ loader: '@svgr/webpack',
129
+ options: {
130
+ svgo: false,
131
+ titleProp: true,
132
+ ref: true
133
+ }
134
+ }
135
+ ],
136
+ type: 'javascript/auto'
137
+ },
138
+ {
139
+ test: /\.svg$/,
140
+ type: 'asset/resource',
141
+ resourceQuery: /url/, // *.svg?url
142
+ use: [
143
+ {
144
+ loader: 'file-loader',
145
+ options: {
146
+ name: '[name].[ext]'
147
+ }
148
+ }
149
+ ],
150
+ type: 'javascript/auto'
151
+ },
152
+ { test: /\.(png|jpe?g|gif|ico)$/, type: 'asset' }
153
+ ]
154
+ },
155
+ plugins: [
156
+ new rspack.ProvidePlugin({
157
+ process: 'process/browser'
158
+ }),
159
+ new rspack.DefinePlugin({
160
+ 'process.env.PROJECT_VERSION': JSON.stringify(packageJSON.version),
161
+ 'process.env.TARGET_ENV': JSON.stringify(process.env.NODE_ENV)
162
+ }),
163
+ new rspack.ProgressPlugin(),
164
+ new TsCheckerRspackPlugin(),
165
+ new rspack.HtmlRspackPlugin({
166
+ template: path.resolve(paths.PUBLIC, 'index.html'),
167
+ favicon: path.resolve(paths.PUBLIC, 'favicon.ico')
168
+ })
169
+ ].concat(await getEnvironmentPlugins(!productionMode)),
170
+ watchOptions: {
171
+ ignored: /node_modules/
172
+ }
173
+ }
174
+
175
+ return config
176
+ }
@@ -0,0 +1,12 @@
1
+ const paths = require('./paths')
2
+
3
+ module.exports = {
4
+ '@/app': paths.APP,
5
+ '@/assets': paths.ASSETS,
6
+ '@/config': paths.SRC_CONFIG,
7
+ '@/global_config': paths.CONFIG,
8
+ '@/lib': paths.LIB,
9
+ '@/public': paths.PUBLIC,
10
+ '@/root': paths.ROOT,
11
+ '@/src': paths.SRC
12
+ }
@@ -0,0 +1,34 @@
1
+ const path = require('path')
2
+ const { readFileSync } = require('fs')
3
+ const paths = require('./paths')
4
+
5
+ /**
6
+ * @type {import('@rspack/cli').Configuration['devServer']}
7
+ */
8
+ module.exports = {
9
+ devServer: {
10
+ host: process.env.APP_HOST,
11
+ port: process.env.APP_PORT,
12
+ historyApiFallback: true,
13
+ hot: true,
14
+ compress: true,
15
+ headers: {
16
+ 'Access-Control-Allow-Origin': '*',
17
+ 'Access-Control-Allow-Headers': 'X-Requested-With'
18
+ },
19
+ static: {
20
+ directory: paths.DIST
21
+ },
22
+ server: {
23
+ type: 'https',
24
+ options: {
25
+ key: readFileSync(
26
+ path.resolve(__dirname, '..', '..', 'certs', `${process.env.APP_HOST}+3-key.pem`)
27
+ ),
28
+ cert: readFileSync(
29
+ path.resolve(__dirname, '..', '..', 'certs', `${process.env.APP_HOST}+3.pem`)
30
+ )
31
+ }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,39 @@
1
+ const envs = [
2
+ 'ENVIRONMENT',
3
+ 'CAS_CLIENT_ID',
4
+ 'IS_CAS',
5
+ 'APP_HOST',
6
+ 'APP_PORT',
7
+ 'APP_NAME',
8
+ 'API_CONTENT_PLATFORM_SPACE',
9
+ 'API_HOTMART_TUTOR',
10
+ 'OPTIMIZELY_SDK_KEY',
11
+ 'FIREBASE_API_KEY',
12
+ 'FIREBASE_AUTH_DOMAIN',
13
+ 'FIREBASE_DATABASE_URL',
14
+ 'FIREBASE_MESSAGING_SENDER_ID',
15
+ 'FIREBASE_PROJECT_ID',
16
+ 'FIREBASE_STORAGE_BUCKET',
17
+ 'API_CONVERSATION_URL',
18
+ 'API_AUTH_URL',
19
+ 'USER_VLC',
20
+ 'VLC_PASSWORD',
21
+ 'SECURITY_BASE_URL',
22
+ 'AUTH_CLIENT_SECRET',
23
+ 'BUNDLE_PATH'
24
+ ]
25
+
26
+ const localEnvs = ['MEMBERSHIP_SLUG']
27
+
28
+ const prodEnvs = ['APP_HOST_MF']
29
+
30
+ const devEnvs = [...envs, ...localEnvs]
31
+
32
+ const allEnvs = [...envs, ...prodEnvs]
33
+
34
+ module.exports = {
35
+ envs,
36
+ prodEnvs,
37
+ devEnvs,
38
+ allEnvs
39
+ }
@@ -0,0 +1,29 @@
1
+ const path = require('path')
2
+
3
+ const resolve = (pathname) => path.resolve(__dirname, pathname)
4
+ const root = '../../..'
5
+
6
+ module.exports = {
7
+ APP: resolve(`${root}/src/main`),
8
+ ASSETS: resolve(`${root}/src/assets`),
9
+ CONFIG: resolve(`${root}/config`),
10
+ DIST: resolve(`${root}/dist`),
11
+ ENV: {
12
+ development: resolve(`${root}/environments/.env.development`),
13
+ production: resolve(`${root}/environments/.env.production`),
14
+ staging: resolve(`${root}/environments/.env.staging`)
15
+ },
16
+ INDEX: resolve(`${root}/src/index`),
17
+ DEV_BOOTSTRAP: resolve(`${root}/src/development-bootstrap`),
18
+ LIB: resolve(`${root}/src/lib`),
19
+ NODE_MODULES: resolve(`${root}/node_modules`),
20
+ PUBLIC: resolve(`${root}/public`),
21
+ ROOT: resolve(root),
22
+ SRC: resolve(`${root}/src`),
23
+ SRC_CONFIG: resolve(`${root}/src/config`),
24
+ TS_CONFIG: {
25
+ development: resolve(`${root}/tsconfig.json`),
26
+ production: resolve(`${root}/tsconfig.production.json`),
27
+ staging: resolve(`${root}/tsconfig.production.json`)
28
+ }
29
+ }
@@ -0,0 +1,41 @@
1
+ const refreshPlugin = require('@rspack/plugin-react-refresh')
2
+ const rspack = require('@rspack/core')
3
+ const { devEnvs, allEnvs } = require('./envs')
4
+ const CompressionPlugin = require('compression-webpack-plugin')
5
+
6
+ async function getEnvironmentPlugins(isDevelopment) {
7
+ if (isDevelopment) {
8
+ const res = await fetch(
9
+ `${process.env.SECURITY_BASE_URL}/security/oauth/token?grant_type=password&username=${process.env.USER_VLC}&password=${process.env.VLC_PASSWORD}`,
10
+ {
11
+ method: 'POST',
12
+ headers: { Authorization: process.env.AUTH_CLIENT_SECRET ?? '' }
13
+ }
14
+ )
15
+
16
+ const response = await res.json()
17
+
18
+ return [
19
+ new rspack.EnvironmentPlugin(devEnvs),
20
+ new rspack.DefinePlugin({
21
+ 'process.env.TOKEN': JSON.stringify(response.access_token)
22
+ }),
23
+ new refreshPlugin()
24
+ ]
25
+ }
26
+
27
+ return [
28
+ new rspack.EnvironmentPlugin(allEnvs),
29
+ new rspack.CssExtractRspackPlugin({
30
+ filename: '[name].[contenthash].css',
31
+ chunkFilename: '[id]-app-tutor-ai-consumer.css'
32
+ }),
33
+ new CompressionPlugin({
34
+ algorithm: 'gzip'
35
+ })
36
+ ]
37
+ }
38
+
39
+ module.exports = {
40
+ getEnvironmentPlugins
41
+ }
@@ -0,0 +1,15 @@
1
+ import type { PropsWithChildren } from 'react'
2
+
3
+ vi.mock('react-i18next', () => ({
4
+ useTranslation: () => ({
5
+ t: (key: string) => key,
6
+ i18n: { changeLanguage: () => new Promise(() => {}) },
7
+ ready: true
8
+ }),
9
+ Trans: ({ children }: PropsWithChildren) => children
10
+ }))
11
+
12
+ vi.mock('@/src/config/i18n', async () => ({
13
+ ...(await vi.importActual('@/src/config/i18n')),
14
+ useAppLang: vi.fn()
15
+ }))
@@ -0,0 +1 @@
1
+ export * from '../../src/config/tests'
@@ -0,0 +1,19 @@
1
+ import { Blob, File } from 'node:buffer'
2
+ import { TextDecoder, TextEncoder } from 'node:util'
3
+
4
+ Object.defineProperties(globalThis, {
5
+ TextDecoder: { value: TextDecoder },
6
+ TextEncoder: { value: TextEncoder }
7
+ })
8
+
9
+ import { fetch, FormData, Headers, Request, Response } from 'undici'
10
+
11
+ Object.defineProperties(globalThis, {
12
+ fetch: { value: fetch, writable: true },
13
+ Blob: { value: Blob },
14
+ File: { value: File },
15
+ Headers: { value: Headers },
16
+ FormData: { value: FormData },
17
+ Request: { value: Request },
18
+ Response: { value: Response }
19
+ })
@@ -0,0 +1,26 @@
1
+ import '@testing-library/jest-dom/vitest'
2
+
3
+ import { cleanup, configure } from '@testing-library/react'
4
+
5
+ import { serviceWorker } from '@/src/config/tests/worker'
6
+
7
+ configure({ testIdAttribute: 'data-test' })
8
+
9
+ beforeEach(() => {
10
+ cleanup()
11
+ })
12
+
13
+ // Start worker before all tests
14
+ beforeAll(() => {
15
+ serviceWorker.listen()
16
+ })
17
+
18
+ // Close serviceWorker after all tests
19
+ afterAll(() => {
20
+ serviceWorker.close()
21
+ })
22
+
23
+ // Reset handlers after each test `important for test isolation`
24
+ afterEach(() => {
25
+ serviceWorker.resetHandlers()
26
+ })
@@ -0,0 +1,47 @@
1
+ import react from '@vitejs/plugin-react'
2
+ import { config } from 'dotenv'
3
+ import tsconfigPaths from 'vite-tsconfig-paths'
4
+ import { defineConfig } from 'vitest/config'
5
+
6
+ export default defineConfig({
7
+ plugins: [react(), tsconfigPaths()],
8
+ test: {
9
+ environment: 'jsdom',
10
+ globals: true,
11
+ setupFiles: [
12
+ './config/vitest/setupTests.ts',
13
+ './config/vitest/__mocks__/i18n.tsx',
14
+ './config/vitest/polyfills/global.js',
15
+ ],
16
+ coverage: {
17
+ include: ['src/**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
18
+ exclude: [
19
+ '**/*.d.ts',
20
+ '**/@types/**/*',
21
+ 'node_modules/**/*',
22
+ 'src/config/**/*',
23
+ 'src/**/__tests__/**/*',
24
+ 'src/**/*.test.ts*',
25
+ 'src/**/*.spec.ts*',
26
+ 'src/**/*.mock.ts*',
27
+ 'src/**/*.builder.ts*',
28
+ 'src/app-injector.tsx',
29
+ 'src/bootstrap.tsx',
30
+ 'src/index.ts',
31
+ ],
32
+ reporter: ['text', 'html'],
33
+ provider: 'istanbul',
34
+ thresholds: {
35
+ branches: 3,
36
+ lines: 3,
37
+ functions: 3,
38
+ statements: 3,
39
+ },
40
+ },
41
+ env: {
42
+ ...config({
43
+ path: './environments/.env.test',
44
+ }).parsed,
45
+ },
46
+ },
47
+ })
package/docs/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # app-tutor-ai-consumer
2
+
3
+ Consumer components library for Hotmart Tutor Widget
4
+
5
+ ---
6
+ ## Components
7
+
8
+ ### component 1
9
+
10
+ Description of component 1
11
+
12
+ Example of usage:
13
+ ```
14
+ ...put a code example here
15
+ ```
File without changes
@@ -0,0 +1,82 @@
1
+ # TITLE
2
+
3
+ Data: DATE
4
+
5
+ ## Status
6
+
7
+ STATUS <!-- proposto, aceito, substituído -->
8
+
9
+ ## Responsáveis <!-- opcional -->
10
+
11
+ [Listar todo mundo envolvido na decisão]
12
+
13
+ ## Estória Técnica <!-- opcional -->
14
+
15
+ [Descrição | URL do ticket/issue]
16
+
17
+ ## Contexto e Descrição do Problema
18
+
19
+ [Descreva o contexto e a descrição do problema, por exemplo, de forma livre usando duas a três frases. Você pode querer articular o problema na forma de uma pergunta.]
20
+
21
+ ## Critérios de Decisão <!-- opcional -->
22
+
23
+ * [critério 1, por exemplo, uma característica, problema a ser resolvido, ...]
24
+ * [critério 2, por exemplo, uma característica, problema a ser resolvido, ...]
25
+ * … <!-- número de critérios pode variar -->
26
+
27
+ ## Opções Consideradas
28
+
29
+ * [opção 1]
30
+ * [opção 2]
31
+ * [opção 3]
32
+ * … <!-- número de opções pode variar -->
33
+
34
+ ## Resultado da Decisão
35
+
36
+ Opção escolhida: "[opção 1]",
37
+ porque [justificativa. por exemplo, única opção, que atende os critérios de decisão | que resolve força | … | sai melhor (veja abaixo)]
38
+ .
39
+
40
+ ### Consequências Positivas <!-- opcional -->
41
+
42
+ * [ex. melhoria dos atributos de qualidade, necessário acompanhamento de decisões, …]
43
+ * …
44
+
45
+ ### Consequências Negativas <!-- opcional -->
46
+
47
+ * [ex. comprometimento dos atributos de qualidade, necessário acompanhamento de decisões, …]
48
+ * …
49
+
50
+ ## Prós e Contras das Opções <!-- opcional -->
51
+
52
+ ### [opção 1]
53
+
54
+ [exemplo | descrição | apontamento para mais informações | …] <!-- opcional -->
55
+
56
+ * Bom, porque [argumento a]
57
+ * Bom, porque [argumento b]
58
+ * Ruim, porque [argumento c]
59
+ * … <!-- número de prós e contras pode variar -->
60
+
61
+ ### [opção 2]
62
+
63
+ [exemplo | descrição | apontamento para mais informações | …] <!-- opcional -->
64
+
65
+ * Bom, porque [argumento a]
66
+ * Bom, porque [argumento b]
67
+ * Ruim, porque [argumento c]
68
+ * … <!-- número de prós e contras pode variar -->
69
+
70
+ ### [opção 3]
71
+
72
+ [exemplo | descrição | apontamento para mais informações | …] <!-- opcional -->
73
+
74
+ * Bom, porque [argumento a]
75
+ * Bom, porque [argumento b]
76
+ * Ruim, porque [argumento c]
77
+ * … <!-- número de prós e contras pode variar -->
78
+
79
+ ## Links <!-- optional -->
80
+
81
+ * [Tipo de Link] [Link para o ADR] <!-- exemplo: Refinado por [ADR-0005](0005-exemplo.md) -->
82
+ * … <!-- número de links pode variar -->
File without changes
@@ -0,0 +1,42 @@
1
+ # APP
2
+ ENVIRONMENT=staging
3
+ APP_HOST=local.buildstaging.com
4
+ APP_PORT=4223
5
+ APP_NAME=app-tutor-ai-consumer
6
+
7
+ # CAS Hotmart
8
+ CAS_CLIENT_ID=b432cdd3-eb60-46bd-892b-5b450a65153e
9
+ IS_CAS=true
10
+
11
+ # IT SHOULD ONLY BE FILLED IN the .env.local file
12
+ MEMBERSHIP_SLUG=
13
+
14
+ # API
15
+ API_CONTENT_PLATFORM_SPACE=https://api-content-platform-space-gateway.buildstaging.com
16
+ API_HOTMART_TUTOR=https://api-smart-search-content.buildstaging.com
17
+
18
+ # OPTIMIZELY
19
+
20
+ OPTIMIZELY_SDK_KEY=B9rwquwdhY7XfEzaqZH94
21
+
22
+ # FIREBASE
23
+ FIREBASE_API_KEY=AIzaSyAq3KtkkTsJC5maHM_A9YJ-roI2IbvI5fM
24
+ FIREBASE_AUTH_DOMAIN=omnichat-cad8c.firebaseapp.com
25
+ FIREBASE_DATABASE_URL=https://omnichat-cad8c.firebaseio.com
26
+ FIREBASE_MESSAGING_SENDER_ID=78513709264
27
+ FIREBASE_PROJECT_ID=omnichat-cad8c
28
+ FIREBASE_STORAGE_BUCKET=omnichat-cad8c.appspot.com
29
+
30
+ # C3PO
31
+ API_CONVERSATION_URL=https://c3po-api-conversations.buildstaging.com
32
+ API_AUTH_URL=https://c3po-api-auth.buildstaging.com/v1
33
+
34
+ # VLC
35
+ USER_VLC=jonathan.braga@hotmart.com
36
+ VLC_PASSWORD=jonathan03
37
+ SECURITY_BASE_URL=https://api-security.buildstaging.com
38
+ AUTH_CLIENT_SECRET=Basic OWRiYThiNTYtMWE5OC0xMWU5LWFiMTQtZDY2M2JkODczZDkzOmFiZmRiODVhLTFhOTgtMTFlOS1hYjE0LWQ2NjNiZDg3M2Q5Mw==
39
+
40
+ # BUNDLE
41
+ BUNDLE_PATH=https://local.buildstaging.com:4223
42
+
@@ -0,0 +1,41 @@
1
+ # APP
2
+ ENVIRONMENT=staging
3
+ APP_HOST=local.buildstaging.com
4
+ APP_PORT=4223
5
+ APP_NAME=app-tutor-ai-consumer
6
+
7
+ # CAS Hotmart
8
+ CAS_CLIENT_ID=b432cdd3-eb60-46bd-892b-5b450a65153e
9
+ IS_CAS=false
10
+
11
+ APP_HOST_MF=
12
+
13
+ # API
14
+ API_CONTENT_PLATFORM_SPACE=https://api-content-platform-space-gateway.cp.hotmart.com
15
+ API_HOTMART_TUTOR=https://api-smart-search-content.cp.hotmart.com
16
+
17
+ # OPTIMIZELY
18
+
19
+ OPTIMIZELY_SDK_KEY=GQb1vccBnQhjtEkXqAonY
20
+
21
+ # FIREBASE
22
+ FIREBASE_API_KEY=AIzaSyAq3KtkkTsJC5maHM_A9YJ-roI2IbvI5fM
23
+ FIREBASE_AUTH_DOMAIN=omnichat-cad8c.firebaseapp.com
24
+ FIREBASE_DATABASE_URL=https://omnichat-cad8c.firebaseio.com
25
+ FIREBASE_MESSAGING_SENDER_ID=78513709264
26
+ FIREBASE_PROJECT_ID=omnichat-cad8c
27
+ FIREBASE_STORAGE_BUCKET=omnichat-cad8c.appspot.com
28
+
29
+ # C3PO
30
+ API_CONVERSATION_URL=
31
+ API_AUTH_URL=
32
+
33
+ # VLC
34
+ USER_VLC=
35
+ VLC_PASSWORD=
36
+ SECURITY_BASE_URL=
37
+ AUTH_CLIENT_SECRET=
38
+
39
+ # BUNDLE
40
+ BUNDLE_PATH=https://app-club-microfrontends-prod.cp.hotmart.com
41
+