Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat frontend api refactor #24

Merged
merged 32 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
47bf8ff
chore: adding tmuxinator config
Sma1lboy Oct 22, 2024
bb7478a
chore: Add tmuxinator config and support for watching codegen and dev…
Sma1lboy Oct 22, 2024
7f7a682
feat: Add support for JWT authentication in the auth module
Sma1lboy Oct 22, 2024
2fd07ab
chore: remove some code
Sma1lboy Oct 22, 2024
ff0011c
chore: Update environment variables and dependencies
Sma1lboy Oct 22, 2024
7afa251
Merge branch 'main' into feat-frontend-api-refactor
Sma1lboy Oct 26, 2024
ac9c5a2
chore: adding spec test rather then test
Sma1lboy Oct 26, 2024
a034248
chore: fix some bug
Sma1lboy Oct 26, 2024
666d159
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 26, 2024
ffbe0dd
Refactor project frontend API and fix backend project API
Sma1lboy Oct 26, 2024
9c1924e
Refactor frontend chat components and fix voice input functionality
Sma1lboy Oct 26, 2024
d90bf48
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 26, 2024
72209ba
refactor: improve code organization and fix voice input bug
Sma1lboy Oct 26, 2024
4902e36
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 26, 2024
2314719
refactor: improve code organization and fix voice input bug
Sma1lboy Oct 26, 2024
f2575a3
Refactor code organization and fix voice input bug
Sma1lboy Oct 29, 2024
42c7a88
refactor: improve code organization and fix voice input bug
Sma1lboy Oct 29, 2024
652c9b5
Refactor CSS variables for color scheme in globals.css
Sma1lboy Oct 29, 2024
73a810d
Merge branch 'main' into feat-frontend-api-refactor
Sma1lboy Oct 29, 2024
ce340f5
refactor: Exclude database.sqlite from version control
Sma1lboy Oct 29, 2024
806894b
refactor: Update GraphQL import in useAuth.ts
Sma1lboy Oct 29, 2024
3729eb7
refactor: Exclude database.sqlite from version control
Sma1lboy Oct 29, 2024
bb28f69
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 29, 2024
ff17f54
refactor: Update GraphQL import in useAuth.ts
Sma1lboy Oct 29, 2024
d07ef4c
chore: change client dir
Sma1lboy Oct 29, 2024
fb4319f
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 29, 2024
a2310f7
refactor: Update import statements for decorators in chat.resolver.ts
Sma1lboy Oct 29, 2024
eb8ccca
refactor: Update import statements for decorators in chat.resolver.ts
Sma1lboy Oct 29, 2024
d89f771
refactor: Update import statements for decorators in chat.resolver.ts
Sma1lboy Oct 29, 2024
abd7b81
refactor: Update import statements for decorators in chat.resolver.ts
Sma1lboy Oct 29, 2024
723a6e4
refactor: Update import statements for decorators in chat.resolver.ts
Sma1lboy Oct 29, 2024
6279339
[autofix.ci] apply automated fixes
autofix-ci[bot] Oct 29, 2024
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {

Check failure on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / autofix

'module' is not defined

Check failure on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / autofix

'module' is not defined
root: true,
parser: '@typescript-eslint/parser',
extends: [
Expand All @@ -19,5 +19,6 @@
'no-console': 'warn',
'prefer-const': 'error',
'no-var': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider adding explicit return types rule.

Since you're enhancing TypeScript support, consider also adding the @typescript-eslint/explicit-function-return-type rule to ensure all functions have explicit return types.

     '@typescript-eslint/no-explicit-any': 'warn',
+    '@typescript-eslint/explicit-function-return-type': ['error', {
+      allowExpressions: true,
+      allowTypedFunctionExpressions: true,
+    }],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': ['error', {
allowExpressions: true,
allowTypedFunctionExpressions: true,
}],

},
};
4 changes: 4 additions & 0 deletions .vscode/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cSpell.words": ["upsert"]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Still on progress

CodeFox
LOGO
![](./assets/WechatIMG1000.svg)
![](./assets/WechatIMG1000.svg)
2 changes: 1 addition & 1 deletion backend/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import { join } from 'path';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserModule } from './user/user.module';
import { User } from './user/user.model';

Check warning on line 8 in backend/src/app.module.ts

View workflow job for this annotation

GitHub Actions / autofix

'User' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 8 in backend/src/app.module.ts

View workflow job for this annotation

GitHub Actions / autofix

