BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/mrdoge-ui/mrdoge-token-route

Mr. Doge Token Route

mrdoge-ui/mrdoge-token-route
FreeItem

Server route that mints short-lived SDK tokens for the browser client, using @mrdoge/node and your MRDOGE_ODDS_API_KEY.

Install it

npx shadcn@latest add https://mrdoge.co/r/mrdoge-token-route.json

Source

registry/mrdoge-ui/mrdoge-token-route/route.tsmrdoge.co/r/mrdoge-token-route.json
1import "server-only"
2import { NextResponse } from "next/server"
3import { MrDoge } from "@mrdoge/node"
4import { isRateLimited } from "@/lib/rate-limit"
5
6let client: MrDoge | null = null
7
8function getClient() {
9 if (!client) {
10 client = new MrDoge({ apiKey: process.env.MRDOGE_ODDS_API_KEY! })
11 }
12 return client
13}
14
15// This site has no user sessions to gate on (public docs/demo widgets),
16// so this follows the SDK's own documented "anonymous public widget"
17// pattern (see content/docs/(sdk)/authentication.mdx): rate-limit instead
18// of a session check, and keep the minted token's blast radius short.
19export async function POST(request: Request) {
20 const ip = request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() ?? "unknown"
21 if (isRateLimited(ip)) {
22 return NextResponse.json({ error: "Too many requests" }, { status: 429 })
23 }
24
25 const { token, expiresAt } = await getClient().tokens.create({ ttl: 300 })
26 return NextResponse.json({ token, expiresAt })
27}

What it pulls in

npm packages

  • @mrdoge/node
  • server-only

Other registry items

  • rate-limit

Files it writes

  • registry/mrdoge-ui/mrdoge-token-route/route.ts

Facts

Registry
mrdoge-ui
Type
registry:item
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

mrdoge.co mrdogeco/docs on GitHub Raw registry item This item as JSON

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex