Skip to content
Merged
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
175 changes: 175 additions & 0 deletions betterbase/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 44 additions & 2 deletions betterbase/packages/client/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
# @betterbase/client (Scaffold)
# @betterbase/client

Client SDK package placeholder.
TypeScript client for BetterBase backends.

## Installation

```bash
bun add @betterbase/client
```

## Usage

```typescript
import { createClient } from '@betterbase/client';

const betterbase = createClient({
url: 'http://localhost:3000',
key: 'optional-api-key',
});

const { data, error } = await betterbase
.from('users')
.select('*')
.eq('status', 'active')
.limit(10)
.execute();

await betterbase.auth.signUp({
email: 'user@example.com',
password: 'password123',
name: 'John Doe',
});

betterbase
.realtime
.from('posts')
.on('INSERT', (payload) => {
console.log('New post:', payload.data);
})
.subscribe();
```

## API Reference

See [documentation](https://betterbase.dev/docs/client) for full API reference.
48 changes: 48 additions & 0 deletions betterbase/packages/client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "@betterbase/client",
"version": "0.1.0",
"description": "TypeScript client for BetterBase backends",
"license": "MIT",
"author": "BetterBase",
"repository": {
"type": "git",
"url": "https://github.com/betterbase/betterbase.git"
},
Comment on lines +7 to +10
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Git Remote Origin ==="
git config --get remote.origin.url 2>/dev/null || echo "No remote.origin found"

echo
echo "=== All package.json files with repository field ==="
fd -t f "package.json" | while read -r file; do
  if grep -q '"repository"' "$file" 2>/dev/null; then
    echo "File: $file"
    grep -A 3 '"repository"' "$file" | head -4
    echo
  fi
done

echo "=== Root directory structure ==="
ls -la | head -20

Repository: Helal-maker/Betterbase

Length of output: 934


Update the repository URL to match the actual repository.

The repository URL points to https://github.com/betterbase/betterbase.git, but the actual repository is at https://github.com/Helal-maker/Betterbase.git. Without this fix, npm will direct users to the wrong repository.

Proposed fix
   "repository": {
     "type": "git",
-    "url": "https://github.com/betterbase/betterbase.git"
+    "url": "https://github.com/Helal-maker/Betterbase.git"
   },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@betterbase/packages/client/package.json` around lines 7 - 10, Update the
"repository.url" value in package.json to the correct GitHub repository; locate
the repository object (the "repository" key containing "type" and "url") and
replace "https://github.com/betterbase/betterbase.git" with
"https://github.com/Helal-maker/Betterbase.git" so npm links point to the actual
repo.

"engines": {
"node": ">=18"
},
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"scripts": {
"build": "bun run src/build.ts",
"dev": "bun --watch run src/build.ts",
"test": "bun test",
"typecheck": "tsc --noEmit --project tsconfig.json",
"lint": "tsc --noEmit --project tsconfig.test.json",
"typecheck:test": "tsc --project tsconfig.test.json"
},
"keywords": [
"betterbase",
"baas",
"backend",
"database",
"realtime"
],
"files": [
"dist",
"README.md"
],
"devDependencies": {
"@types/bun": "^1.3.9",
"typescript": "^5.9.3"
}
}
Loading