'User' is defined but never used. Allowed unused vars must match /^_/u
import { AuthModule } from './auth/auth.module';
import { ProjectModule } from './project/project.module';
import { TokenModule } from './token/token.module';
import { ConfigModule, ConfigService } from '@nestjs/config';

Check warning on line 12 in backend/src/app.module.ts

View workflow job for this annotation

GitHub Actions / autofix

'ConfigService' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 12 in backend/src/app.module.ts

View workflow job for this annotation

GitHub Actions / autofix

'ConfigService' is defined but never used. Allowed unused vars must match /^_/u
import { JwtModule } from '@nestjs/jwt';

Check warning on line 13 in backend/src/app.module.ts

View workflow job for this annotation

GitHub Actions / autofix

'JwtModule' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 13 in backend/src/app.module.ts

View workflow job for this annotation

GitHub Actions / autofix

'JwtModule' is defined but never used. Allowed unused vars must match /^_/u
import { JwtCacheService } from './auth/jwt-cache.service';

Check warning on line 14 in backend/src/app.module.ts

View workflow job for this annotation

GitHub Actions / autofix

'JwtCacheService' is defined but never used. Allowed unused vars must match /^_/u

Check warning on line 14 in backend/src/app.module.ts

View workflow job for this annotation

GitHub Actions / autofix

'JwtCacheService' is defined but never used. Allowed unused vars must match /^_/u
import { ChatModule } from './chat/chat.module';

