-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bring ui into monorepo (#349)
* chore: bring ui into monorepo * chore: remove streaming api test, fix ui flicker * chore: additional tests * chore: additional tests with todos * fix: lower resource reqs/limits, remove sa * chore: more api tests * chore: more api tests 2 * fix: set resource limits to 0 * fix: delete .github dir under ui folder * chore: remove husky --------- Co-authored-by: Gerred Dillon <[email protected]>
- Loading branch information
1 parent
4f70eea
commit e89610b
Showing
94 changed files
with
12,461 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' # See documentation for possible values | ||
directory: '/src/leapfrogai_ui' # Location of package manifests | ||
schedule: | ||
interval: 'weekly' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: v2 | ||
name: leapfrogai-ui | ||
description: UI to interact with LFAI tools | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: '0.1.7' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: leapfrogai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: uds.dev/v1alpha1 | ||
kind: Package | ||
metadata: | ||
name: leapfrogai-ui | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
network: | ||
expose: | ||
- service: leapfrogai-ui | ||
podLabels: | ||
app: leapfrogai-ui | ||
host: {{ .Values.package.host }} | ||
gateway: tenant | ||
port: 3000 | ||
|
||
allow: | ||
- direction: Ingress | ||
remoteGenerated: Anywhere | ||
|
||
- direction: Egress | ||
remoteGenerated: Anywhere | ||
|
||
- direction: Egress | ||
podLabels: | ||
app: leapfrogai-ui | ||
remoteGenerated: Anywhere |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: leapfrogai-ui | ||
namespace: leapfrogai | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: leapfrogai-ui | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: leapfrogai-ui | ||
spec: | ||
containers: | ||
- name: leapfrogai-ui | ||
image: 'ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:###ZARF_CONST_IMAGE_VERSION###' | ||
ports: | ||
- containerPort: 3000 | ||
env: | ||
- name: PUBLIC_LEAPFROGAI_API_BASE_URL | ||
value: '###ZARF_VAR_LEAPFROGAI_API_BASE_URL###' | ||
- name: ORIGIN | ||
value: '###ZARF_VAR_DOMAIN###' | ||
- name: PUBLIC_DEFAULT_MODEL | ||
value: '###ZARF_VAR_MODEL###' | ||
- name: PUBLIC_DEFAULT_SYSTEM_PROMPT | ||
value: '###ZARF_VAR_SYSTEM_PROMPT###' | ||
- name: PUBLIC_DEFAULT_TEMPERATURE | ||
value: '###ZARF_VAR_TEMPERATURE###' | ||
- name: LEAPFROGAI_API_KEY | ||
value: '###ZARF_VAR_LEAPFROGAI_API_KEY###' | ||
- name: PUBLIC_SUPABASE_URL | ||
value: '###ZARF_VAR_SUPABASE_URL###' | ||
- name: PUBLIC_SUPABASE_ANON_KEY | ||
value: '###ZARF_VAR_SUPABASE_ANON_KEY###' | ||
|
||
resources: | ||
requests: | ||
memory: '0' | ||
cpu: '0' | ||
limits: | ||
memory: '0' | ||
cpu: '0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: leapfrogai-ui | ||
namespace: leapfrogai | ||
labels: | ||
app: leapfrogai-ui | ||
service: leapfrogai-ui | ||
zarf.dev/connect-name: leapfrogai-ui | ||
annotations: | ||
zarf.dev/connect-description: 'The LeapfrogAI UI' | ||
spec: | ||
selector: | ||
app: leapfrogai-ui | ||
ports: | ||
- name: http | ||
port: 3000 | ||
targetPort: 3000 | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package: | ||
host: lfaiui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package: | ||
create: | ||
set: | ||
image_repository: 'ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui' | ||
image_version: 0.1.7 | ||
name: leapfrogai-ui | ||
max_package_size: '1000000000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
kind: ZarfPackageConfig | ||
metadata: | ||
name: '###ZARF_PKG_TMPL_NAME###' | ||
version: '###ZARF_PKG_TMPL_IMAGE_VERSION###' | ||
description: > | ||
A UI for LeapfrogAI | ||
constants: | ||
- name: IMAGE_VERSION | ||
value: '###ZARF_PKG_TMPL_IMAGE_VERSION###' | ||
- name: NAME | ||
value: '###ZARF_PKG_TMPL_NAME###' | ||
|
||
variables: | ||
- name: LEAPFROGAI_API_BASE_URL #LEAPFROGAI_API_BASE_URL | ||
description: The base URL for the LeapfrogAI API | ||
default: http://api.leapfrogai.svc.cluster.local:8080/openai/v1 | ||
prompt: true | ||
sensitive: true | ||
- name: LEAPFROGAI_API_KEY | ||
description: The api key the LeapfrogAI API (can be left default for local development) | ||
default: my-test-key | ||
prompt: true | ||
sensitive: true | ||
- name: DOMAIN | ||
description: The domain to use for the application, Istio-ingress configuration | ||
default: https://lfaiui.uds.dev | ||
prompt: true | ||
sensitive: true | ||
- name: MODEL | ||
description: The default LLM model to use for chat and summarization | ||
default: vllm | ||
prompt: true | ||
sensitive: false | ||
- name: SYSTEM_PROMPT | ||
description: The default system prompt to use for the LLM | ||
default: 'You are a helpful AI assistant created by Defense Unicorns.' | ||
prompt: true | ||
sensitive: false | ||
- name: TEMPERATURE | ||
description: The default temperature for the LLM | ||
default: '0.1' | ||
prompt: true | ||
sensitive: false | ||
- name: SUPABASE_URL | ||
description: URL for supabase | ||
default: 'http://supabase.leapfrogai.svc.cluster.local:8080' | ||
prompt: true | ||
sensitive: false | ||
- name: SUPABASE_ANON_KEY | ||
description: Public key for Supabase | ||
default: '' | ||
prompt: true | ||
sensitive: false | ||
|
||
components: | ||
- name: leapfrogai-ui | ||
required: true | ||
charts: | ||
- name: leapfrogai-ui | ||
namespace: leapfrogai | ||
localPath: chart | ||
version: '###ZARF_PKG_TMPL_IMAGE_VERSION###' | ||
images: | ||
- '###ZARF_PKG_TMPL_IMAGE_REPOSITORY###:###ZARF_PKG_TMPL_IMAGE_VERSION###' | ||
actions: | ||
onDeploy: | ||
after: | ||
- wait: | ||
cluster: | ||
kind: Deployment | ||
name: leapfrogai-ui | ||
namespace: leapfrogai | ||
condition: Available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.DS_Store | ||
node_modules | ||
/.svelte-kit | ||
/build | ||
/package | ||
**/.env | ||
!.env.public | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* | ||
|
||
Dockerfile | ||
.dockerignore | ||
.git | ||
.gitignore | ||
.gitattributes | ||
README.md | ||
.npmrc | ||
.prettierrc | ||
.eslintrc.cjs | ||
.editorconfig | ||
.vscode | ||
.idea | ||
build | ||
package | ||
|
||
|
||
*.tar.zst | ||
zarf-sbom/ | ||
|
||
|
||
playwright/.auth | ||
|
||
|
||
supabase/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# PUBLIC STATIC | ||
PUBLIC_DEFAULT_TEMPERATURE=0.1 | ||
PUBLIC_DEFAULT_SYSTEM_PROMPT="You are a helpful AI assistant created by Defense Unicorns." | ||
PUBLIC_DEFAULT_MODEL=vllm | ||
PUBLIC_LEAPFROGAI_API_BASE_URL=https://leapfrogai-api.uds.dev/openai/v1 | ||
|
||
# PUBLIC DYNAMIC | ||
PUBLIC_SUPABASE_URL=http://localhost:54321 | ||
PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 | ||
|
||
# PRIVATE DYNAMIC | ||
LEAPFROGAI_API_KEY=my-test-key | ||
|
||
# PLAYWRIGHT | ||
USERNAME=[email protected] | ||
PASSWORD=<password> | ||
|
||
# SUPABASE AUTH (when running Supabase Locally) | ||
SUPABASE_AUTH_KEYCLOAK_CLIENT_ID=lfaiui | ||
SUPABASE_AUTH_KEYCLOAK_SECRET=<secret> | ||
SUPABASE_AUTH_EXTERNAL_KEYCLOAK_URL=https://keycloak.admin.uds.dev/realms/uds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# THESE VARIABLES ARE PUBLIC STATIC VARIABLES COPIED INTO THE DOCKERFILE AT BUILD TIME | ||
# THIS FILE IS COMMITTED TO GIT | ||
# !!!!!! DO NOT INCLUDE PRIVATE VARIABLES IN THIS FILE !!!!! | ||
PUBLIC_DEFAULT_TEMPERATURE=0.1 | ||
PUBLIC_DEFAULT_SYSTEM_PROMPT="You are a helpful AI assistant created by Defense Unicorns." | ||
PUBLIC_DEFAULT_MODEL=vllm | ||
PUBLIC_LEAPFROGAI_API_BASE_URL=http://api.leapfrogai.svc.cluster.local:8080/openai/v1 | ||
|
||
# DO NOT INCLUDE PRIVATE VARIABLES IN THIS FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
|
||
# Ignore files for PNPM, NPM and YARN | ||
pnpm-lock.yaml | ||
package-lock.json | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** @type { import("eslint").Linter.Config } */ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:svelte/recommended', | ||
'prettier' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 2020, | ||
extraFileExtensions: ['.svelte'] | ||
}, | ||
env: { | ||
browser: true, | ||
es2017: true, | ||
node: true | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.svelte'], | ||
parser: 'svelte-eslint-parser', | ||
parserOptions: { | ||
parser: '@typescript-eslint/parser' | ||
} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.DS_Store | ||
node_modules | ||
/build | ||
/.svelte-kit | ||
/package | ||
.env | ||
.env.* | ||
!.env.example | ||
!.env.public | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* | ||
|
||
*.tar.zst | ||
zarf-sbom/ | ||
|
||
# IntelliJ | ||
.idea/workspace.xml | ||
.idea/statistics.xml | ||
.idea/shelf/ | ||
|
||
|
||
playwright/.auth | ||
test-results/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
engine-strict=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Ignore files for PNPM, NPM and YARN | ||
pnpm-lock.yaml | ||
package-lock.json | ||
yarn.lock | ||
|
||
../../packages/ui/chart/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte"], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} |
Oops, something went wrong.