Skip to content
Open
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
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches:
- master
pull_request:

permissions:
actions: read
contents: read

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
filter: tree:0
fetch-depth: 0

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.8.0
run_install: false

# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# Uncomment this line to enable task distribution
# - run: pnpm dlx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"

# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: pnpm exec nx-cloud record -- echo Hello World
- run: pnpm exec nx run-many -t lint test build
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
- run: pnpm exec nx fix-ci
if: always()
Comment on lines +44 to +47
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Guard against missing Nx targets (especially “test”)

If no project defines a test target, nx run-many -t lint test build can fail the job. Either split into conditional steps or verify the targets exist first.

Option A (verify locally and keep as-is if safe). Please run:

Option B (conditionally run per target). Example:

-      - run: pnpm exec nx run-many -t lint test build
+      - name: Detect Nx targets
+        id: detect
+        run: |
+          echo "has_lint=$(pnpm -s nx show projects --withTarget lint | wc -l)" >> $GITHUB_OUTPUT
+          echo "has_test=$(pnpm -s nx show projects --withTarget test | wc -l)" >> $GITHUB_OUTPUT
+          echo "has_build=$(pnpm -s nx show projects --withTarget build | wc -l)" >> $GITHUB_OUTPUT
+
+      - name: Lint
+        if: ${{ steps.detect.outputs.has_lint != '0' }}
+        run: pnpm exec nx run-many -t lint
+
+      - name: Test
+        if: ${{ steps.detect.outputs.has_test != '0' }}
+        run: pnpm exec nx run-many -t test
+
+      - name: Build
+        if: ${{ steps.detect.outputs.has_build != '0' }}
+        run: pnpm exec nx run-many -t build

🏁 Script executed:

#!/bin/bash
# Show projects that define each target
pnpm -s nx show projects --withTarget lint
pnpm -s nx show projects --withTarget test
pnpm -s nx show projects --withTarget build

Length of output: 135


🏁 Script executed:

#!/bin/bash
# Locate NX workspace/project config files and check for target definitions
find . -type f \( -name 'workspace.json' -o -name 'angular.json' -o -name 'project.json' \) | while read f; do
  echo "Checking $f:"
  echo "  lint targets:"
  grep -n '"lint":' "$f" || echo "    none"
  echo "  test targets:"
  grep -n '"test":' "$f" || echo "    none"
  echo "  build targets:"
  grep -n '"build":' "$f" || echo "    none"
done

Length of output: 16273


🏁 Script executed:

#!/bin/bash
# Check for root workspace configuration files
echo "Root configuration files:"
ls -1 workspace.json angular.json nx.json package.json 2>/dev/null

# Display projects section if present
for cfg in workspace.json angular.json; do
  if [ -f "$cfg" ]; then
    echo "---- $cfg projects section ----"
    grep -n '"projects"' "$cfg" || echo "  no projects entry"
  fi
done

# Show content of nx.json projects key
if [ -f nx.json ]; then
  echo "---- nx.json projects key ----"
  grep -n '"projects"' nx.json || echo "  no projects entry"
fi

# Find all project.json files outside node_modules and report targets
echo "---- project.json files ----"
find . -type f -name project.json ! -path '*/node_modules/*' | while read f; do
  echo "== $f =="
  echo "  lint target:"
  grep -n '"lint":' "$f" || echo "    none"
  echo "  test target:"
  grep -n '"test":' "$f" || echo "    none"
  echo "  build target:"
  grep -n '"build":' "$f" || echo "    none"
done

Length of output: 587


CI step will always fail without any Nx targets
It looks like your workspace has no project definitions (no workspace.json/angular.json and no project.json files), and even nx show projects --withTarget … returns nothing. As a result, the single pnpm exec nx run-many -t lint test build will error out every time. You must guard or split these commands so the job can succeed when targets are absent.

Please update your .github/workflows/ci.yml accordingly. For example, you can detect which targets exist and run them conditionally:

-      - run: pnpm exec nx run-many -t lint test build
+      - name: Detect Nx targets
+        id: detect
+        run: |
+          echo "has_lint=$(pnpm -s nx show projects --withTarget lint | wc -l)" >> $GITHUB_OUTPUT
+          echo "has_test=$(pnpm -s nx show projects --withTarget test | wc -l)" >> $GITHUB_OUTPUT
+          echo "has_build=$(pnpm -s nx show projects --withTarget build | wc -l)" >> $GITHUB_OUTPUT
+
+      - name: Lint
+        if: ${{ steps.detect.outputs.has_lint != '0' }}
+        run: pnpm exec nx run-many -t lint
+
+      - name: Test
+        if: ${{ steps.detect.outputs.has_test != '0' }}
+        run: pnpm exec nx run-many -t test
+
+      - name: Build
+        if: ${{ steps.detect.outputs.has_build != '0' }}
+        run: pnpm exec nx run-many -t build

• Ensure that each target step is skipped if no projects define it.
• Keep the pnpm exec nx fix-ci step (if: always()) unchanged so self-healing still runs.
• Alternatively, define at least one project with test, lint, or build targets if CI should always run them.

📝 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
- run: pnpm exec nx run-many -t lint test build
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
- run: pnpm exec nx fix-ci
if: always()
# Detect which Nx targets actually exist
- name: Detect Nx targets
id: detect
run: |
echo "has_lint=$(pnpm -s nx show projects --withTarget lint | wc -l)" >> $GITHUB_OUTPUT
echo "has_test=$(pnpm -s nx show projects --withTarget test | wc -l)" >> $GITHUB_OUTPUT
echo "has_build=$(pnpm -s nx show projects --withTarget build | wc -l)" >> $GITHUB_OUTPUT
# Run lint only if there are projects with a lint target
- name: Lint
if: ${{ steps.detect.outputs.has_lint != '0' }}
run: pnpm exec nx run-many -t lint
# Run tests only if there are projects with a test target
- name: Test
if: ${{ steps.detect.outputs.has_test != '0' }}
run: pnpm exec nx run-many -t test
# Run build only if there are projects with a build target
- name: Build
if: ${{ steps.detect.outputs.has_build != '0' }}
run: pnpm exec nx run-many -t build
# Nx Cloud recommends fixes for failures to help you get CI green faster.
# Learn more: https://nx.dev/ci/features/self-healing-ci
- run: pnpm exec nx fix-ci
if: always()
🤖 Prompt for AI Agents
.github/workflows/ci.yml lines 44-47: the workflow blindly runs "pnpm exec nx
run-many -t lint test build" which fails when no projects define those targets;
update the CI to detect existing targets and only run the corresponding nx
commands (or split into separate steps per target) so each step is skipped when
no projects define that target, while leaving the "pnpm exec nx fix-ci" step
with "if: always()" unchanged; implement this by querying nx (e.g., "nx show
projects --withTarget <target>") or parsing workspace config, and run nx
run-many or run-commands conditionally per target only when projects are
returned.

76 changes: 44 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,53 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# See https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/
# compiled output
dist
tmp
out-tsc

# production
/build
# dependencies
node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
*.pem
Thumbs.db

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.nx/cache
.nx/workspace-data
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md

# env files (can opt-in for committing if needed)
.env*
vite.config.*.timestamp*
vitest.config.*.timestamp*

# vercel
.vercel
# Next.js
.next
out

# typescript
*.tsbuildinfo
next-env.d.ts
test-output
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
strict-peer-dependencies=false
auto-install-peers=true
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
/.nx/workspace-data
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": false
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"nxConsole.generateAiAgentRules": true
}
91 changes: 90 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,90 @@
## BrowserPlugins
# Browserplugins

<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix MD045: put alt text on the image, not the anchor

The current alt is on <a> instead of <img>, breaking accessibility tooling.

Apply this diff:

-<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
+<a href="https://nx.dev" target="_blank" rel="noreferrer"><img alt="Nx logo" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45" /></a>
📝 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
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
<a href="https://nx.dev" target="_blank" rel="noreferrer"><img alt="Nx logo" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45" /></a>
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3-3: Images should have alternate text (alt text)

(MD045, no-alt-text)

