@programinglive/dev-workflow-mcp-server 1.4.0 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish.yml +3 -0
- package/CHANGELOG.md +132 -2
- package/README.md +2 -1
- package/docs/PLESK_DEPLOYMENT.md +170 -0
- package/docs/WORKFLOW-BEST-PRACTICES.md +58 -0
- package/docs/product/PRD.md +1 -0
- package/docs/release-notes/RELEASE_NOTES.md +59 -0
- package/package.json +7 -6
- package/release-wrapper.js +68 -33
- package/scripts/update-release-notes.cjs +14 -18
- package/tailwind.config.js +2 -4
- package/tests/build.test.js +16 -3
- package/tests/handlers.test.js +78 -0
- package/tests/release-wrapper.test.js +2 -0
- package/tests/workflowState.test.js +7 -4
- package/tools/definitions.js +2 -2
- package/tools/handlers.js +2 -2
- package/vite.web.config.js +23 -0
- package/web/README.md +36 -0
- package/web/app/api/docs/route.ts +32 -0
- package/web/app/api/history/route.ts +19 -0
- package/web/app/api/npm-downloads/route.ts +21 -0
- package/web/app/api/summary/route.ts +15 -0
- package/web/app/api/version/route.ts +15 -0
- package/web/app/docs/page.tsx +202 -0
- package/web/app/favicon.ico +0 -0
- package/web/app/globals.css +91 -0
- package/web/app/layout.tsx +36 -0
- package/web/app/page.tsx +15 -0
- package/web/components/ApiReference.tsx +20 -0
- package/web/components/Features.tsx +61 -0
- package/web/components/Footer.tsx +9 -0
- package/web/components/Hero.tsx +97 -0
- package/web/components/History.tsx +143 -0
- package/web/components/Navbar.tsx +64 -0
- package/web/components/Terminal.tsx +114 -0
- package/web/eslint.config.mjs +18 -0
- package/web/lib/db.js +131 -0
- package/web/lib/docs.js +73 -0
- package/web/next.config.ts +8 -0
- package/web/package-lock.json +6971 -0
- package/web/package.json +29 -0
- package/web/postcss.config.mjs +9 -0
- package/web/public/assets/android-chrome-192x192.png +0 -0
- package/web/public/assets/android-chrome-512x512.png +0 -0
- package/web/public/assets/apple-touch-icon.png +0 -0
- package/web/public/assets/favicon-16x16.png +0 -0
- package/web/public/assets/favicon-32x32.png +0 -0
- package/web/public/assets/favicon.ico +0 -0
- package/web/public/assets/favicon.png +0 -0
- package/web/public/assets/logo.png +0 -0
- package/web/public/assets/og-preview.png +0 -0
- package/web/public/assets/site.webmanifest +1 -0
- package/web/public/file.svg +1 -0
- package/web/public/globe.svg +1 -0
- package/web/public/next.svg +1 -0
- package/web/public/vercel.svg +1 -0
- package/web/public/window.svg +1 -0
- package/web/server.js +30 -158
- package/web/tailwind.config.ts +19 -0
- package/web/tsconfig.json +42 -0
- package/web-legacy/public/assets/android-chrome-192x192.png +0 -0
- package/web-legacy/public/assets/android-chrome-512x512.png +0 -0
- package/web-legacy/public/assets/apple-touch-icon.png +0 -0
- package/web-legacy/public/assets/favicon-16x16.png +0 -0
- package/web-legacy/public/assets/favicon-32x32.png +0 -0
- package/web-legacy/public/assets/favicon.ico +0 -0
- package/web-legacy/public/assets/favicon.png +0 -0
- package/web-legacy/public/assets/logo.png +0 -0
- package/web-legacy/public/assets/og-preview.png +0 -0
- package/web-legacy/public/assets/site.webmanifest +1 -0
- package/{dist → web-legacy/public}/docs/EXAMPLES.html +87 -2
- package/{dist → web-legacy/public}/docs/GETTING-STARTED.html +87 -2
- package/{dist → web-legacy/public}/docs/README.html +87 -2
- package/web-legacy/public/docs/RELEASE_NOTES.html +275 -0
- package/{dist → web-legacy/public}/docs/TROUBLESHOOTING.html +87 -2
- package/{dist → web-legacy/public}/docs/WORKFLOW-TEMPLATES.html +87 -2
- package/{dist → web-legacy/public}/docs/web-dashboard.html +87 -2
- package/web-legacy/public/index.html +223 -0
- package/web-legacy/public/input.css +80 -0
- package/web-legacy/public/main.js +167 -0
- package/web-legacy/public/output.css +1559 -0
- package/web-legacy/server.js +207 -0
- package/workflow-state.js +11 -25
- package/dist/docs/RELEASE_NOTES.html +0 -167
- package/web/public/index.html +0 -1046
- package/web/public/input.css +0 -3
- package/web/public/output.css +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--background: #0a0a0f;
|
|
7
|
+
--foreground: #ffffff;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body {
|
|
11
|
+
color: var(--foreground);
|
|
12
|
+
background: var(--background);
|
|
13
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@layer utilities {
|
|
17
|
+
@keyframes fadeInUp {
|
|
18
|
+
0% {
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transform: translateY(20px);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
100% {
|
|
24
|
+
opacity: 1;
|
|
25
|
+
transform: translateY(0px);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes fadeInRight {
|
|
30
|
+
0% {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
transform: translateY(-50%) translateX(40px);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
100% {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
transform: translateY(-50%) translateX(0px);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@keyframes fadeIn {
|
|
42
|
+
0% {
|
|
43
|
+
opacity: 0;
|
|
44
|
+
transform: translateX(-10px);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
100% {
|
|
48
|
+
opacity: 1;
|
|
49
|
+
transform: translateX(0px);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.animate-fade-in-up {
|
|
54
|
+
animation: fadeInUp 0.8s ease-out forwards;
|
|
55
|
+
opacity: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.animate-fade-in-right {
|
|
59
|
+
animation: fadeInRight 0.8s ease-out forwards;
|
|
60
|
+
opacity: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.terminal-line {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
display: flex;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.terminal-line.visible {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
transition: opacity 0.1s;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.typing-cursor::after {
|
|
74
|
+
content: '▋';
|
|
75
|
+
animation: blink 1s step-end infinite;
|
|
76
|
+
margin-left: 4px;
|
|
77
|
+
color: #a855f7;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@keyframes blink {
|
|
81
|
+
|
|
82
|
+
0%,
|
|
83
|
+
100% {
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
50% {
|
|
88
|
+
opacity: 0;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import "./globals.css";
|
|
3
|
+
import Navbar from "@/components/Navbar";
|
|
4
|
+
import Footer from "@/components/Footer";
|
|
5
|
+
|
|
6
|
+
export const metadata: Metadata = {
|
|
7
|
+
title: "Dev Workflow Dashboard",
|
|
8
|
+
description: "Enforce development discipline and best practices",
|
|
9
|
+
icons: {
|
|
10
|
+
icon: [
|
|
11
|
+
{ url: "/assets/favicon-16x16.png", sizes: "16x16", type: "image/png" },
|
|
12
|
+
{ url: "/assets/favicon-32x32.png", sizes: "32x32", type: "image/png" },
|
|
13
|
+
{ url: "/assets/favicon.ico" },
|
|
14
|
+
],
|
|
15
|
+
apple: [
|
|
16
|
+
{ url: "/assets/apple-touch-icon.png", sizes: "180x180", type: "image/png" },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
manifest: "/assets/site.webmanifest",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default function RootLayout({
|
|
23
|
+
children,
|
|
24
|
+
}: Readonly<{
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}>) {
|
|
27
|
+
return (
|
|
28
|
+
<html lang="en" className="scroll-smooth">
|
|
29
|
+
<body className="antialiased bg-[#0a0a0f] text-white">
|
|
30
|
+
<Navbar />
|
|
31
|
+
{children}
|
|
32
|
+
<Footer />
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
|
35
|
+
);
|
|
36
|
+
}
|
package/web/app/page.tsx
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Hero from "@/components/Hero";
|
|
2
|
+
import Features from "@/components/Features";
|
|
3
|
+
import History from "@/components/History";
|
|
4
|
+
import ApiReference from "@/components/ApiReference";
|
|
5
|
+
|
|
6
|
+
export default function Home() {
|
|
7
|
+
return (
|
|
8
|
+
<main>
|
|
9
|
+
<Hero />
|
|
10
|
+
<Features />
|
|
11
|
+
<History />
|
|
12
|
+
<ApiReference />
|
|
13
|
+
</main>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default function ApiReference() {
|
|
2
|
+
return (
|
|
3
|
+
<section id="api" className="py-20 px-4">
|
|
4
|
+
<div className="max-w-7xl mx-auto">
|
|
5
|
+
<h2 className="text-3xl md:text-4xl font-bold mb-8">API Reference</h2>
|
|
6
|
+
<p className="text-gray-400 mb-12">Query workflow data programmatically with our JSON API.</p>
|
|
7
|
+
<div className="grid md:grid-cols-2 gap-6">
|
|
8
|
+
<div className="p-6 rounded-xl bg-white/5 border border-white/10">
|
|
9
|
+
<code className="text-indigo-400 font-mono text-sm">GET /api/history</code>
|
|
10
|
+
<p className="text-gray-400 mt-2">Retrieve paginated task history entries.</p>
|
|
11
|
+
</div>
|
|
12
|
+
<div className="p-6 rounded-xl bg-white/5 border border-white/10">
|
|
13
|
+
<code className="text-indigo-400 font-mono text-sm">GET /api/summary</code>
|
|
14
|
+
<p className="text-gray-400 mt-2">Get project health stats and recent tasks.</p>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</section>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ShieldCheck, TestTube, FileText, GitBranch, History, Zap } from "lucide-react";
|
|
2
|
+
|
|
3
|
+
export default function Features() {
|
|
4
|
+
return (
|
|
5
|
+
<section id="features" className="py-20 px-4">
|
|
6
|
+
<div className="max-w-7xl mx-auto">
|
|
7
|
+
<h2 className="text-3xl md:text-4xl font-bold text-center mb-16">Your Coding Conscience</h2>
|
|
8
|
+
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
9
|
+
<FeatureCard
|
|
10
|
+
icon={<ShieldCheck className="w-6 h-6 text-indigo-400" />}
|
|
11
|
+
title="Enforced Discipline"
|
|
12
|
+
description="Won't let you skip important steps. Follows a strict, proven development workflow."
|
|
13
|
+
bg="bg-indigo-500/20"
|
|
14
|
+
/>
|
|
15
|
+
<FeatureCard
|
|
16
|
+
icon={<TestTube className="w-6 h-6 text-purple-400" />}
|
|
17
|
+
title="Test-Driven"
|
|
18
|
+
description="Blocks commits if tests fail. Encourages writing tests before marking tasks complete."
|
|
19
|
+
bg="bg-purple-500/20"
|
|
20
|
+
/>
|
|
21
|
+
<FeatureCard
|
|
22
|
+
icon={<FileText className="w-6 h-6 text-emerald-400" />}
|
|
23
|
+
title="Documentation"
|
|
24
|
+
description="Reminds you to update documentation (README, docs, changelog) for every change."
|
|
25
|
+
bg="bg-emerald-500/20"
|
|
26
|
+
/>
|
|
27
|
+
<FeatureCard
|
|
28
|
+
icon={<GitBranch className="w-6 h-6 text-orange-400" />}
|
|
29
|
+
title="State Tracking"
|
|
30
|
+
description="Remembers exactly where you are in the workflow, even across sessions."
|
|
31
|
+
bg="bg-orange-500/20"
|
|
32
|
+
/>
|
|
33
|
+
<FeatureCard
|
|
34
|
+
icon={<History className="w-6 h-6 text-blue-400" />}
|
|
35
|
+
title="Task History"
|
|
36
|
+
description="Keeps a detailed log of all completed tasks, commits, and releases."
|
|
37
|
+
bg="bg-blue-500/20"
|
|
38
|
+
/>
|
|
39
|
+
<FeatureCard
|
|
40
|
+
icon={<Zap className="w-6 h-6 text-pink-400" />}
|
|
41
|
+
title="Smart Prompts"
|
|
42
|
+
description="Provides quick reminders and guidance on best practices as you work."
|
|
43
|
+
bg="bg-pink-500/20"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</section>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function FeatureCard({ icon, title, description, bg }: { icon: React.ReactNode, title: string, description: string, bg: string }) {
|
|
52
|
+
return (
|
|
53
|
+
<div className="p-6 rounded-xl bg-white/5 border border-white/10 hover:bg-white/10 transition">
|
|
54
|
+
<div className={`w-12 h-12 rounded-lg ${bg} flex items-center justify-center mb-4`}>
|
|
55
|
+
{icon}
|
|
56
|
+
</div>
|
|
57
|
+
<h3 className="text-xl font-semibold mb-2">{title}</h3>
|
|
58
|
+
<p className="text-gray-400">{description}</p>
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { ArrowRight } from "lucide-react";
|
|
5
|
+
import Terminal from "./Terminal";
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
|
|
8
|
+
export default function Hero() {
|
|
9
|
+
const [downloads, setDownloads] = useState<number | null>(null);
|
|
10
|
+
const [version, setVersion] = useState<string | null>(null);
|
|
11
|
+
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
fetch("/api/npm-downloads")
|
|
14
|
+
.then(res => res.json())
|
|
15
|
+
.then(data => setDownloads(data.downloads))
|
|
16
|
+
.catch(() => setDownloads(null));
|
|
17
|
+
|
|
18
|
+
fetch("/api/version")
|
|
19
|
+
.then(res => res.json())
|
|
20
|
+
.then(data => setVersion(data.version))
|
|
21
|
+
.catch(() => setVersion(null));
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
const formatDownloads = (num: number) => {
|
|
25
|
+
if (num >= 1000000) return `${(num / 1000000).toFixed(1)}M`;
|
|
26
|
+
if (num >= 1000) return `${(num / 1000).toFixed(1)}K`;
|
|
27
|
+
return num.toString();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<section className="min-h-screen flex items-center justify-center px-4 pt-16 relative overflow-hidden">
|
|
32
|
+
<div className="absolute inset-0 bg-gradient-to-br from-indigo-500/10 via-purple-500/10 to-pink-500/10"></div>
|
|
33
|
+
<div className="max-w-7xl mx-auto grid lg:grid-cols-2 gap-12 items-center relative z-10">
|
|
34
|
+
{/* Left Column - Content */}
|
|
35
|
+
<div>
|
|
36
|
+
<div className="animate-fade-in-up" style={{ animationDelay: "0.1s" }}>
|
|
37
|
+
<div className="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-sm mb-8">
|
|
38
|
+
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"></span>
|
|
39
|
+
<span>v{version ?? "..."} - Active</span>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<h1 className="text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold mb-6 leading-tight animate-fade-in-up" style={{ animationDelay: "0.2s" }}>
|
|
44
|
+
Master Your<br />
|
|
45
|
+
<span className="bg-gradient-to-r from-indigo-400 via-purple-400 to-pink-400 bg-clip-text text-transparent">Workflow</span>
|
|
46
|
+
</h1>
|
|
47
|
+
<p className="text-lg md:text-xl text-gray-400 mb-8 max-w-xl animate-fade-in-up" style={{ animationDelay: "0.3s" }}>
|
|
48
|
+
An MCP server that acts as your coding conscience. Enforce test-driven development, ensure documentation, and never skip a step in your release process.
|
|
49
|
+
</p>
|
|
50
|
+
<div className="flex flex-col sm:flex-row gap-4 mb-8 animate-fade-in-up" style={{ animationDelay: "0.4s" }}>
|
|
51
|
+
<Link href="#history" className="px-6 py-3 bg-gradient-to-r from-indigo-600 to-purple-600 rounded-lg font-semibold hover:shadow-lg hover:shadow-indigo-500/50 transition inline-flex items-center justify-center gap-2">
|
|
52
|
+
View History <ArrowRight className="w-4 h-4" />
|
|
53
|
+
</Link>
|
|
54
|
+
<Link href="/docs" className="px-6 py-3 bg-white/5 border border-white/10 rounded-lg font-semibold hover:bg-white/10 transition text-center">
|
|
55
|
+
Documentation
|
|
56
|
+
</Link>
|
|
57
|
+
</div>
|
|
58
|
+
<div className="flex flex-wrap gap-6 sm:gap-8 text-sm animate-fade-in-up" style={{ animationDelay: "0.5s" }}>
|
|
59
|
+
<div>
|
|
60
|
+
<div className="text-2xl font-bold">{version ?? "..."}</div>
|
|
61
|
+
<div className="text-gray-500">Latest Version</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
<div className="text-2xl font-bold">MIT</div>
|
|
65
|
+
<div className="text-gray-500">License</div>
|
|
66
|
+
</div>
|
|
67
|
+
<div>
|
|
68
|
+
<div className="text-2xl font-bold">Node 18+</div>
|
|
69
|
+
<div className="text-gray-500">Compatibility</div>
|
|
70
|
+
</div>
|
|
71
|
+
{downloads !== null && (
|
|
72
|
+
<div>
|
|
73
|
+
<div className="text-2xl font-bold">{formatDownloads(downloads)}</div>
|
|
74
|
+
<div className="text-gray-500">Downloads/mo</div>
|
|
75
|
+
</div>
|
|
76
|
+
)}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
{/* Right Column - Terminal */}
|
|
80
|
+
<div className="hidden lg:block">
|
|
81
|
+
<div className="relative">
|
|
82
|
+
<div className="absolute inset-0 bg-gradient-to-r from-indigo-500/20 to-purple-500/20 blur-3xl"></div>
|
|
83
|
+
<div className="relative bg-[#1a1a24] rounded-xl border border-white/10 p-6 shadow-2xl">
|
|
84
|
+
<div className="flex items-center gap-2 mb-4">
|
|
85
|
+
<div className="w-3 h-3 rounded-full bg-red-500"></div>
|
|
86
|
+
<div className="w-3 h-3 rounded-full bg-yellow-500"></div>
|
|
87
|
+
<div className="w-3 h-3 rounded-full bg-green-500"></div>
|
|
88
|
+
<span className="ml-auto text-xs text-gray-500">terminal</span>
|
|
89
|
+
</div>
|
|
90
|
+
<Terminal />
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</section>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState, useEffect } from "react";
|
|
4
|
+
|
|
5
|
+
type HistoryItem = {
|
|
6
|
+
task_description: string;
|
|
7
|
+
created_at: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type SummaryData = {
|
|
11
|
+
summary: {
|
|
12
|
+
totalTasks: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default function History() {
|
|
17
|
+
const [history, setHistory] = useState<HistoryItem[]>([]);
|
|
18
|
+
const [summary, setSummary] = useState<SummaryData | null>(null);
|
|
19
|
+
const [page, setPage] = useState(1);
|
|
20
|
+
const [totalPages, setTotalPages] = useState(1);
|
|
21
|
+
const [filters, setFilters] = useState({
|
|
22
|
+
userId: "",
|
|
23
|
+
startDate: "",
|
|
24
|
+
endDate: ""
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const loadData = async () => {
|
|
28
|
+
const params = new URLSearchParams({
|
|
29
|
+
page: page.toString(),
|
|
30
|
+
pageSize: "20",
|
|
31
|
+
...(filters.userId && { user: filters.userId }),
|
|
32
|
+
...(filters.startDate && { startDate: filters.startDate }),
|
|
33
|
+
...(filters.endDate && { endDate: filters.endDate }),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const res = await fetch(`/api/history?${params}`);
|
|
38
|
+
const data = await res.json();
|
|
39
|
+
setHistory(data.data || []);
|
|
40
|
+
setTotalPages(data.totalPages || 1);
|
|
41
|
+
} catch (err) {
|
|
42
|
+
console.error("Failed to load history", err);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const res = await fetch(`/api/summary?${params}`);
|
|
47
|
+
const data = await res.json();
|
|
48
|
+
setSummary(data);
|
|
49
|
+
} catch (err) {
|
|
50
|
+
console.error("Failed to load summary", err);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
loadData();
|
|
56
|
+
}, [page]); // Reload when page changes
|
|
57
|
+
|
|
58
|
+
const handleApplyFilters = () => {
|
|
59
|
+
setPage(1);
|
|
60
|
+
loadData();
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<section id="history" className="py-20 px-4 bg-white/5">
|
|
65
|
+
<div className="max-w-7xl mx-auto">
|
|
66
|
+
<h2 className="text-3xl md:text-4xl font-bold mb-8">Workflow History</h2>
|
|
67
|
+
<p className="text-gray-400 mb-12">Track your development progress and analyze your workflow patterns.</p>
|
|
68
|
+
<div className="bg-[#0a0a0f] rounded-xl border border-white/10 p-6">
|
|
69
|
+
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-4 mb-6">
|
|
70
|
+
<input
|
|
71
|
+
type="text"
|
|
72
|
+
placeholder="User ID"
|
|
73
|
+
value={filters.userId}
|
|
74
|
+
onChange={(e) => setFilters({ ...filters, userId: e.target.value })}
|
|
75
|
+
className="px-4 py-2 bg-white/5 border border-white/10 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 text-white"
|
|
76
|
+
/>
|
|
77
|
+
<input
|
|
78
|
+
type="date"
|
|
79
|
+
value={filters.startDate}
|
|
80
|
+
onChange={(e) => setFilters({ ...filters, startDate: e.target.value })}
|
|
81
|
+
className="px-4 py-2 bg-white/5 border border-white/10 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 [color-scheme:dark]"
|
|
82
|
+
/>
|
|
83
|
+
<input
|
|
84
|
+
type="date"
|
|
85
|
+
value={filters.endDate}
|
|
86
|
+
onChange={(e) => setFilters({ ...filters, endDate: e.target.value })}
|
|
87
|
+
className="px-4 py-2 bg-white/5 border border-white/10 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 [color-scheme:dark]"
|
|
88
|
+
/>
|
|
89
|
+
<button
|
|
90
|
+
onClick={handleApplyFilters}
|
|
91
|
+
className="px-4 py-2 bg-gradient-to-r from-indigo-600 to-purple-600 rounded-lg font-semibold hover:shadow-lg hover:shadow-indigo-500/50 transition"
|
|
92
|
+
>
|
|
93
|
+
Apply Filters
|
|
94
|
+
</button>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
{summary && (
|
|
98
|
+
<div className="mb-6">
|
|
99
|
+
<h3 className="text-lg font-semibold mb-4">Project Summary</h3>
|
|
100
|
+
<div className="text-gray-400">
|
|
101
|
+
<p>Total tasks: {summary.summary?.totalTasks || 0}</p>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
)}
|
|
105
|
+
|
|
106
|
+
<div>
|
|
107
|
+
<h3 className="text-lg font-semibold mb-4">Recent History</h3>
|
|
108
|
+
<div className="space-y-3">
|
|
109
|
+
{history.length > 0 ? (
|
|
110
|
+
history.map((row, i) => (
|
|
111
|
+
<div key={i} className="p-4 rounded-lg bg-white/5 border border-white/10">
|
|
112
|
+
<div className="font-semibold">{row.task_description}</div>
|
|
113
|
+
<div className="text-sm text-gray-400 mt-1">{new Date(row.created_at).toLocaleString()}</div>
|
|
114
|
+
</div>
|
|
115
|
+
))
|
|
116
|
+
) : (
|
|
117
|
+
<p className="text-gray-500">No history yet.</p>
|
|
118
|
+
)}
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div className="flex items-center justify-between mt-6">
|
|
122
|
+
<button
|
|
123
|
+
onClick={() => setPage(p => Math.max(1, p - 1))}
|
|
124
|
+
disabled={page <= 1}
|
|
125
|
+
className="px-4 py-2 bg-white/5 border border-white/10 rounded-lg hover:bg-white/10 disabled:opacity-50"
|
|
126
|
+
>
|
|
127
|
+
Previous
|
|
128
|
+
</button>
|
|
129
|
+
<span className="text-sm text-gray-400">Page {page} of {totalPages}</span>
|
|
130
|
+
<button
|
|
131
|
+
onClick={() => setPage(p => Math.min(totalPages, p + 1))}
|
|
132
|
+
disabled={page >= totalPages}
|
|
133
|
+
className="px-4 py-2 bg-white/5 border border-white/10 rounded-lg hover:bg-white/10 disabled:opacity-50"
|
|
134
|
+
>
|
|
135
|
+
Next
|
|
136
|
+
</button>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
</section>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import { Github, Menu, X } from "lucide-react";
|
|
6
|
+
import Image from "next/image";
|
|
7
|
+
|
|
8
|
+
export default function Navbar() {
|
|
9
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<nav className="fixed top-0 left-0 right-0 z-50 bg-[#0a0a0f]/80 backdrop-blur-lg border-b border-white/10">
|
|
13
|
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
14
|
+
<div className="flex items-center justify-between h-16">
|
|
15
|
+
<Link href="/" className="flex items-center gap-2">
|
|
16
|
+
<Image src="/assets/logo.png" alt="Dev Workflow" width={32} height={32} className="rounded-lg" />
|
|
17
|
+
<span className="text-lg font-bold">Dev Workflow</span>
|
|
18
|
+
</Link>
|
|
19
|
+
<div className="hidden md:flex items-center gap-6">
|
|
20
|
+
<Link href="/#features" className="text-gray-300 hover:text-white transition">Features</Link>
|
|
21
|
+
<Link href="/#history" className="text-gray-300 hover:text-white transition">History</Link>
|
|
22
|
+
<Link href="/#api" className="text-gray-300 hover:text-white transition">API</Link>
|
|
23
|
+
<Link href="/docs" className="text-gray-300 hover:text-white transition">Docs</Link>
|
|
24
|
+
<a
|
|
25
|
+
href="https://github.com/programinglive/dev-workflow-mcp-server"
|
|
26
|
+
target="_blank"
|
|
27
|
+
rel="noopener noreferrer"
|
|
28
|
+
className="flex items-center gap-2 px-4 py-2 bg-white/5 hover:bg-white/10 rounded-lg transition"
|
|
29
|
+
>
|
|
30
|
+
<Github className="w-4 h-4" />
|
|
31
|
+
GitHub
|
|
32
|
+
</a>
|
|
33
|
+
</div>
|
|
34
|
+
<button
|
|
35
|
+
className="md:hidden p-2 rounded-lg hover:bg-white/5"
|
|
36
|
+
onClick={() => setIsOpen(!isOpen)}
|
|
37
|
+
>
|
|
38
|
+
{isOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />}
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
{/* Mobile Menu */}
|
|
43
|
+
{isOpen && (
|
|
44
|
+
<div className="md:hidden border-t border-white/10 bg-[#0a0a0f]">
|
|
45
|
+
<div className="px-4 py-4 space-y-3">
|
|
46
|
+
<Link href="/#features" className="block text-gray-300 hover:text-white transition" onClick={() => setIsOpen(false)}>Features</Link>
|
|
47
|
+
<Link href="/#history" className="block text-gray-300 hover:text-white transition" onClick={() => setIsOpen(false)}>History</Link>
|
|
48
|
+
<Link href="/#api" className="block text-gray-300 hover:text-white transition" onClick={() => setIsOpen(false)}>API</Link>
|
|
49
|
+
<Link href="/docs" className="block text-gray-300 hover:text-white transition" onClick={() => setIsOpen(false)}>Docs</Link>
|
|
50
|
+
<a
|
|
51
|
+
href="https://github.com/programinglive/dev-workflow-mcp-server"
|
|
52
|
+
target="_blank"
|
|
53
|
+
rel="noopener noreferrer"
|
|
54
|
+
className="flex items-center gap-2 text-gray-300 hover:text-white transition"
|
|
55
|
+
>
|
|
56
|
+
<Github className="w-4 h-4" />
|
|
57
|
+
GitHub
|
|
58
|
+
</a>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
62
|
+
</nav>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState, useRef } from "react";
|
|
4
|
+
import { Rocket } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
type TerminalLine = {
|
|
7
|
+
type: 'command' | 'success' | 'comment' | 'info' | 'final';
|
|
8
|
+
text: string;
|
|
9
|
+
delay: number;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const terminalLines: TerminalLine[] = [
|
|
13
|
+
{ type: 'command', text: 'start_task', delay: 500 },
|
|
14
|
+
{ type: 'success', text: '✓ Task started: Implement user auth', delay: 1500 },
|
|
15
|
+
{ type: 'comment', text: '# Write code...', delay: 2500 },
|
|
16
|
+
{ type: 'command', text: 'mark_bug_fixed', delay: 4000 },
|
|
17
|
+
{ type: 'info', text: '✨ Feature complete! Now create tests...', delay: 5000 },
|
|
18
|
+
{ type: 'command', text: 'create_tests', delay: 6500 },
|
|
19
|
+
{ type: 'success', text: '✓ Tests created', delay: 7500 },
|
|
20
|
+
{ type: 'command', text: 'run_tests', delay: 8500 },
|
|
21
|
+
{ type: 'success', text: '✓ All tests passed!', delay: 9500 },
|
|
22
|
+
{ type: 'command', text: 'create_documentation', delay: 10500 },
|
|
23
|
+
{ type: 'success', text: '✓ Documentation updated', delay: 11500 },
|
|
24
|
+
{ type: 'command', text: 'commit_and_push', delay: 12500 },
|
|
25
|
+
{ type: 'final', text: 'Ready to release!', delay: 13500 }
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
export default function Terminal() {
|
|
29
|
+
const [lines, setLines] = useState<React.ReactElement[]>([]);
|
|
30
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
31
|
+
const hasStarted = useRef(false);
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const observer = new IntersectionObserver((entries) => {
|
|
35
|
+
entries.forEach(entry => {
|
|
36
|
+
if (entry.isIntersecting && !hasStarted.current) {
|
|
37
|
+
hasStarted.current = true;
|
|
38
|
+
runAnimation();
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
if (containerRef.current) {
|
|
44
|
+
observer.observe(containerRef.current);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return () => observer.disconnect();
|
|
48
|
+
}, []);
|
|
49
|
+
|
|
50
|
+
const runAnimation = async () => {
|
|
51
|
+
for (const line of terminalLines) {
|
|
52
|
+
await new Promise(r => setTimeout(r, line.delay - (terminalLines[terminalLines.indexOf(line) - 1]?.delay || 0)));
|
|
53
|
+
|
|
54
|
+
if (line.type === 'command') {
|
|
55
|
+
await typeCommand(line.text);
|
|
56
|
+
} else {
|
|
57
|
+
addLine(line);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const typeCommand = async (text: string) => {
|
|
63
|
+
const id = Date.now();
|
|
64
|
+
setLines(prev => [...prev, (
|
|
65
|
+
<div key={id} className="terminal-line visible">
|
|
66
|
+
<span className="text-gray-500 mr-2">$</span>
|
|
67
|
+
<span className="text-white typing-cursor" id={`cmd-${id}`}></span>
|
|
68
|
+
</div>
|
|
69
|
+
)]);
|
|
70
|
+
|
|
71
|
+
for (let i = 0; i < text.length; i++) {
|
|
72
|
+
await new Promise(r => setTimeout(r, 50 + Math.random() * 50));
|
|
73
|
+
const el = document.getElementById(`cmd-${id}`);
|
|
74
|
+
if (el) el.textContent += text[i];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const el = document.getElementById(`cmd-${id}`);
|
|
78
|
+
if (el) el.classList.remove('typing-cursor');
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const addLine = (line: TerminalLine) => {
|
|
82
|
+
let content: React.ReactElement;
|
|
83
|
+
let className = "terminal-line visible";
|
|
84
|
+
|
|
85
|
+
switch (line.type) {
|
|
86
|
+
case 'success':
|
|
87
|
+
className += " text-emerald-400";
|
|
88
|
+
content = <>{line.text}</>;
|
|
89
|
+
break;
|
|
90
|
+
case 'comment':
|
|
91
|
+
className += " mt-3";
|
|
92
|
+
content = <><span className="text-gray-500 mr-2">$</span><span className="text-white">{line.text}</span></>;
|
|
93
|
+
break;
|
|
94
|
+
case 'info':
|
|
95
|
+
className += " text-purple-400";
|
|
96
|
+
content = <>{line.text}</>;
|
|
97
|
+
break;
|
|
98
|
+
case 'final':
|
|
99
|
+
className += " text-pink-400 flex items-center gap-2";
|
|
100
|
+
content = <><Rocket className="w-4 h-4" />{line.text}</>;
|
|
101
|
+
break;
|
|
102
|
+
default:
|
|
103
|
+
content = <>{line.text}</>;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
setLines(prev => [...prev, <div key={Date.now()} className={className}>{content}</div>]);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<div ref={containerRef} className="font-mono text-sm space-y-2 min-h-[400px]">
|
|
111
|
+
{lines}
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
}
|