Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
5a843cd
chore: update package.json scripts for various services
Sma1lboy Mar 3, 2025
b699041
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 3, 2025
cac495a
chore(docs): update docusaurus start script to include port option
Sma1lboy Mar 3, 2025
e12dce3
chore(turbo): simplify build task and add start task dependencies
Sma1lboy Mar 3, 2025
9bb7448
chore: fix package.json formatting and update turbo task configurations
Sma1lboy Mar 3, 2025
664f7b5
chore(turbo): add build task dependencies for improved caching
Sma1lboy Mar 3, 2025
f6668ae
chore(tsconfig): add path mappings for codefox-common module
Sma1lboy Mar 3, 2025
45dfd88
chore: update imports to use ESM paths and remove rootDir from tsconfig
Sma1lboy Mar 3, 2025
3611f31
chore(package.json): update exports for ESM and CJS compatibility
Sma1lboy Mar 3, 2025
1e58f25
chore: streamline frontend CI workflow by removing unnecessary defaul…
Sma1lboy Mar 3, 2025
84511e0
chore: add CI workflows for backend and LLM server with pnpm setup an…
Sma1lboy Mar 3, 2025
593ead1
chore: update CI workflow for LLM server with new build steps and cac…
Sma1lboy Mar 3, 2025
ba8fad9
[autofix.ci] apply automated fixes
autofix-ci[bot] Mar 3, 2025
7d03721
chore: rename LLM Server CI to FD CI and update pnpm install command
Sma1lboy Mar 3, 2025
e38d1f1
chore: rename LLM Server CI to Frontend CI and update workflow for fr…
Sma1lboy Mar 3, 2025
b3c10cb
chore: update CI workflows for backend and add LLM server CI with cod…
Sma1lboy Mar 3, 2025
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
66 changes: 66 additions & 0 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Backend CI
on:
push:
branches: [ main ]
paths:
- 'backend/**'
- 'codefox-common/**'
pull_request:
branches: [ main ]
paths:
- 'backend/**'
- 'codefox-common/**'
workflow_dispatch:
jobs:
build:
name: Install and Build Backend
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Build codefox-common
working-directory: ./codefox-common
run: pnpm build

- name: Build backend
working-directory: ./backend
run: pnpm build

- name: Cache build artifacts
uses: actions/cache@v3
with:
path: |
./backend/dist
./backend/node_modules
key: ${{ runner.os }}-backend-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-backend-${{ hashFiles('**/pnpm-lock.yaml') }}-
17 changes: 9 additions & 8 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
name: Frontend CI

on:
push:
branches: [ main ]
paths:
- 'frontend/**'
- 'codefox-common/**'
pull_request:
branches: [ main ]
paths:
- 'frontend/**'
- 'codefox-common/**'
workflow_dispatch:

jobs:
build:
name: Install and Build Frontend
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./frontend

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -49,9 +45,14 @@ jobs:
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --no-frozen-lockfile

- name: Build codefox-common
working-directory: ./codefox-common
run: pnpm build

- name: Build frontend
working-directory: ./frontend
run: pnpm build

- name: Cache build artifacts
Expand All @@ -62,4 +63,4 @@ jobs:
./frontend/node_modules
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
66 changes: 66 additions & 0 deletions .github/workflows/llm-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: LLM Server CI
on:
push:
branches: [ main ]
paths:
- 'llm-server/**'
- 'codefox-common/**'
pull_request:
branches: [ main ]
paths:
- 'llm-server/**'
- 'codefox-common/**'
workflow_dispatch:
jobs:
build:
name: Install and Build LLM Server
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Build codefox-common
working-directory: ./codefox-common
run: pnpm build

- name: Build LLM Server
working-directory: ./llm-server
run: pnpm build

