Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@veecode-platform/backstage-plugin-vee-backend

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@veecode-platform/backstage-plugin-vee-backend

npmnpm
Version
0.1.2
Version published
Weekly downloads
6
-62.5%
Maintainers
3
Weekly downloads
 
Created
Source

Vee Backend

Intro 💡

Vee Backend is a plugin that provisions communication with the APIS of the AI engines, processing the data, creating vectors and managing chats and makes them available to the front-end plugin vee. As a first delivery only one engine is available, the openAI.

Pre-requisites

  • Get an updated version of Backstage.
  • Have an openai token.

Installation 🔧

If you are using yarn 3.x:

yarn workspace backend add @veecode-platform/backstage-plugin-vee-backend

If you are using other versions:

yarn add --cwd packages/backend @veecode-platform/backstage-plugin-vee-backend

Getting started

Settings in app-config.yaml

We start by configuring the vee in the file app-config.yaml, which is in the root of your project:

vee:
  openai:
    apiBaseUrl: https://api.openai.com/v1
    apiKey: ${OPENAI_API_KEY}
    model: gpt-4o #The desired model, for best results use gpt-4o >

You also need to configure the config.d.ts file in the backend: packages > backend > src > config.d.ts:

export interface Config {
    vee?:{
      openai?: {
        apiBaseUrl: string;
        apiKey: string;
        model: string;
      }
    }
}

The next step will be to configure the backend:

⭐ Legacy Backend

Create a file called vee.ts in packages> backend > src > plugins > vee.ts:

import { PluginEnvironment } from '../types';
import { Router } from 'express';
import {createRouter} from '@veecode-platform/backstage-plugin-vee-backend';

export default async function createPlugin({
  logger,
  auth,
  httpAuth,
  httpRouter,
  permissions,
  discovery,
  config
}: PluginEnvironment): Promise<Router> {

  return await createRouter({
  logger,
  auth,
  httpAuth,
  httpRouter,
  permissions,
  discovery,
  config
  });
}

In packages > backend > src > index.ts:

+ import vee from './plugins/vee'
...
async function main() {
  const config = await loadBackendConfig({
    argv: process.argv,
    logger: getRootLogger(),
  });
  const createEnv = makeCreateEnv(config);
...
+ const veeEnv = useHotMemoize(module, () => createEnv('vee'));
...
+ apiRouter.use('/vee', await vee(veeEnv));
...
}

🆕 New Backend

In packages > backend > src > index.ts:


import { createBackend } from '@backstage/backend-defaults';

const backend = createBackend();

backend.add(import('@backstage/plugin-app-backend/alpha'));
backend.add(import('@backstage/plugin-proxy-backend/alpha'));
backend.add(import('@backstage/plugin-scaffolder-backend/alpha'));
backend.add(import('@backstage/plugin-techdocs-backend/alpha'));
...

+ backend.add(import('@veecode-platform/backstage-plugin-vee-backend'));

backend.start();

Routes

MethodPathEndpoint
POST/submit-repobackendBaseUrl/api/vee/submit-repo
POST/chat-analyze-repobackendBaseUrl/api/vee/chat-analyze-repo
POST/clone-repositorybackendBaseUrl/api/vee/clone-repository
DELETE/chat-analyze-repobackendBaseUrl/api/vee/chat-analyze-repo

Permissions

See 👉Vee Common

This plugin provides the following permissions:

  • veeReadPermission 👉 Permission to make the plugin visible and access it.
  • veeScaffolderReadPermission 👉 Permission to make the template generation feature visible.
  • veeAnalyzerReadPermission 👉 Permission to make the local repository analysis feature visible.

🚨 View Backstage docs to learn how to set up your instance of Backstage to use these permissions.

FAQs

Package last updated on 19 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts