Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ae5fa35
feat(docs): add ADR-0004 for Cascade Market Architecture
tenequm Dec 11, 2025
c59527f
feat: implement initial app scaffold
tenequm Dec 11, 2025
01065b0
chore(style): update app's style
tenequm Dec 11, 2025
0c648e6
feat: add spec for Base EVM support
tenequm Dec 11, 2025
0510e97
feat: improve adr specs to better utilize existing libs and align wit…
tenequm Dec 11, 2025
e6c3928
chore: remove redundant fumadocs app
tenequm Dec 11, 2025
537ccd8
feat(market): add OAuth 2.0 + SIWS authentication
tenequm Dec 12, 2025
1b754f3
feat(market): add x402 facilitator, Go CLI, and upgrade gateway to v2
tenequm Dec 12, 2025
28cc100
chore(cli): configure goreleaser for monorepo tags
tenequm Dec 12, 2025
cb530f7
refactor(gateway): use @x402/core types instead of local definitions
tenequm Dec 12, 2025
b139bf6
refactor(market): use @solana/wallet-standard-util for proper SIWS ve…
tenequm Dec 12, 2025
eb20bc7
feat(market): standalone Tabs page + fix Splits wallet detection
tenequm Dec 12, 2025
6dd6455
feat: add Starlight docs site, x402 settlement endpoints, and GitHub …
tenequm Dec 13, 2025
7af9ddc
docs: update adr 0004 to represent a simplified client flow
tenequm Dec 16, 2025
191c845
docs: update adr 0004 to optimize the design
tenequm Dec 16, 2025
9e487a8
chore(docs): remove duplicate ADRs and benchmarks
tenequm Dec 16, 2025
55fb090
refactor(cli): migrate from Go to TypeScript
tenequm Dec 16, 2025
ee62e25
feat(market): implement P0/P1 gateway security fixes
tenequm Dec 16, 2025
c095335
refactor(market): on-chain service discovery via splits-sdk
tenequm Dec 16, 2025
23a7f4f
chore(cli): add sourcemap and disable dotenv autoload in builds
tenequm Dec 16, 2025
c1a0039
refactor(market): rename TunnelRelay to ServiceBridge
tenequm Dec 16, 2025
55b8308
revert(market): rename ServiceBridge back to TunnelRelay
tenequm Dec 16, 2025
1e143ad
fix(market): implement P0/P1 gateway security fixes
tenequm Dec 16, 2025
c5d4107
feat(cli): implement Cascade Market commands per ADR-0004 §3.1
tenequm Dec 16, 2025
56fdfbe
feat(market): add RFC 8414 OAuth metadata discovery endpoint
tenequm Dec 16, 2025
6d09fc8
refactor(market): migrate OAuth to workers-oauth-provider
tenequm Dec 16, 2025
048cec5
feat(github): add Dockerfile and configuration files for MCP setup
tenequm Dec 28, 2025
ba0e331
feat(helper): add labelToUniqueId and uniqueIdToLabel functions for i…
tenequm Dec 28, 2025
622b6d4
Merge branch 'main' into feat/cascade-market
tenequm Dec 30, 2025
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 .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,56 @@ Protocol authority transfer requires two transactions:

Can be overwritten by calling transfer again. Cancel by setting to `Pubkey::default()`.

### 7. TanStack Start + Cloudflare Workers (apps/market)

**Problem:** `cloudflare:workers` imports fail during client bundle build because Rollup can't resolve them.

**Root Cause:** When a route file imports from `@/server/foo.ts`, Rollup walks the entire module tree. If `foo.ts` imports `cloudflare:workers`, the build fails—even with dynamic imports.

**Solution:** Follow Cloudflare's official pattern:

```typescript
// ✅ CORRECT: In route file (e.g., routes/oauth/authorize.tsx)
import { createServerFn } from "@tanstack/react-start";
import { env } from "cloudflare:workers"; // Static import OK in route files
import { businessLogic } from "@/server/oauth"; // Pure function, no cloudflare imports

const myServerFn = createServerFn({ method: "POST" })
.inputValidator((data: MyType) => data)
.handler(async ({ data }) => {
// Access env INSIDE the handler - this runs server-side only
return businessLogic(env.DB, env.JWT_SECRET, data);
});
```

```typescript
// ✅ CORRECT: In server module (e.g., server/oauth.ts)
// NO cloudflare:workers import here!
export async function businessLogic(
db: D1Database,
jwtSecret: string,
data: MyType
) {
// Pure function - dependencies passed as parameters
return db.prepare("...").bind(...).run();
}
```

```typescript
// ❌ WRONG: Server module importing cloudflare:workers
import { env } from "cloudflare:workers"; // Breaks client build!
export async function businessLogic(data: MyType) {
return env.DB.prepare("...").run();
}
```

**Why it works:** TanStack Start code-splits `createServerFn` handlers from client bundles. The `@cloudflare/vite-plugin` handles `cloudflare:workers` for SSR. By keeping the import in the route file (not shared modules), only server code sees it.

**File organization:**
- `@/server/*.ts` - Pure functions accepting `db`, `jwtSecret`, etc. as params
- `routes/**/*.tsx` - Server functions with `cloudflare:workers` import
- `gateway/*.ts` - Server-only (Hono/Durable Objects), can import directly

## Architecture

```
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ __pycache__/



# Astro/Starlight
.astro/

# Nx
.nx/cache
.nx/workspace-data
.cursor/rules/nx-rules.mdc
Expand Down
7 changes: 0 additions & 7 deletions apps/docs/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions apps/docs/README.md

This file was deleted.

35 changes: 0 additions & 35 deletions apps/docs/app/app.css

This file was deleted.

50 changes: 0 additions & 50 deletions apps/docs/app/components/search.tsx

This file was deleted.

51 changes: 0 additions & 51 deletions apps/docs/app/docs/page.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions apps/docs/app/docs/search.ts

This file was deleted.

15 changes: 0 additions & 15 deletions apps/docs/app/lib/layout.shared.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions apps/docs/app/lib/source.ts

This file was deleted.

111 changes: 0 additions & 111 deletions apps/docs/app/root.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions apps/docs/app/routes.ts

This file was deleted.

Loading