Skip to content

Commit f1abe2d

Browse files
committed
ready-to-implement-coagent-frontend-conn
Signed-off-by: Arya Pratap Singh <notaryasingh@gmail.com>
1 parent 189001c commit f1abe2d

File tree

2 files changed

+100
-74
lines changed

2 files changed

+100
-74
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import React from 'react';
2+
import Link from 'next/link';
3+
import { Terminal, Code2, ArrowLeft, Server } from 'lucide-react';
4+
5+
const NotFound = () => {
6+
return (
7+
<div className="min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900 text-white overflow-hidden relative">
8+
{/* Floating Code Particles */}
9+
<div className="absolute inset-0 overflow-hidden">
10+
{[...Array(20)].map((_, i) => (
11+
<div
12+
key={i}
13+
className={`absolute animate-float text-purple-300/20 text-xl
14+
${i % 2 === 0 ? 'animate-float-slow' : 'animate-float-fast'}`}
15+
style={{
16+
left: `${Math.random() * 100}%`,
17+
top: `${Math.random() * 100}%`,
18+
animationDelay: `${Math.random() * 5}s`
19+
}}
20+
>
21+
{'{'}
22+
</div>
23+
))}
24+
</div>
25+
26+
<div className="relative z-10 flex flex-col items-center justify-center min-h-screen px-4">
27+
{/* Main Content */}
28+
<div className="text-center max-w-2xl mx-auto">
29+
{/* Animated Terminal Icon */}
30+
<div className="mb-8 relative">
31+
<Terminal
32+
className="w-16 h-16 mx-auto animate-pulse text-purple-400"
33+
strokeWidth={1.5}
34+
/>
35+
<Code2
36+
className="w-8 h-8 absolute top-12 left-1/2 -translate-x-1/2 text-green-400 animate-bounce"
37+
strokeWidth={1.5}
38+
/>
39+
</div>
40+
41+
{/* Error Message */}
42+
<h1 className="text-6xl font-bold mb-4 animate-text bg-gradient-to-r from-purple-400 via-pink-500 to-purple-400 bg-clip-text text-transparent">
43+
404
44+
</h1>
45+
<h2 className="text-2xl font-semibold mb-6 text-purple-200">
46+
Under Maintenance
47+
</h2>
48+
49+
<div className="mb-8 space-y-4 text-purple-100/80">
50+
<p className="text-lg">
51+
We&apos;re currently optimizing this section for Quira to bring you an even better coding experience.
52+
</p>
53+
<div className="flex items-center justify-center gap-2 text-yellow-400">
54+
<Server className="w-5 h-5 animate-pulse" />
55+
<span className="text-sm">System Upgrade in Progress</span>
56+
</div>
57+
</div>
58+
59+
60+
<Link
61+
href="/"
62+
className="group inline-flex items-center gap-2 px-6 py-3 text-lg bg-purple-600 hover:bg-purple-500 rounded-lg transition-all duration-300 hover:shadow-lg hover:shadow-purple-500/25"
63+
>
64+
<ArrowLeft className="w-5 h-5 group-hover:-translate-x-1 transition-transform" />
65+
<span>Return to Dashboard</span>
66+
</Link>
67+
68+
{/* Status Indicator */}
69+
<div className="mt-8 inline-flex items-center gap-2 px-4 py-2 rounded-full bg-purple-900/50">
70+
<div className="w-2 h-2 rounded-full bg-green-400 animate-ping" />
71+
<span className="text-sm text-purple-200">Systems Operating Normally</span>
72+
</div>
73+
</div>
74+
</div>
75+
76+
{/* Background Grid */}
77+
<div className="absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px]" />
78+
</div>
79+
);
80+
};
81+
82+
export default NotFound;

frontend-interface/app/page.tsx

Lines changed: 18 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,13 @@ import { Textarea } from "@/components/ui/textarea";
77
import { Input } from "@/components/ui/input";
88
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
99
import { Alert, AlertDescription } from "@/components/ui/alert";
10-
import { Loader2, Plus, Trash2, Code2, Clock, Box, PlayCircle, Brain, Lightbulb, ExternalLink } from "lucide-react";
10+
import { Loader2, Plus, Trash2, Code2, Clock, Box, PlayCircle, Brain, Lightbulb, ExternalLink, Cpu } from "lucide-react";
1111
import { motion, AnimatePresence } from "framer-motion";
1212
import dynamic from 'next/dynamic';
1313
import VisualizationTab from '@/components/MermaidRenderer';
1414