🤖 Prompt for AI Agents
In README.md around line 3, the alt attribute is incorrectly placed on the <a>
tag instead of the <img>, which breaks accessibility checks; remove the alt from
the anchor and add a proper alt attribute to the <img> element (e.g., alt="Nx
logo"), ensuring the anchor keeps href/target/rel and the image retains
src/width.


✨ Your new, shiny [Nx workspace](https://nx.dev) is almost ready ✨.

[Learn more about this workspace setup and its capabilities](https://nx.dev/nx-api/js?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects) or run `npx nx graph` to visually explore what was created. Now, let's get you up to speed!

## Finish your CI setup

[Click here to finish setting up your workspace!](https://cloud.nx.app/connect/1dtRgv7sbF)


## Generate a library

```sh
npx nx g @nx/js:lib packages/pkg1 --publishable --importPath=@my-org/pkg1
```

## Run tasks

To build the library use:

```sh
npx nx build pkg1
```

To run any task with Nx use:

```sh
npx nx <target> <project-name>
```

These targets are either [inferred automatically](https://nx.dev/concepts/inferred-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) or defined in the `project.json` or `package.json` files.

[More about running tasks in the docs &raquo;](https://nx.dev/features/run-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)

## Versioning and releasing

To version and release the library use

```
npx nx release
```

Pass `--dry-run` to see what would happen without actually releasing the library.

[Learn more about Nx release &raquo;](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)

## Keep TypeScript project references up to date

Nx automatically updates TypeScript [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) in `tsconfig.json` files to ensure they remain accurate based on your project dependencies (`import` or `require` statements). This sync is automatically done when running tasks such as `build` or `typecheck`, which require updated references to function correctly.

To manually trigger the process to sync the project graph dependencies information to the TypeScript project references, run the following command:

```sh
npx nx sync
```

You can enforce that the TypeScript project references are always in the correct state when running in CI by adding a step to your CI job configuration that runs the following command:

```sh
npx nx sync:check
```

[Learn more about nx sync](https://nx.dev/reference/nx-commands#sync)


[Learn more about Nx on CI](https://nx.dev/ci/intro/ci-with-nx#ready-get-started-with-your-provider?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)

## Install Nx Console

Nx Console is an editor extension that enriches your developer experience. It lets you run tasks, generate code, and improves code autocompletion in your IDE. It is available for VSCode and IntelliJ.

[Install Nx Console &raquo;](https://nx.dev/getting-started/editor-setup?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)

## Useful links

Learn more:

- [Learn more about this workspace setup](https://nx.dev/nx-api/js?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects)
- [Learn about Nx on CI](https://nx.dev/ci/intro/ci-with-nx?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
- [Releasing Packages with Nx release](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
- [What are Nx plugins?](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)

And join the Nx community:
- [Discord](https://go.nx.dev/community)
- [Follow us on X](https://twitter.com/nxdevtools) or [LinkedIn](https://www.linkedin.com/company/nrwl)
- [Our Youtube channel](https://www.youtube.com/@nxdevtools)
- [Our blog](https://nx.dev/blog?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
1 change: 1 addition & 0 deletions apps/client/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SERVER_URL=""
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

For client-side access in Next.js, prefix with NEXT_PUBLIC_

Environment variables must start with NEXT_PUBLIC_ to be exposed to the browser. If this is consumed in the client app, rename accordingly and add a newline.

-SERVER_URL=""
+NEXT_PUBLIC_SERVER_URL=
📝 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
SERVER_URL=""
# apps/client/.env.example
NEXT_PUBLIC_SERVER_URL=
🧰 Tools
🪛 dotenv-linter (3.3.0)

[warning] 1-1: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)


[warning] 1-1: [QuoteCharacter] The value has quote characters (', ")

(QuoteCharacter)

🤖 Prompt for AI Agents
In apps/client/.env.example around lines 1 to 1, the SERVER_URL variable will
not be exposed to the browser; rename it to NEXT_PUBLIC_SERVER_URL and ensure
the file ends with a newline. Update the key to NEXT_PUBLIC_SERVER_URL="" so
Next.js can expose it to client-side code and add a trailing newline character
to the file.

41 changes: 41 additions & 0 deletions apps/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env

Comment on lines +33 to +35
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Broaden env ignores to prevent accidental secret commits.

Only ignoring “.env” risks leaking values from .env.local, .env.production, etc. Keep .env.example tracked.

Apply this diff:

-# env files (can opt-in for committing if needed)
-.env
+# env files (opt-in via .env.example only)
+.env
+.env.local
+.env.*.local
+.env.development
+.env.production
+.env.test
+!.env.example
📝 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
# env files (can opt-in for committing if needed)
.env
# env files (opt-in via .env.example only)
.env
.env.local
.env.*.local
.env.development
.env.production
.env.test
!.env.example
🤖 Prompt for AI Agents
In apps/client/.gitignore around lines 33 to 35, the file only ignores ".env"
which still allows committing other env variants (.env.local, .env.production,
etc.); update the ignore pattern to ignore all env files by replacing the ".env"
entry with ".env*" and add an explicit exception for the example file by adding
a negate rule for ".env.example" (e.g., add "!.env.example") so the example
stays tracked while all actual env variants are ignored.

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
1 change: 1 addition & 0 deletions apps/client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## BrowserPlugins
File renamed without changes.
16 changes: 16 additions & 0 deletions apps/client/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname,
});

const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
];

export default eslintConfig;
File renamed without changes.
File renamed without changes.
55 changes: 55 additions & 0 deletions apps/client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "@browserplugins/client",
"version": "1.1.2",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@browserplugins/schema": "workspace:*",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-hover-card": "^1.1.14",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slider": "^1.3.5",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-switch": "^1.2.5",
"@radix-ui/react-tabs": "^1.1.12",
"@radix-ui/react-tooltip": "^1.2.7",
"axios": "^1.11.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.525.0",
"moment": "^2.30.1",
"next": "15.3.5",
"next-themes": "^0.4.6",
"postcss": "^8.5.6",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sonner": "^2.0.6",
"tailwind-merge": "^3.3.1",
"tailwindcss-animate": "^1.0.7",
"zod": "^4.0.14",
"zustand": "^5.0.7"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19.1.10",
"@types/react-dom": "^19.1.7",
"eslint": "^9",
"eslint-config-next": "15.3.5",
"tailwindcss": "^4",
"tw-animate-css": "^1.3.5",
"typescript": "^5"
}
}
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const browsers = [
"chrome",
"firefox",
"microsoft edge",
"safari",
] as const;
export type Browser = (typeof browsers)[number];
export const browsers = [
"chrome",
"firefox",
"microsoft edge",
"safari",
] as const;
export type Browser = (typeof browsers)[number];
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export const category = [
"productivity",
"security",
"developer",
"social",
"entertainment",
"utility",
"all",
] as const;
export type Category = (typeof category)[number];
export const category = [
"productivity",
"security",
"developer",
"social",
"entertainment",
"utility",
"all",
] as const;
export type Category = (typeof category)[number];
Loading
Loading