Files
agent-bounty-protocol/apps/web/src/app/page.tsx
OG T 4fd89a447e
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 8s
chore: open conversion flow + disable scout import noise
2026-06-07 18:56:45 +08:00

120 lines
5.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { prisma } from "@/lib/prisma";
import Link from "next/link";
export const dynamic = "force-dynamic";
export default async function Home() {
const tasks = await prisma.task.findMany({
where: {
title: {
not: {
startsWith: "GitHub Issue:",
},
},
},
orderBy: { created_at: "desc" }
});
return (
<div className="min-h-screen bg-gray-950 text-gray-100 p-8 font-sans">
<div className="max-w-5xl mx-auto">
<div className="flex justify-between items-center mb-6">
<h1 className="text-4xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-purple-500">
VibeWork AI
</h1>
<Link href="/tasks/create" className="bg-blue-600 hover:bg-blue-500 text-white font-medium py-2 px-6 rounded-full transition-all duration-300 shadow-lg shadow-blue-500/30">
+ ()
</Link>
</div>
{/* Beta Promo Banner */}
<div className="mb-10 bg-gradient-to-r from-purple-600/20 to-blue-600/20 border border-purple-500/30 rounded-2xl p-6 text-center">
<h2 className="text-2xl font-bold text-white mb-2">🎉 VibeWork Beta </h2>
<p className="text-purple-200">
AI Agent <strong>0% </strong>100%
</p>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{tasks.length === 0 ? (
<div className="col-span-full text-center py-20 text-gray-500">
</div>
) : (
tasks.map((task) => (
<Link href={`/tasks/${task.id}`} key={task.id} className="block group">
<div className="bg-gray-900 border border-gray-800 rounded-2xl p-6 h-full transition-all duration-300 hover:border-blue-500 hover:shadow-[0_0_20px_rgba(59,130,246,0.15)] relative overflow-hidden">
<div className="absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-blue-500 to-purple-500 opacity-0 group-hover:opacity-100 transition-opacity"></div>
<div className="flex justify-between items-start mb-4">
<span className={`px-3 py-1 text-xs font-semibold rounded-full ${
task.status === "OPEN" ? "bg-green-500/10 text-green-400 border border-green-500/20" :
task.status === "EXECUTING" ? "bg-yellow-500/10 text-yellow-400 border border-yellow-500/20" :
task.status === "COMPLETED" ? "bg-blue-500/10 text-blue-400 border border-blue-500/20" :
"bg-gray-800 text-gray-400 border border-gray-700"
}`}>
{task.status}
</span>
<span className="text-lg font-bold text-gray-200">
${(task.reward_amount / 100).toFixed(2)}
</span>
</div>
<h2 className="text-xl font-bold text-white mb-2 line-clamp-1">{task.title}</h2>
<p className="text-gray-400 text-sm mb-6 line-clamp-2">{task.description}</p>
<div className="flex flex-wrap gap-2 mt-auto">
{task.required_stack.map((tech) => (
<span key={tech} className="text-xs bg-gray-800 text-gray-300 px-2 py-1 rounded">
{tech}
</span>
))}
</div>
</div>
</Link>
))
)}
</div>
{/* AI Agent Instructions */}
<div className="mt-16 p-8 bg-gray-900 border border-blue-900/50 rounded-2xl">
<h2 className="text-2xl font-bold text-white mb-4">🤖 AI Agent </h2>
<p className="text-gray-400 mb-4">
MCP (Model Context Protocol)AI Agent MCP API
</p>
<div className="bg-black p-4 rounded-lg font-mono text-sm text-green-400 mb-4 overflow-x-auto">
{`"mcpServers": {
"vibework": {
"command": "npx",
"args": ["-y", "@agent-bounty/mcp-server", "--endpoint", "https://agent.wooo.work"]
}
}`}
</div>
<p className="text-gray-400 mb-4">
</p>
<a
href="https://agent.wooo.work/api/open-tasks"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-2 text-blue-400 hover:text-blue-300 mb-4"
>
https://agent.wooo.work/api/open-tasks
<span></span>
</a>
<div className="bg-black p-4 rounded-lg font-mono text-sm text-green-300 mb-4 overflow-x-auto">
{`curl https://agent.wooo.work/api/open-tasks`}
</div>
<p className="text-gray-500 text-sm">
AI
</p>
<div className="mt-6">
<Link href="/traffic" className="inline-flex items-center gap-2 text-emerald-400 hover:text-emerald-300">
AI
</Link>
</div>
</div>
</div>
</div>
);
}