- name: Cache build artifacts
uses: actions/cache@v3
with:
path: |
./llm-server/dist
./llm-server/node_modules
key: ${{ runner.os }}-llm-server-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-llm-server-${{ hashFiles('**/pnpm-lock.yaml') }}-
7 changes: 3 additions & 4 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
"license": "UNLICENSED",
"packageManager": "pnpm@9.1.0",
"scripts": {
"build": "pnpm run build:common && nest build",
"build:common": "pnpm --filter codefox-common run build",
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"lint": "ts-prune \"{src,apps,libs,test}/**/*.ts\" && eslint \"{src,apps,libs,test}/**/*.ts\" --fix ",
"start": "nest start --watch",
"start": "nest start",
"start:dev": "NODE_OPTIONS=\"--experimental-specifier-resolution=node\" nest start --watch",
"dev": "pnpm run build:common && pnpm start:dev",
"dev": "pnpm start:dev",
"dev:backend": "pnpm start:dev",
"start:debug": "nest start --debug --watch",
"start:prod": "node --experimental-specifier-resolution=node dist/main",
Expand Down
11 changes: 10 additions & 1 deletion codefox-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts",
"default": "./dist/esm/index.js"
},
"./dist/*": "./dist/*"
},
"files": [
"dist"
],
"scripts": {
"build": "rimraf dist && pnpm run build:cjs && pnpm run build:esm && pnpm run build:types",
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.esm.json",
"build:types": "tsc -p tsconfig.types.json",
Expand Down
2 changes: 1 addition & 1 deletion codefox-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"start": "docusaurus start --port 9999 --no-open",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
Expand Down
5 changes: 2 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"start:dev": "next dev",
"build:common": "pnpm --filter codefox-common run build",
"start:dev-watch": "tmuxinator start -p .tmuxinator/build.yml",
"dev:watch": "tmuxinator start -p .tmuxinator/dev.yml",
"build": "pnpm run build:common && next build",
"start": "next start",
"lint": "next lint --fix",
"format": "prettier --write \"src/**/*.ts\"",
"generate": "graphql-codegen",
"generate:watch": "graphql-codegen --watch"
},
"dependencies": {
"codefox-common": "workspace:*",
"@apollo/client": "^3.11.8",
"@emoji-mart/data": "^1.2.1",
"@emoji-mart/react": "^1.1.1",
Expand All @@ -40,7 +40,6 @@
"@types/dom-speech-recognition": "^0.0.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"codefox-common": "workspace:*",
"emoji-mart": "^5.6.0",
"framer-motion": "^11.18.2",
"graphql": "^16.9.0",
Expand Down
11 changes: 5 additions & 6 deletions llm-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,26 @@
"description": "",
"type": "module",
"scripts": {
"start": "NODE_OPTIONS='--enable-source-maps' tsx src/main.ts",
"dev": "pnpm run build:common && NODE_OPTIONS='--enable-source-maps' nodemon --watch \"src/**/*.ts\" --exec \"tsx\" src/main.ts",
"start": "NODE_OPTIONS='--enable-source-maps' nodemon --watch \"src/**/*.ts\" --exec \"tsx\" src/main.ts",
"dev": "NODE_OPTIONS='--enable-source-maps' nodemon --watch \"src/**/*.ts\" --exec \"tsx\" src/main.ts",
"dev:backend": "pnpm dev",
"build": "pnpm run build:common && tsc",
"build": " tsc",
"serve": "node --enable-source-maps dist/main.js",
"format": "prettier --write \"src/**/*.ts\" ",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.js",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.js --watch",
"test:cov": "NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.js --coverage",
"build:common": "pnpm --filter codefox-common run build"
"test:cov": "NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.js --coverage"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"codefox-common": "workspace:*",
"@huggingface/transformers": "^3.2.4",
"@nestjs/common": "^10.4.5",
"@types/axios": "^0.14.4",
"axios": "^1.7.7",
"codefox-common": "workspace:*",
"dotenv": "^16.4.7",
"express": "^4.21.1",
"fastembed": "^1.14.1",
Expand Down
2 changes: 1 addition & 1 deletion llm-server/src/downloader/model-downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Logger } from '@nestjs/common';
import { PipelineType, pipeline, env } from '@huggingface/transformers';
import { isRemoteModel } from './const';
import { UniversalStatusManager } from './universal-status';
import { getModelsDir } from 'codefox-common';
import { getModelsDir } from 'codefox-common/dist/esm';

env.allowLocalModels = true;
env.localModelPath = getModelsDir();
Expand Down
2 changes: 1 addition & 1 deletion llm-server/src/downloader/universal-status.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getModelStatusPath } from 'codefox-common';
import { getModelStatusPath } from 'codefox-common/dist/esm';
import * as fs from 'fs';
import * as path from 'path';

Expand Down
2 changes: 1 addition & 1 deletion llm-server/src/downloader/universal-utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { UniversalDownloader } from './model-downloader';
import { Logger } from '@nestjs/common';
import { UniversalStatusManager } from './universal-status';
import { ConfigLoader, getModelsDir } from 'codefox-common';
import { ConfigLoader, getModelsDir } from 'codefox-common/dist/esm';

const logger = new Logger('model-utils');

Expand Down
6 changes: 5 additions & 1 deletion llm-server/src/llm-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { Response } from 'express';
import { Logger } from '@nestjs/common';
import { ConfigLoader, ModelConfig, ModelApiStreamChunk } from 'codefox-common';
import {
ConfigLoader,
ModelConfig,
ModelApiStreamChunk,
} from 'codefox-common/dist/esm';
import {
ModelProviderType,
ModelProviderOptions,
Expand Down
5 changes: 3 additions & 2 deletions llm-server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist",
"rootDir": "./src",
"sourceMap": true,
"inlineSourceMap": false,
"inlineSources": true,
Expand All @@ -17,7 +16,9 @@
"resolveJsonModule": true,
"baseUrl": ".",
"paths": {
"*": ["node_modules/*"]
"*": ["node_modules/*"],
"codefox-common": ["../codefox-common/src"],
"codefox-common/*": ["../codefox-common/src/*"]
},
"types": ["node", "express"]
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"format": "prettier --write .",
"dev:backend": "turbo dev:backend",
"test": "turbo test",
"fix": "eslint . --ext .js,.ts,.tsx --fix"
"fix": "eslint . --ext .js,.ts,.tsx --fix",
"start": "turbo start"
},
"postinstall": "pnpm --filter codefox-common run build",
"keywords": [],
Expand Down
Loading
Loading