1515
const CodeEditor = dynamic(() => import('../components/Editor'), { ssr: false });
16-
const DEFAULT_SOLUTION_CODE = `/**
17-
* Solution for the DSA problem
18-
* @param {any} input - The input parameter(s) for the problem
19-
* @returns {any} - The result of the solution
20-
*/
21-
function solution(input) {
22-
// Initialize variables
23-
let result;
24-
25-
// Solution implementation
26-
try {
27-
// Your solution logic here
28-
29-
// Example implementation
30-
if (Array.isArray(input)) {
31-
result = input.reduce((acc, curr) => acc + curr, 0);
32-
} else {
33-
result = input;
34-
}
35-
} catch (error) {
36-
console.error('Error in solution:', error);
37-
throw error;
38-
}
39-
40-
return result;
41-
}
42-
43-
// Example test cases
44-
const testCases = [
45-
{ input: [1, 2, 3, 4, 5], expectedOutput: 15 },
46-
{ input: [], expectedOutput: 0 },
47-
{ input: [42], expectedOutput: 42 }
48-
];
49-
50-
// Run test cases
51-
testCases.forEach((testCase, index) => {
52-
const output = solution(testCase.input);
53-
console.log(\`Test case \${index + 1}:\`);
54-
console.log('Input:', testCase.input);
55-
console.log('Expected:', testCase.expectedOutput);
56-
console.log('Actual:', output);
57-
console.log('Pass:', output === testCase.expectedOutput);
58-
console.log('---');
59-
});
60-
`;
16+
const DEFAULT_SOLUTION_CODE = `print("Hello, World!")`;
6117

6218

6319
const DSASolutionInterface = () => {
@@ -170,7 +126,8 @@ const DSASolutionInterface = () => {
170126
className="mb-8"
171127
>
172128
<div className="flex justify-between items-center mb-6">
173-
<h1 className="text-3xl font-bold text-gray-800 mt-5">Self Study with Copilotkit</h1>
129+
<h1 className="text-3xl font-bold text-gray-800 mt-5">Learn Coding with Copilotkit</h1>
130+
174131
<div className="flex gap-2">
175132
{steps.map((step, index) => (
176133
<Button
@@ -291,6 +248,7 @@ const DSASolutionInterface = () => {
291248
'Generate Solution'
292249
)}
293250
</Button>
251+
294252
</motion.div>
295253

296254
{solution && (
@@ -324,13 +282,10 @@ const DSASolutionInterface = () => {
324282
<TabsContent value="code">
325283
<Card>
326284
<CardHeader>
327-
<CardTitle>Code in Python [officially supported till now] </CardTitle>
285+
<CardTitle>Python Code </CardTitle>
328286
</CardHeader>
329287
<CardContent>
330288
<div className="space-y-4">
331-
<div className="prose max-w-none">
332-
{solution.explanation}
333-
</div>
334289
<pre className="bg-gray-50 p-4 rounded-lg overflow-x-auto">
335290
{solution.code}
336291
</pre>
@@ -347,14 +302,14 @@ const DSASolutionInterface = () => {
347302
<CardContent>
348303
<div className="grid grid-cols-2 gap-4">
349304
<Alert>
350-
<Clock className="h-4 w-4" />
351-
<AlertDescription>
305+
<Clock className="h-4" />
306+
<AlertDescription className='h-4 mt-[5px]'>
352307
Time Complexity: {timeComplexity || "Not specified"}
353308
</AlertDescription>
354309
</Alert>
355310
<Alert>
356-
<Box className="h-4 w-4" />
357-
<AlertDescription>
311+
<Box className="h-4" />
312+
<AlertDescription className='h-4 mt-[5px]'>
358313
Space Complexity: {spaceComplexity || "Not specified"}
359314
</AlertDescription>
360315
</Alert>
@@ -381,35 +336,24 @@ const DSASolutionInterface = () => {
381336
<TabsContent value="explanation">
382337
<Card>
383338
<CardHeader>
384-
<CardTitle>Test Cases</CardTitle>
339+
<CardTitle>Approach Explanation</CardTitle>
385340
</CardHeader>
386341
<CardContent>
387342
<div className="space-y-4">
388-
{testCases.map((testCase, index) => (
389-
<div key={index} className="border p-4 rounded-lg">
390-
<div className="grid grid-cols-2 gap-4">
391-
<div>
392-
<label className="text-sm font-medium">Input</label>
393-
<pre className="mt-1 p-2 bg-gray-50 rounded">
394-
{testCase.input || "Not specified"}
395-
</pre>
396-
</div>
397-
<div>
398-
<label className="text-sm font-medium">Expected Output</label>
399-
<pre className="mt-1 p-2 bg-gray-50 rounded">
400-
{testCase.output || "Not specified"}
401-
</pre>
402-
</div>
403-
</div>
404-
</div>
405-
))}
343+
<pre className="bg-gray-50 p-4 rounded-lg overflow-x-auto">
344+
{solution.explanation}
345+
</pre>
406346
</div>
407347
</CardContent>
408348
</Card>
409349
</TabsContent>
410350
</Tabs>
411351
</>
412352
)}
353+
<Button className="w-full bg-gradient-to-r from-purple-600 p-5 text-[17px] to-blue-500 hover:from-purple-700 hover:to-blue-600 text-white">
354+
<Cpu className="h-5 w-5" />
355+
Powered by CopilotKit CoAgents and Langgraphs
356+
</Button>
413357
</div>
414358
</div>
415359

0 commit comments

Comments
 (0)