feat: add MCP marketplace and custom scrollbar styles

Add comprehensive CSS styles for the MCP Marketplace interface, including card hover effects, responsive grid layout, modal backdrop blur, category badges, rating stars, install buttons, and loading animations. Also include custom scrollbar styling for the model selector to enhance user experience and visual consistency.
This commit is contained in:
Evandro Fonseca Junior committed 2025-10-28 19:40:45 -03:00
1 parent d5dd3a9f09
commit ce010d39ee
31 files changed
+4127 -45

No files matched your search

+68
View File
@@ -0,0 +1,68 @@
import { NextResponse } from "next/server";
import { MCPCacheRepository } from "@/database/repositories/mcp-cache";
export const dynamic = "force-dynamic";
/**
* GET /api/mcp/categories - Obter categorias dinâmicas do cache
*/
export async function GET(request: Request) {
try {
console.log("📊 Fetching dynamic categories from cache...");
// Verificar se cache existe e tem dados
const cacheExists = MCPCacheRepository.tableExists("mcp_marketplace_cache");
if (!cacheExists) {
return NextResponse.json({
success: false,
error: "Cache not initialized",
categories: {
primary: [],
others: [],
},
});
}
// Obter categorias dinâmicas
const categories = MCPCacheRepository.getCategories();
const stats = MCPCacheRepository.getCategoryStats();
// Verificar se há dados no cache
if (stats.totalMCPs === 0) {
return NextResponse.json({
success: false,
error: "No MCPs found in cache",
categories: {
primary: [],
others: [],
},
stats,
});
}
console.log(
`📊 Categories extracted: ${categories.primary.length} primary, ${categories.others.length} others`
);
return NextResponse.json({
success: true,
categories,
stats,
lastSync: MCPCacheRepository.getLastSync(),
cacheValid: MCPCacheRepository.isCacheValid(),
});
} catch (error: any) {
console.error("Error fetching categories:", error);
return NextResponse.json(
{
success: false,
error: error.message || "Failed to fetch categories",
categories: {
primary: [],
others: [],
},
},
{ status: 500 }
);
}
}