@Module({
Expand All @@ -19,7 +19,7 @@
ConfigModule.forRoot({ isGlobal: true }),
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
autoSchemaFile: join(process.cwd(), 'src/schema.gql'),
autoSchemaFile: join(process.cwd(), '../frontend/src/graphql/schema.gql'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Schema file location creates deployment risks and tight coupling

The verification confirms the architectural concerns. The only cross-directory reference is the schema path in app.module.ts, while other frontend/backend mentions in package.json and protocol.ts are unrelated (script names and type definitions). This schema path configuration:

  1. Creates a hard dependency on frontend directory structure
  2. Uses unreliable process.cwd() with relative path
  3. Violates separation of concerns between frontend and backend
  4. May break in containerized or CI environments

Recommended solution:

-      autoSchemaFile: join(process.cwd(), '../frontend/src/graphql/schema.gql'),
+      autoSchemaFile: join(process.cwd(), 'src/schema.gql'),

Then implement one of these approaches:

  • Add a build step to copy schema to frontend
  • Use a shared directory between services
  • Implement schema registry pattern
🔗 Analysis chain

Consider architectural implications of schema location.

Moving the GraphQL schema file to the frontend directory creates a tight coupling between backend and frontend, which could lead to deployment and build issues. This approach:

  1. Assumes a specific directory structure
  2. May fail if the frontend directory is not available
  3. Could break in containerized environments
  4. Creates a direct dependency between backend and frontend

Consider these alternatives:

  1. Keep the schema in the backend and copy it to frontend during build:
-      autoSchemaFile: join(process.cwd(), '../frontend/src/graphql/schema.gql'),
+      autoSchemaFile: join(process.cwd(), 'src/schema.gql'),

Then add a build step to copy the schema to frontend.

  1. Use a shared directory for common files:
-      autoSchemaFile: join(process.cwd(), '../frontend/src/graphql/schema.gql'),
+      autoSchemaFile: join(process.cwd(), '../shared/schema.gql'),
  1. Use schema registry or version control to manage schema separately.

Let's verify the potential impact:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any direct imports or references between frontend and backend
rg -g '!node_modules' -l 'frontend|backend' backend/

Length of output: 130


Script:

#!/bin/bash
# Let's check the content of these files to understand the nature of frontend/backend references
echo "=== app.module.ts ==="
cat backend/src/app.module.ts

echo -e "\n=== protocol.ts ==="
cat backend/src/chat/protocol.ts

echo -e "\n=== package.json ==="
cat backend/package.json

Length of output: 8602

sortSchema: true,
playground: true,
installSubscriptionHandlers: true,
Expand Down
5 changes: 3 additions & 2 deletions backend/src/chat/chat.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class ChatCompletionDelta {
@Field({ nullable: true })
content?: string;
}

@ObjectType('ChatCompletionChunkType')
export class ChatCompletionChunk {
@Field()
Expand All @@ -20,7 +21,7 @@ export class ChatCompletionChunk {
model: string;

@Field({ nullable: true })
system_fingerprint: string | null;
systemFingerprint: string | null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Update required: Inconsistent field naming across the codebase

The field rename from system_fingerprint to systemFingerprint is incomplete. Found inconsistencies in:

  • llm-server/src/protocol.ts: Uses system_fingerprint
  • backend/src/chat/protocol.ts: Uses system_fingerprint

While the model and frontend use camelCase, protocol files still use snake_case, which needs to be synchronized.

🔗 Analysis chain

Verify the impact of the systemFingerprint rename.

The field rename from system_fingerprint to systemFingerprint looks good, but we should verify that all consumers of this field have been updated.

Also applies to: 88-90

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining snake_case usage of system_fingerprint
rg -l "system_fingerprint" --type ts --type tsx

# Search for GraphQL queries/mutations using the old field name
rg -l "system_fingerprint" --type graphql

Length of output: 149


Script:

#!/bin/bash
# Search for any remaining snake_case usage of system_fingerprint in all files
rg "system_fingerprint"

# Search for camelCase usage to understand the context
rg "systemFingerprint"

Length of output: 666


@Field(() => [ChatCompletionChoice])
choices: ChatCompletionChoice[];
Expand All @@ -35,7 +36,7 @@ class ChatCompletionChoice {
delta: ChatCompletionDelta;

@Field({ nullable: true })
finish_reason: string | null;
finishReason: string | null;
}

@InputType('ChatInputType')
Expand Down
21 changes: 20 additions & 1 deletion backend/src/chat/chat.resolver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { Resolver, Subscription, Args } from '@nestjs/graphql';
import {
Resolver,
Subscription,
Args,
Field,
ObjectType,
Query,
} from '@nestjs/graphql';
import { ChatCompletionChunk, ChatInput } from './chat.model';
import { ChatProxyService } from './chat.service';

Expand All @@ -24,4 +31,16 @@ export class ChatResolver {
throw new Error('Chat stream failed');
}
}

@Query(() => ModelTags)
async modelTags() {
//TODO: model tags api
return { tags: ['gpt-3', 'gpt-4', 'davinci'] };
}
}

@ObjectType('ModelTags')
export class ModelTags {
@Field(() => [String])
tags: string[];
}
Binary file modified backend/src/database.sqlite
Binary file not shown.
12 changes: 12 additions & 0 deletions backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ import 'reflect-metadata';

async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors({
origin: '*',
credentials: true,
Comment on lines +8 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Fix invalid CORS configuration

The combination of origin: '*' with credentials: true is invalid and will be rejected by browsers. When credentials: true is used, a specific origin must be set instead of the wildcard '*'.

If this is for development, consider:

-    origin: '*',
+    origin: process.env.NODE_ENV === 'production' 
+      ? 'https://your-production-domain.com'
+      : 'http://localhost:3001', // adjust port as needed

If you need to support multiple origins:

-    origin: '*',
+    origin: process.env.NODE_ENV === 'production'
+      ? ['https://domain1.com', 'https://domain2.com']
+      : 'http://localhost:3001',

Committable suggestion was skipped due to low confidence.

methods: ['GET', 'POST', 'OPTIONS'],
allowedHeaders: [
'Content-Type',
'Accept',
'Authorization',
'Access-Control-Allow-Origin',
'Access-Control-Allow-Credentials',
],
Comment on lines +11 to +17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove unnecessary CORS headers from allowedHeaders

The Access-Control-Allow-* headers are response headers that should be handled by the browser, not request headers. They should not be in the allowedHeaders list.

Apply this fix:

     allowedHeaders: [
       'Content-Type',
       'Accept',
       'Authorization',
-      'Access-Control-Allow-Origin',
-      'Access-Control-Allow-Credentials',
     ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
allowedHeaders: [
'Content-Type',
'Accept',
'Authorization',
'Access-Control-Allow-Origin',
'Access-Control-Allow-Credentials',
],
allowedHeaders: [
'Content-Type',
'Accept',
'Authorization',
],

});
await app.listen(process.env.PORT ?? 3000);
}
bootstrap();
3 changes: 2 additions & 1 deletion frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals",
"ignorePatterns": ["src/graphql/type.ts", "src/graphql/**/*"]
}
11 changes: 11 additions & 0 deletions frontend/.tmuxinator/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: frontend-dev
root: ./

windows:
- editor:
layout: even-horizontal
panes:
- next:
- pnpm dev
- codegen:
- pnpm generate:watch
135 changes: 1 addition & 134 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,134 +1 @@
<div align="center">
<img src="ollama-nextjs-ui.gif">
</div>

<h1 align="center">
Fully-featured & beautiful web interface for Ollama LLMs
</h1>

<div align="center">

![GitHub Repo stars](https://img.shields.io/github/stars/jakobhoeg/nextjs-ollama-llm-ui)

</div>

Get up and running with Large Language Models **quickly**, **locally** and even **offline**.
This project aims to be the easiest way for you to get started with LLMs. No tedious and annoying setup required!

# Features ✨

- **Beautiful & intuitive UI:** Inspired by ChatGPT, to enhance similarity in the user experience.
- **Fully local:** Stores chats in localstorage for convenience. No need to run a database.
- **Fully responsive:** Use your phone to chat, with the same ease as on desktop.
- **Easy setup:** No tedious and annoying setup required. Just clone the repo and you're good to go!
- **Code syntax highligting:** Messages that include code, will be highlighted for easy access.
- **Copy codeblocks easily:** Easily copy the highlighted code with one click.
- **Download/Pull & Delete models:** Easily download and delete models directly from the interface.
- **Switch between models:** Switch between models fast with a click.
- **Chat history:** Chats are saved and easily accessed.
- **Light & Dark mode:** Switch between light & dark mode.

# Preview

https://github.com/jakobhoeg/nextjs-ollama-llm-ui/assets/114422072/08eaed4f-9deb-4e1b-b87a-ba17d81b9a02

# Requisites ⚙️

To use the web interface, these requisites must be met:

1. Download [Ollama](https://ollama.com/download) and have it running. Or run it in a Docker container. Check the [docs](https://github.com/ollama/ollama) for instructions.
2. Node.js (18+) and npm is required. [Download](https://nodejs.org/en/download)

# Deploy your own to Vercel or Netlify in one click ✨

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fjakobhoeg%2Fnextjs-ollama-llm-ui&env=NEXT_PUBLIC_OLLAMA_URL&envDescription=Your%20Ollama%20URL) [![Deploy to Netlify Button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/jakobhoeg/nextjs-ollama-llm-ui)

You'll need to set your [OLLAMA_ORIGINS](https://github.com/ollama/ollama/blob/main/docs/faq.md) environment variable on your machine that is running Ollama:

```
OLLAMA_ORIGINS="https://your-app.vercel.app/"
```

# Installation 📖

[![Packaging status](https://repology.org/badge/vertical-allrepos/nextjs-ollama-llm-ui.svg?columns=3)](https://repology.org/project/nextjs-ollama-llm-ui/versions)

Use a pre-build package from one of the supported package managers to run a local environment of the web interface.
Alternatively you can install from source with the instructions below.

> [!NOTE]
> If your frontend runs on something other than `http://localhost` or `http://127.0.0.1`, you'll need to set the OLLAMA_ORIGINS to your frontend url.
>
> This is also stated in the [documentation](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server):
>
> `Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default. Additional origins can be configured with OLLAMA_ORIGINS`

## Install from source

**1. Clone the repository to a directory on your pc via command prompt:**

```
git clone https://github.com/jakobhoeg/nextjs-ollama-llm-ui
```

**2. Open the folder:**

```
cd nextjs-ollama-llm-ui
```

**3. Rename the `.example.env` to `.env`:**

```
mv .example.env .env
```

**4. If your instance of Ollama is NOT running on the default ip-address and port, change the variable in the .env file to fit your usecase:**

```
NEXT_PUBLIC_OLLAMA_URL="http://localhost:11434"
```

**5. Install dependencies:**

```
npm install
```

**6. Start the development server:**

```
npm run dev
```

**5. Go to [localhost:3000](http://localhost:3000) and start chatting with your favourite model!**

# Upcoming features

This is a to-do list consisting of upcoming features.

- ✅ Voice input support
- ✅ Code syntax highlighting
- ✅ Ability to send an image in the prompt to utilize vision language models.
- ✅ Ability to regenerate responses
- ⬜️ Import and export chats

# Tech stack

[NextJS](https://nextjs.org/) - React Framework for the Web

[TailwindCSS](https://tailwindcss.com/) - Utility-first CSS framework

[shadcn-ui](https://ui.shadcn.com/) - UI component built using Radix UI and Tailwind CSS

[shadcn-chat](https://github.com/jakobhoeg/shadcn-chat) - Chat components for NextJS/React projects

[Framer Motion](https://www.framer.com/motion/) - Motion/animation library for React

[Lucide Icons](https://lucide.dev/) - Icon library

# Helpful links

[Medium Article](https://medium.com/@bartek.lewicz/launch-your-own-chatgpt-clone-for-free-on-colab-shareable-and-online-in-less-than-10-minutes-da19e44be5eb) - How to launch your own ChatGPT clone for free on Google Colab. By Bartek Lewicz.

[Lobehub mention](https://lobehub.com/blog/5-ollama-web-ui-recommendation#5-next-js-ollama-llm-ui) - Five Excellent Free Ollama WebUI Client Recommendations
- we are using tmuxinator if you want to watch both codegen and dev server
33 changes: 33 additions & 0 deletions frontend/codegen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
schema: './src/graphql/schema.gql',
generates: {
'src/graphql/type.tsx': {
plugins: [
'typescript',
'typescript-operations',
'typescript-resolvers',
'typescript-react-apollo',
],
config: {
withHooks: true,
useIndexSignature: true,
enumsAsTypes: true,
constEnums: true,
skipTypename: false,
dedupeOperationSuffix: true,
nonOptionalTypename: true,
preResolveTypes: true,
namingConvention: {
enumValues: 'keep',
},
scalars: {
Date: 'Date',
},
},
},
},
};

export default config;
21 changes: 17 additions & 4 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
"scripts": {
"dev": "next dev",
"start:dev": "next dev",
"start:dev-watch": "tmuxinator start -p .tmuxinator/build.yml",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing tmuxinator configuration file for development setup

The script start:dev-watch references a tmuxinator configuration file at .tmuxinator/build.yml which is missing from the repository. This will prevent the development setup from working correctly.

  • Add the missing tmuxinator configuration file at .tmuxinator/build.yml
  • Ensure the configuration includes all necessary development processes
🔗 Analysis chain

LGTM! Verify tmuxinator configuration.

The new scripts enhance the development workflow with GraphQL code generation support. The tmuxinator integration is a good addition for managing multiple development processes.

Let's verify the tmuxinator configuration exists:

Also applies to: 12-14

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify tmuxinator configuration file exists
if [ -f ".tmuxinator/build.yml" ]; then
  echo "Tmuxinator config found"
  cat ".tmuxinator/build.yml"
else
  echo "Warning: Missing tmuxinator configuration at .tmuxinator/build.yml"
fi

Length of output: 177

"build": "next build",
"start": "next start",
"lint": "next lint --fix",
"format": "prettier --write \"src/**/*.ts\""
"format": "prettier --write \"src/**/*.ts\"",
"generate": "graphql-codegen",
"generate:watch": "graphql-codegen --watch"
},
"dependencies": {
"@apollo/client": "^3.11.8",
Expand All @@ -17,6 +20,7 @@
"@hookform/resolvers": "^3.9.0",
"@langchain/community": "^0.3.1",
"@langchain/core": "^0.3.3",
"@nestjs/common": "^10.4.6",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove unnecessary backend dependency.

@nestjs/common is a backend framework package and should not be in the frontend dependencies.

- "@nestjs/common": "^10.4.6",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@nestjs/common": "^10.4.6",

"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
Expand All @@ -28,17 +32,14 @@
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@types/dom-speech-recognition": "^0.0.4",
"ai": "^3.4.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"emoji-mart": "^5.6.0",
"framer-motion": "^11.5.6",
"graphql": "^16.9.0",
"langchain": "^0.3.2",
"lucide-react": "^0.445.0",
"next": "^14.2.13",
"next-themes": "^0.3.0",
"ollama-ai-provider": "^0.15.0",
"react": "^18.3.1",
"react-code-blocks": "^0.1.6",
"react-dom": "^18.3.1",
Expand All @@ -57,6 +58,16 @@
"zustand": "^5.0.0-rc.2"
},
"devDependencies": {
"@0no-co/graphqlsp": "^1.12.16",
"@graphql-codegen/cli": "^5.0.3",
"@graphql-codegen/typescript": "^4.1.0",
"@graphql-codegen/typescript-operations": "^4.3.0",
"@graphql-codegen/typescript-react-apollo": "^4.3.2",
"@graphql-codegen/typescript-resolvers": "^4.3.0",
"@parcel/watcher": "^2.4.1",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.2",
"@testing-library/react": "^16.0.1",
"@types/jest": "^29.5.14",
"@types/node": "^22.5.5",
"@types/react": "^18.3.8",
Expand All @@ -66,9 +77,11 @@
"eslint": "8.57.1",
"eslint-config-next": "14.2.13",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.12",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.6.2"
}
}
Loading
Loading