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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alphaday",
"private": true,
"version": "1.3.13",
"version": "1.3.14",
"homepage": ".",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src/components/CookieDisclaimer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const CookieDisclaimer = () => {

if (noCookieChoice)
return (
<section className="fixed overflow-hidden w-full bottom-0 z-100 bg-[#27292F]">
<section className="fixed overflow-hidden w-full bottom-0 z-[100] bg-[#27292F]">
<div className="relative flex flex-col flex-wrap justify-center items-center overflow-hidden">
<div className="flex pt-5 p-2.5 lg:p-5 flex-1 flex-col lg:flex-row w-full max-w-7xl overflow-hidden items-center">
<div className="mx-auto min-w-[280px] text-center lg:text-left text-[#C2C5D6] text-xs font-normal leading-6 tracking-wider">
Expand Down
4 changes: 3 additions & 1 deletion src/components/ui/CodeBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export function CodeBlock({

const handleCopy = async () => {
try {
await navigator.clipboard.writeText(code);
const textToCopy =
language === "bash" ? code.replace(/^curl\s+/gm, "") : code;
await navigator.clipboard.writeText(textToCopy);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
} catch (err) {
Expand Down
81 changes: 61 additions & 20 deletions src/pages/api.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,31 @@ const mcpConfig = `{
}
}
}`;
const mcpClients = [
{
name: "Claude Code",
command: "claude mcp add --transport http alphaday https://api.alphaday.com/mcp",
label: "Terminal",
},
{
name: "Codex",
command: "codex mcp add alphaday --url https://api.alphaday.com/mcp",
label: "Terminal",
},
{
name: "MCP Importer",
command: "mcporter config add alphaday --url https://api.alphaday.com/mcp",
label: "Terminal",
},
{
name: "JSON Config",
command: mcpConfig,
language: "json",
label: "config.json",
},
];
const restCurl = "curl https://api.alphaday.com/news?tags=arbitrum";
const finalCurl = "curl https://api.alphaday.com/news/summary";
const finalCurl = "curl https://api.alphaday.com/get-started";
const docsUrl = "https://api.alphaday.com/docs";
const githubUrl = "https://github.com/AlphadayHQ/";

Expand All @@ -68,6 +91,7 @@ const tools = [
const ApiPage = () => {
const [copied, setCopied] = useState(false);
const [isScrolled, setIsScrolled] = useState(false);
const [activeMcp, setActiveMcp] = useState(0);

useEffect(() => {
const handleScroll = () => {
Expand All @@ -79,7 +103,7 @@ const ApiPage = () => {

const handleHeroCopy = async () => {
try {
await navigator.clipboard.writeText(heroCurl);
await navigator.clipboard.writeText(heroCurl.replace(/^curl\s+/, ""));
setCopied(true);
setTimeout(() => setCopied(false), 2000);
} catch (err) {
Expand Down Expand Up @@ -112,19 +136,19 @@ const ApiPage = () => {
<div className="hidden md:flex items-center gap-8 font-semibold text-sm">
<a
href={docsUrl}
className="text-text-muted hover:text-text transition-colors"
className="text-text-muted tracking-wide hover:text-text transition-colors"
>
Docs
</a>
<a
href={githubUrl}
className="text-text-muted hover:text-text transition-colors"
className="text-text-muted tracking-wide hover:text-text transition-colors"
>
GitHub
</a>
<a
href="/"
className="text-primary hover:text-primary-hover transition-colors flex items-center gap-1 group"
className="text-primary tracking-wide hover:text-primary-hover transition-colors flex items-center group"
>
Alphaday{" "}
<ArrowRight className="w-4 h-4 transition-transform group-hover:translate-x-1" />
Expand All @@ -147,9 +171,9 @@ const ApiPage = () => {
</h1>

<p className="text-lg md:text-xl text-text-muted max-w-3xl mb-12 leading-relaxed">
1,000+ crypto data sources. One integration. Query news, podcasts,
videos, DAO proposals, events, and more &mdash; filtered by project
or keyword. <br className="hidden md:block" />
1,000+ crypto data sources. One integration. <br />
Query news, podcasts, videos, DAO proposals, events, and more,
filtered by project or keyword. <br className="hidden md:block" />
Available as an MCP server or REST API.
</p>

Expand Down Expand Up @@ -218,7 +242,7 @@ const ApiPage = () => {
POLYGON
</span>
<span className="font-display font-bold text-2xl tracking-tight cursor-default">
Sui
SUI
</span>
</div>
</div>
Expand Down Expand Up @@ -421,11 +445,11 @@ const ApiPage = () => {
<div className="max-w-7xl mx-auto">
<div className="text-center mb-16">
<h2 className="font-display text-4xl font-bold tracking-tight mb-4">
Two ways in. Same data.
Works with your stack.
</h2>
<p className="text-lg text-text-muted max-w-2xl mx-auto">
Use our MCP server if your agent speaks MCP. Use REST if it
doesn&apos;t. Same endpoints, same data, same rate limits.
One-line setup for every major MCP client. Or use REST if your
agent doesn&apos;t speak MCP. Same data either way.
</p>
</div>

Expand All @@ -436,15 +460,32 @@ const ApiPage = () => {
1
</div>
<h3 className="font-bold text-xl">MCP Server</h3>
<span className="text-xs font-mono text-text-muted bg-surface-light px-2 py-1 rounded ml-auto">
claude_config.json
</div>
<div className="flex flex-wrap gap-2 mb-4 pl-2">
{mcpClients.map((client, i) => (
<button
key={client.name}
onClick={() => setActiveMcp(i)}
className={`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${
activeMcp === i
? "bg-primary text-background"
: "bg-surface border border-surface-border text-text-muted hover:text-text"
}`}
>
{client.name}
</button>
))}
</div>
<div className="relative">
<span className="absolute top-3 right-3 text-xs font-mono text-text-muted bg-surface-light px-2 py-1 rounded z-10">
{mcpClients[activeMcp].label}
</span>
<CodeBlock
code={mcpClients[activeMcp].command}
language={mcpClients[activeMcp].language || "bash"}
className="min-h-[140px] flex items-center"
/>
</div>
<CodeBlock
code={mcpConfig}
language="json"
className="min-h-[180px]"
/>
</div>
<div className="flex flex-col">
<div className="flex items-center gap-3 mb-4 pl-2">
Expand All @@ -459,7 +500,7 @@ const ApiPage = () => {
<CodeBlock
code={restCurl}
language="bash"
className="min-h-[180px] flex items-center"
className="lg:mt-[50px] min-h-[140px] flex items-center"
/>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module.exports = {
border: "#3b3a3a",
},
text: {
DEFAULT: "#f2f2f2",
DEFAULT: "#e7e7e7",
DEFAULT3: "#e7e7e7",
muted: "#849399",
},
primary: {
Expand Down
Loading