Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
bedc9d0
Subscribe to theme changes
AdamEXu Jun 2, 2026
764a1fa
OR Base URL
AdamEXu Jun 3, 2026
f909a8a
Merge branch 'main' of https://github.com/tinyfish-io/bigset
AdamEXu Jun 3, 2026
228550c
add local mode
AdamEXu Jun 3, 2026
f7ee62b
swap in wordmarks
AdamEXu Jun 3, 2026
8f155cd
Add OS keychain storage for local credentials
AdamEXu Jun 4, 2026
eee5b3c
Remove local OpenRouter OAuth setup
AdamEXu Jun 4, 2026
15bc03a
remove nextjs dev indicator
AdamEXu Jun 4, 2026
376c777
Merge branch 'main' of https://github.com/tinyfish-io/bigset
AdamEXu Jun 4, 2026
cac2e9e
allow more origins (less strict CORS)
AdamEXu Jun 4, 2026
09d612e
fix up settings page
AdamEXu Jun 4, 2026
4b73c10
add build script
AdamEXu Jun 4, 2026
7d993dd
Merge branch 'main' of https://github.com/tinyfish-io/bigset
AdamEXu Jun 5, 2026
c7f77e8
fix a few bugs and things brought up by coderabbit
AdamEXu Jun 5, 2026
875cda1
remove the convex skip thing
AdamEXu Jun 5, 2026
7f074ec
Merge branch 'main' into main
simantak-dabhade Jun 5, 2026
aea1de0
check for bad open router credential
AdamEXu Jun 5, 2026
ae397b3
undo something
AdamEXu Jun 5, 2026
d918c06
Merge branch 'main' of https://github.com/AdamEXu/bigset
AdamEXu Jun 5, 2026
d596115
add automated building scripts
AdamEXu Jun 5, 2026
f3dae21
convex! to the github!
AdamEXu Jun 5, 2026
59a7597
Fix Windows release backend bundling
AdamEXu Jun 5, 2026
16ea01c
Pin release workflow actions to SHAs
AdamEXu Jun 6, 2026
2dedc18
fix some issues that coderabbit didn't like
AdamEXu Jun 6, 2026
dbe6924
fix build thing
AdamEXu Jun 6, 2026
4735533
update README
AdamEXu Jun 8, 2026
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: 0 additions & 50 deletions .env.example

This file was deleted.

83 changes: 83 additions & 0 deletions .github/workflows/build-release-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: Build Release Artifacts

on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
release_tag:
description: Existing release tag to upload assets to. Leave empty to only upload workflow artifacts.
required: false
type: string
release:
types: [published]

permissions:
contents: write

jobs:
build:
name: Build ${{ matrix.platform }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- platform: darwin-arm64
runner: macos-15
- platform: darwin-x64
runner: macos-15-intel
- platform: linux-arm64
runner: ubuntu-24.04-arm
- platform: linux-x64
runner: ubuntu-24.04
- platform: win32-arm64
runner: windows-11-arm
- platform: win32-x64
runner: windows-2025

env:
ARTIFACT_NAME: bigset-build-${{ matrix.platform }}.zip

steps:
- name: Checkout
uses: actions/checkout@v4
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

- name: Setup Node
uses: actions/setup-node@v4
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
with:
node-version: "24"

- name: Install frontend dependencies
working-directory: frontend
run: npm install --silent

- name: Install backend dependencies
working-directory: backend
run: npm install --silent

- name: Build release
run: node scripts/build-release.mjs

- name: Rename artifact
run: node -e "const fs = require('fs'); fs.renameSync('dist/bigset-build.zip', 'dist/' + process.env.ARTIFACT_NAME);"

- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}
path: dist/${{ env.ARTIFACT_NAME }}
if-no-files-found: error

- name: Upload release asset
if: github.event_name == 'release' || inputs.release_tag != ''
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "${{ github.event.release.tag_name || inputs.release_tag }}" "dist/${{ env.ARTIFACT_NAME }}" --clobber
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

- name: Upload legacy release asset
if: (github.event_name == 'release' || inputs.release_tag != '') && matrix.platform == 'darwin-arm64'
env:
GH_TOKEN: ${{ github.token }}
run: |
node -e "const fs = require('fs'); fs.copyFileSync('dist/' + process.env.ARTIFACT_NAME, 'dist/bigset-build.zip');"
gh release upload "${{ github.event.release.tag_name || inputs.release_tag }}" "dist/bigset-build.zip" --clobber
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ yarn-debug.log*

# Local-only files
*.bak
.local/
dist/
tmp/
temp/

Expand Down
1 change: 0 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

## What not to do

- Do not add Clerk, Auth0, or any third-party auth service. We use Better Auth (self-hosted).
- Do not add API routes to the frontend. All API logic belongs in the backend.
- Do not hardcode ports. Read from env vars (`PORT`, `CLIENT_ORIGIN`, `BETTER_AUTH_URL`).
- Do not commit `.env` files or secrets.
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ TinyFish powers all web search and page fetching. Search and Fetch have generous

1. Go to [tinyfish.ai](https://www.tinyfish.ai?utm_source=github&utm_medium=organic&utm_campaign=bigset-developer-2026q2) and create an account
2. Go to [API Keys](https://agent.tinyfish.ai/api-keys?utm_source=github&utm_medium=organic&utm_campaign=bigset-developer-2026q2) and create a key
3. Paste it as `TINYFISH_API_KEY` in `.env`
3. Keep it handy; you'll paste it into BigSet's setup screen after `make dev`. Local keys are stored in your OS keychain.

### Step 3: Set up OpenRouter (LLM)

OpenRouter routes LLM calls to Claude Sonnet (schema inference) and Qwen (agents). It's pay-as-you-go; a dataset costs a few dollars in LLM usage.

1. Go to [openrouter.ai](https://openrouter.ai) and create an account
2. Go to [Settings → Keys](https://openrouter.ai/settings/keys) and create an API key
3. Paste it as `OPENROUTER_API_KEY` in `.env`
3. Keep it handy; you'll paste it into BigSet's setup screen after `make dev`. Local keys are stored in your OS keychain.
4. Add some credits; $5-10 is plenty to start

### Step 4: Set up Clerk (auth)
Expand Down Expand Up @@ -134,6 +134,7 @@ Once everything is ready, you'll see:
| **Mastra Studio** (workflow inspector) | [localhost:4111](http://localhost:4111) |

Open [localhost:3500](http://localhost:3500) and click **Get started** to sign in.
The setup screen will ask for TinyFish and OpenRouter credentials and save them to your OS keychain for this workspace.

> **Note:** root `.env` is the only local env file. If you edit Convex functions in `frontend/convex/`, run `make convex-push` to deploy the changes.

Expand All @@ -155,15 +156,16 @@ This is idempotent; safe to run multiple times.

`make dev` is designed to handle everything — first run, subsequent runs, and recovery from bad state. You should never need to run any other setup command. Here's what it does, in order:

1. **Validates your `.env`** — checks that all required API keys are set (Clerk, OpenRouter, TinyFish). Stops with a clear error if anything is missing.
1. **Validates your `.env`** — checks required production keys when `PROD=1`; local mode generates keychain bridge settings automatically.
2. **Installs dependencies** — runs `npm install` in both `frontend/` and `backend/`. Silent if already up to date.
3. **Starts the database layer** — brings up Postgres and Convex (self-hosted) first, since other services depend on them.
4. **Waits for Convex** — polls the Convex health endpoint until it's ready (up to 120s).
5. **Ensures the admin key** — if `CONVEX_SELF_HOSTED_ADMIN_KEY` is empty in `.env`, generates one automatically and writes it. If a key exists, validates it against the running Convex instance. If the key is stale (e.g. you ran `make clean` and wiped the database), it detects the mismatch and regenerates.
6. **Pushes Convex config** — sets the Clerk JWT issuer URL in Convex so auth tokens are validated correctly.
7. **Deploys Convex schema** — pushes the table schema and functions from `frontend/convex/` to the running instance.
8. **Starts remaining services** — brings up the frontend, backend, and Mastra. These read the now-populated `.env` including the admin key.
9. **Streams logs** — tails all container logs so you can see what's happening. `Ctrl+C` to stop watching (containers keep running).
3. **Starts the local keychain bridge** — runs a host-side helper so Docker services can read/write this workspace's OS keychain entries.
4. **Starts the database layer** — brings up Postgres and Convex (self-hosted) first, since other services depend on them.
5. **Waits for Convex** — polls the Convex health endpoint until it's ready (up to 120s).
6. **Ensures the admin key** — if `CONVEX_SELF_HOSTED_ADMIN_KEY` is empty in `.env`, generates one automatically and writes it. If a key exists, validates it against the running Convex instance. If the key is stale (e.g. you ran `make clean` and wiped the database), it detects the mismatch and regenerates.
7. **Pushes Convex config** — sets the Clerk JWT issuer URL in Convex so auth tokens are validated correctly.
8. **Deploys Convex schema** — pushes the table schema and functions from `frontend/convex/` to the running instance.
9. **Starts remaining services** — brings up the frontend, backend, and Mastra. These read the now-populated `.env` including the admin key.
10. **Streams logs** — tails all container logs so you can see what's happening. `Ctrl+C` to stop watching (containers keep running).

### Commands

Expand All @@ -189,7 +191,7 @@ Other commands you might use during development:
| Problem | What happens |
|---------|-------------|
| Missing `.env` | Error: "Run: cp .env.example .env" |
| Missing API key | Error tells you exactly which key to set |
| Missing production API key | Error tells you exactly which key to set |
| Stale admin key (after `make clean`) | Detected automatically, regenerated |
| Containers already running | No-op for running services, starts any that are missing |
| Convex won't start | Error after 120s timeout — check Docker is running |
Expand All @@ -202,12 +204,13 @@ If you want a completely fresh start: `make clean` then `make dev`.

| Variable | Required | Where to get it |
|----------|----------|----------------|
| `TINYFISH_API_KEY` | | [tinyfish.ai](https://agent.tinyfish.ai/api-keys?utm_source=github&utm_medium=organic&utm_campaign=bigset-developer-2026q2) → API Keys |
| `OPENROUTER_API_KEY` | | openrouter.ai → Settings → Keys |
| `TINYFISH_API_KEY` | Production only | [tinyfish.ai](https://agent.tinyfish.ai/api-keys?utm_source=github&utm_medium=organic&utm_campaign=bigset-developer-2026q2) → API Keys |
| `OPENROUTER_API_KEY` | Production only | openrouter.ai → Settings → Keys |
| `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` | ✅ | Clerk dashboard → API Keys |
| `CLERK_SECRET_KEY` | ✅ | Clerk dashboard → API Keys |
| `CLERK_JWT_ISSUER_DOMAIN` | ✅ | Clerk dashboard → Settings/Domains |
| `CONVEX_SELF_HOSTED_ADMIN_KEY` | Auto | Auto-generated by `make dev` on first run |
| `LOCAL_KEYCHAIN_PORT`, `LOCAL_KEYCHAIN_TOKEN`, `BIGSET_LOCAL_WORKSPACE_ID` | Auto | Auto-generated by `make dev` for local OS keychain access |
| `RESEND_API_KEY` | Optional | For "dataset ready" emails. Leave blank to skip. |
| `NEXT_PUBLIC_POSTHOG_KEY` | Optional | For product analytics. Leave blank to disable. |

Expand Down
Loading