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

latest
npmnpm
Version
1.0.0
Version published
Maintainers
3
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 >
    templateGeneration:
      model: ${CUSTOM_MODEL} <- This model needs to be trained to generate qualified templates.
      catalog: ${TEMPLATE_CATALOG_URL}

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;
        timeout?:string;
        templateGeneration?: {
          model?: string;
          catalog?: 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();


🤖 Training your AI model

To ensure that the results follow the expected pattern, we need to train with the model used.
Here's how ➡️ click



🌎 Routes

MethodPathEndpoint
POST/submit-repobackendBaseUrl/api/vee/submit-repo
POST/chat-analyze-repobackendBaseUrl/api/vee/chat-analyze-repo
DELETE/chat-analyze-repobackendBaseUrl/api/vee/chat-analyze-repo
POST/clone-repositorybackendBaseUrl/api/vee/clone-repository
POST/partial-clone-repositorybackendBaseUrl/api/vee/partial-clone-repository
POST/submit-templatebackendBaseUrl/api/vee/submit-template
POST/chat-templatebackendBaseUrl/api/vee/chat-template
DELETE/chat-templatebackendBaseUrl/api/vee/chat-template
GET/fixedOptionsbackendBaseUrl/api/vee/fixedOptions
GET/fixedOptions/:fixedOptionsIdbackendBaseUrl/api/vee/fixedOptions/:fixedOptionsId
POST/fixedOptionsbackendBaseUrl/api/vee/fixedOptions
PATCH/fixedOptions/:fixedOptionsIdbackendBaseUrl/api/vee/fixedOptions/:fixedOptionsId
DELETE/fixedOptions/:fixedOptionsIdbackendBaseUrl/api/vee/fixedOptions/:fixedOptionsId
GET/stacksbackendBaseUrl/api/vee/stacks
GET/stacks/:stackIdbackendBaseUrl/api/vee/stacks/:stackId
POST/stacksbackendBaseUrl/api/vee/stacks
PATCH/stacks/:stackIdbackendBaseUrl/api/vee/stacks/:stackId
DELETE/stacks/:stackIdbackendBaseUrl/api/vee/stacks/:stackId
GET/pluginsbackendBaseUrl/api/vee/plugins
GET/plugins/:pluginIdbackendBaseUrl/api/vee/plugins/:pluginId
POST/pluginsbackendBaseUrl/api/vee/plugins
PATCH/plugins/:pluginIdbackendBaseUrl/api/vee/plugins/:pluginId
DELETE/plugins/:pluginIdbackendBaseUrl/api/vee/plugins/:pluginId

🔐 Permissions

The permissions for the first version are broader, less granular and follow the following patternPermissions The permissions for the first version are broader, less granular and follow the following pattern:

PermissionDescription
veeReadPermissionPermission to read the Vee plugin
veeAnalyzerReadPermissionPermission for the plugin to analyze code
veeAnalyzerSaveChangesInRepoPermissionPermission to save changes to the repository via pull request
veeAccessSettingsPanelPermissionPermission to access settings
veeGenerateTemplatePermissionAccess to the template generation menu
veeSaveTemplatePermissionPermission to save templates
veeManageStacksPermissionManage stacks (create, edit, delete)
veeManagePluginsPermissionManage plugins (create, edit, delete)
veeManageFixedOptionsManage fixed options (create, edit, delete)



💡 To find out more about permissions here

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

FAQs

Package last updated on 26 Jun 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