Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/config/applications.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"jarvis": {
"eks_cluster_name": "ascending-s-api-cluster",
"aws_deploy_role": "SAAS_AWS_DEPLOY_ROLE_ARN"
},
"jarvis-demo": {
"eks_cluster_name": "ascending-s-api-cluster",
"aws_deploy_role": "SAAS_AWS_DEPLOY_ROLE_ARN"
},
"askcto": {
"eks_cluster_name": "ascending-askcto-cluster",
"aws_deploy_role": "AWS_DEPLOY_ROLE_ARN"
}
}
155 changes: 155 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
name: Deploy Admin Panel

on:
push:
branches:
- main
paths:
- 'src/**'
- 'server.ts'
- 'package.json'
- 'bun.lock'
- 'Dockerfile'
- '.github/workflows/deploy.yaml'
workflow_dispatch:
inputs:
application:
description: 'Application to deploy to'
type: choice
required: true
default: jarvis
options:
- jarvis
- askcto
- jarvis-demo
region:
description: 'AWS Region to deploy to'
type: string
required: true
default: us-east-1

permissions:
id-token: write
contents: read

run-name: Deploy Admin Panel for ${{ inputs.application }}

jobs:
test:
name: Lint, Type Check & Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install --frozen-lockfile

- name: ESLint
run: bunx eslint src/ --max-warnings 0

- name: TypeScript
run: bunx tsc --noEmit

- name: Vitest
run: bun run test
env:
NODE_ENV: development
SESSION_SECRET: ci-test-secret-do-not-use-in-production

build-and-push:
name: Build & Push to ECR
runs-on: ubuntu-latest
needs: test
outputs:
image: ${{ steps.tags.outputs.ecr_image }}
steps:
- uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Assume IAM role
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.SAAS_AWS_DEPLOY_ROLE_ARN }}
role-session-name: deployment-role-session
aws-region: ${{ inputs.region || 'us-east-1' }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registries: "897729109735"

- name: Determine image tags
id: tags
run: |
ECR_IMAGE="${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel"
echo "ecr_image=${ECR_IMAGE}:${{ github.sha }}" >> $GITHUB_OUTPUT
echo "tags=${ECR_IMAGE}:${{ github.sha }},${ECR_IMAGE}:latest" >> $GITHUB_OUTPUT

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.tags.outputs.tags }}
provenance: false

deploy:
name: Deploy to EKS
runs-on: ubuntu-latest
needs: build-and-push
if: github.event_name == 'workflow_dispatch'
env:
DEPLOYMENT_NAME: jarvis-admin-panel
steps:
- uses: actions/checkout@v6

- name: Load Application Configuration
id: config
run: |
CONFIG=$(cat .github/config/applications.json | jq -r --arg app "${{ inputs.application }}" '.[$app]')
echo "eks_cluster_name=$(echo $CONFIG | jq -r '.eks_cluster_name')" >> $GITHUB_OUTPUT
echo "aws_deploy_role=$(echo $CONFIG | jq -r '.aws_deploy_role')" >> $GITHUB_OUTPUT

- name: Install kubectl
uses: azure/setup-kubectl@v3
with:
version: latest

- name: Set IAM role to assume
id: set-role
run: echo "role=${{ secrets[steps.config.outputs.aws_deploy_role] }}" >> $GITHUB_OUTPUT

- name: Assume IAM role
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ steps.set-role.outputs.role }}
role-session-name: deployment-role-session
aws-region: ${{ inputs.region }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registries: "897729109735"

- name: Update kubeconfig
run: aws eks update-kubeconfig --name ${{ steps.config.outputs.eks_cluster_name }} --region ${{ inputs.region }}

- name: Update image on EKS
run: |
kubectl set image deploy/${{ env.DEPLOYMENT_NAME }} \
jarvis-admin-panel=${{ needs.build-and-push.outputs.image }} \
-n ${{ inputs.application }}

- name: Restart pods
run: kubectl rollout restart deploy/${{ env.DEPLOYMENT_NAME }} -n ${{ inputs.application }}

- name: Check pod status
run: kubectl rollout status deploy/${{ env.DEPLOYMENT_NAME }} -n ${{ inputs.application }}
49 changes: 0 additions & 49 deletions .github/workflows/docker-publish.yml

This file was deleted.

1 change: 0 additions & 1 deletion public/clickhouse-dark.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/clickhouse-light.svg

This file was deleted.

Binary file added public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/favicon.ico
Binary file not shown.
29 changes: 0 additions & 29 deletions public/librechat-logo.svg

This file was deleted.

4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "LibreChat Admin",
"name": "LibreChat Admin Panel",
"short_name": "Jarvis Chat Admin",
"name": "Jarvis Chat Admin Panel",
"icons": [
{
"src": "favicon.ico",
Expand Down
50 changes: 50 additions & 0 deletions src/assets/jarvis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Icon, Dropdown } from '@clickhouse/click-ui';
import { Link, useRouter } from '@tanstack/react-router';
import type * as t from '@/types';
import { useStripAriaExpanded, useCapabilities, useLocalize } from '@/hooks';
import libreChatLogo from '@/assets/librechat.svg';
import jarvisLogo from '@/assets/jarvis.svg';
import { SettingsDialog } from './SettingsDialog';
import { SystemCapabilities } from '@/constants';
import { getInitials, cn } from '@/utils';
Expand Down Expand Up @@ -84,7 +84,7 @@ export function Sidebar({ user, collapsed, onToggle }: t.SidebarProps) {
>
<div className="flex h-14 shrink-0 items-center px-2">
<div className="flex items-center gap-2.5 overflow-hidden px-1.5">
<img src={libreChatLogo} alt={localize('com_a11y_logo_alt')} className="h-6 w-6 shrink-0" />
<img src={jarvisLogo} alt={localize('com_a11y_logo_alt')} className="h-6 w-6 shrink-0" />
<span className="truncate text-sm font-semibold text-(--cui-color-text-default)">
{localize('com_auth_title')}
</span>
Expand Down
12 changes: 6 additions & 6 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@
"com_ui_active": "Active",
"com_ui_paused": "Paused",
"com_users_title": "User management",
"com_users_subtitle": "Manage users, roles, and permissions for LibreChat",
"com_users_subtitle": "Manage users, roles, and permissions for Jarvis Chat",
"com_users_add": "Add user",
"com_users_total": "Total users",
"com_users_admins": "Admins",
Expand Down Expand Up @@ -882,15 +882,15 @@
"com_help_subtitle": "Documentation, guides, and support resources",
"com_help_resources": "Resources",
"com_help_docs_title": "Documentation",
"com_help_docs_desc": "Comprehensive guides for configuring and running LibreChat",
"com_help_docs_desc": "Comprehensive guides for configuring and running Jarvis Chat",
"com_help_api_title": "Configuration reference",
"com_help_api_desc": "Detailed reference for librechat.yaml and environment setup",
"com_help_community_title": "Community",
"com_help_community_desc": "Join the community on GitHub for discussions and contributions",
"com_help_discord_title": "Discord",
"com_help_discord_desc": "Chat with the community and get support on Discord",
"com_help_support": "Support",
"com_help_support_text": "Need help? Contact your system administrator or visit the LibreChat documentation for troubleshooting guides.",
"com_help_support_text": "Need help? Contact your system administrator or visit the Jarvis Chat documentation for troubleshooting guides.",
"com_a11y_results_found": "{{count}} results found",
"com_a11y_filter_changed": "Filter updated, {{count}} results",
"com_a11y_value_hidden": "{{key}} value hidden",
Expand Down Expand Up @@ -995,12 +995,12 @@
"com_nav_collapse_sidebar": "Collapse sidebar",
"com_nav_dashboard": "Dashboard",
"com_dash_title": "Welcome!",
"com_dash_subtitle": "Here's everything you need to manage your LibreChat instance.",
"com_dash_subtitle": "Here's everything you need to manage your Jarvis Chat instance.",
"com_dash_quick_links": "Quick links",
"com_dash_config_desc": "View and manage instance configuration settings.",
"com_dash_access_desc": "Create and manage groups, assign roles, and fine-tune member permissions across your organization.",
"com_dash_grants_desc": "Control which capabilities each role has access to, from reading configs to managing users.",
"com_dash_help_desc": "Links to documentation, community resources, and support channels to help you get the most out of LibreChat.",
"com_dash_help_desc": "Links to documentation, community resources, and support channels to help you get the most out of Jarvis Chat.",
"com_dash_nav_tips": "Getting around",
"com_dash_tip_sidebar": "The sidebar gives you access to every page: Configuration, Access, Grants, and Help. Toggle it open to see labels or collapse it down to just icons.",
"com_dash_tip_cmdk": "The command menu lets you search for and jump to any page, configuration section, or config tab. You can also switch between light, dark, and system themes within the menu.",
Expand All @@ -1027,5 +1027,5 @@
"com_kv_type_number": "123",
"com_kv_type_boolean": "T/F",
"com_kv_type_json": "{ }",
"com_a11y_logo_alt": "LibreChat logo"
"com_a11y_logo_alt": "Jarvis Chat logo"
}
Loading