Skip to content

B-MCP: An Idea for an in browser implementation of the Model-Context-Protocol #1

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
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
50 changes: 50 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# # EditorConfig is awesome: https://EditorConfig.org

# # top-most EditorConfig file
# root = true

# # Unix-style newlines with a newline ending every file
# [*]
# charset = utf-8
# end_of_line = lf
# insert_final_newline = true
# trim_trailing_whitespace = true
# indent_style = space
# indent_size = 2

# # TypeScript/JavaScript files
# [*.{ts,tsx,js,jsx,mjs,cjs}]
# indent_size = 2
# quote_type = single

# # JSON files
# [*.json]
# indent_size = 2

# # YAML files
# [*.{yml,yaml}]
# indent_size = 2

# # Markdown files
# [*.md]
# trim_trailing_whitespace = false

# # Package files
# [package.json]
# indent_size = 2

# # Config files
# [.{prettierrc,eslintrc,babelrc}]
# indent_size = 2

# # HTML files
# [*.html]
# indent_size = 2

# # CSS/SCSS files
# [*.{css,scss,sass}]
# indent_size = 2

# # Makefile
# [Makefile]
# indent_style = tab
4 changes: 0 additions & 4 deletions .env.example

This file was deleted.

67 changes: 28 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,31 @@
# 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
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

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

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# wrangler files
.wrangler
.dev.vars*
.env
extension/chrome
.turbo
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node-linker=isolated
strict-peer-dependencies=false
link-workspace-packages=true
auto-install-peers=true
29 changes: 29 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Dependencies
node_modules/
pnpm-lock.yaml

# Build outputs
dist/
build/
.turbo/
.cache/
*.tsbuildinfo

# Generated files
*.gen.ts
routeTree.gen.ts

# Extension specific
extension/.wxt/
extension/dist/

# Web specific
web/dist/
web/.wrangler/
web/worker/db/migrations/

# Misc
coverage/
.env*
*.log
.DS_Store
19 changes: 19 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "es5",
"printWidth": 80,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"plugins": ["@ianvs/prettier-plugin-sort-imports"],
"importOrder": [
"^react$",
"^react-dom$",
"<THIRD_PARTY_MODULES>",
"^@/(.*)$",
"^[./]"
]
}
103 changes: 103 additions & 0 deletions FORMATTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Code Formatting and Linting Setup

This project uses a consistent code formatting and linting setup across the monorepo.

## Tools Used

- **Prettier** - Code formatter for consistent style
- **ESLint** - Linter for catching errors and enforcing code quality
- **EditorConfig** - Ensures consistent coding styles across different editors

## Configuration Files

- `.prettierrc.json` - Prettier configuration
- `.prettierignore` - Files to exclude from Prettier formatting
- `eslint.config.js` - ESLint configuration (using flat config)
- `.editorconfig` - Editor configuration for consistent coding styles
- `.vscode/settings.json` - VSCode workspace settings

## Available Commands

### Format all files in the workspace

```bash
pnpm format
```

### Check formatting without making changes

```bash
pnpm format:check
```

### Run ESLint with auto-fix

```bash
pnpm lint
```

### Check linting without auto-fix

```bash
pnpm lint:check
```

### Run all checks (typecheck, lint, format)

```bash
pnpm check-all
```

## VSCode Integration

The workspace is configured to:

- Format on save using Prettier
- Fix ESLint errors on save
- Organize imports on save

Make sure you have these VSCode extensions installed:

- ESLint (`dbaeumer.vscode-eslint`)
- Prettier (`esbenp.prettier-vscode`)
- EditorConfig (`EditorConfig.EditorConfig`)

## Formatting Rules

### TypeScript/JavaScript

- Single quotes for strings
- Semicolons required
- 2 space indentation
- Trailing commas (ES5 style)
- 80 character line width
- Arrow function parentheses always

### Import Organization

Imports are automatically sorted in this order:

1. React imports
2. Third-party modules
3. Alias imports (`@/...`)
4. Relative imports

## Monorepo Considerations

The configuration files at the root apply to all packages in the monorepo. Individual packages can override settings if needed by creating their own configuration files.

## Installing Dependencies

The required ESLint packages have been added to the root `package.json`. Run:

```bash
pnpm install
```

This will install all necessary dependencies including the ESLint packages needed for the configuration.

## Notes

- The ESLint configuration uses a simplified setup without TypeScript project references to avoid complexity in the monorepo
- Generated files and build outputs are automatically excluded from linting and formatting
- The import sorting plugin for Prettier is configured but may require the `@ianvs/prettier-plugin-sort-imports` package to be installed
25 changes: 0 additions & 25 deletions README.md

This file was deleted.

36 changes: 0 additions & 36 deletions app/api/chat/route.ts

This file was deleted.

45 changes: 0 additions & 45 deletions app/assistant.tsx

This file was deleted.

Binary file removed app/favicon.ico
Binary file not shown.
Loading