diff --git a/app/(landing)/hero-block.tsx b/app/(landing)/hero-block.tsx new file mode 100644 index 0000000000..e5f187dc62 --- /dev/null +++ b/app/(landing)/hero-block.tsx @@ -0,0 +1,62 @@ +import { memo } from 'react' +import { Handle, NodeProps, Position } from 'reactflow' +import { AgentIcon, ApiIcon, ConnectIcon } from '@/components/icons' +import { Card } from '@/components/ui/card' +import { cn } from '@/lib/utils' + +const icons = { + api: ApiIcon, + agent: AgentIcon, + router: ConnectIcon, +} + +export const HeroBlock = memo(({ data }: NodeProps) => { + const Icon = icons[data.type as keyof typeof icons] + + return ( + + +
+
+ +
+ {data.name} +
+ +
+ ) +}) + +HeroBlock.displayName = 'HeroBlock' diff --git a/app/(landing)/hero-workflow.tsx b/app/(landing)/hero-workflow.tsx new file mode 100644 index 0000000000..1006ef36d4 --- /dev/null +++ b/app/(landing)/hero-workflow.tsx @@ -0,0 +1,149 @@ +'use client' + +import { useCallback, useState } from 'react' +import ReactFlow, { + Background, + ConnectionLineType, + Edge, + Node, + NodeTypes, + Position, + ReactFlowProvider, + useEdgesState, + useNodesState, +} from 'reactflow' +import 'reactflow/dist/style.css' +import { HeroBlock } from './hero-block' + +const nodeTypes: NodeTypes = { + heroBlock: HeroBlock, +} + +// Initial nodes configuration +const initialNodes: Node[] = [ + { + id: 'api', + type: 'heroBlock', + position: { x: 50, y: -150 }, + data: { + type: 'api', + name: 'API Block', + color: '#2F55FF', + }, + dragHandle: '.workflow-drag-handle', + }, + { + id: 'router', + type: 'heroBlock', + position: { x: 100, y: -25 }, + data: { + type: 'router', + name: 'Router', + color: '#28C43F', + }, + dragHandle: '.workflow-drag-handle', + }, + { + id: 'agent1', + type: 'heroBlock', + position: { x: 400, y: -75 }, + data: { + type: 'agent', + name: 'Agent 1', + color: '#7F2FFF', + }, + dragHandle: '.workflow-drag-handle', + }, + { + id: 'agent2', + type: 'heroBlock', + position: { x: 400, y: 25 }, + data: { + type: 'agent', + name: 'Agent 2', + color: '#7F2FFF', + }, + dragHandle: '.workflow-drag-handle', + }, +] + +// Initial edges configuration +const initialEdges: Edge[] = [ + { + id: 'api-router', + source: 'api', + target: 'router', + type: 'smoothstep', + style: { stroke: '#94a3b8', strokeWidth: 2, strokeDasharray: '5,5' }, + }, + { + id: 'router-agent1', + source: 'router', + target: 'agent1', + type: 'smoothstep', + style: { stroke: '#94a3b8', strokeWidth: 2, strokeDasharray: '5,5' }, + }, + { + id: 'router-agent2', + source: 'router', + target: 'agent2', + type: 'smoothstep', + style: { stroke: '#94a3b8', strokeWidth: 2, strokeDasharray: '5,5' }, + }, + { + id: 'router-agent3', + source: 'router', + target: 'agent3', + type: 'smoothstep', + style: { stroke: '#94a3b8', strokeWidth: 2, strokeDasharray: '5,5' }, + }, +] + +export function HeroWorkflow() { + const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes) + const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges) + + return ( +
+ +
+ ) +} + +export default function HeroWorkflowProvider() { + return ( + + + + ) +} diff --git a/app/(landing)/landing.tsx b/app/(landing)/landing.tsx new file mode 100644 index 0000000000..f31844398b --- /dev/null +++ b/app/(landing)/landing.tsx @@ -0,0 +1,66 @@ +import { Button } from '@/components/ui/button' +import { Input } from '@/components/ui/input' +import HeroWorkflowProvider from './hero-workflow' + +export default function Landing() { + return ( +
+ + +
+
+
+
+

+ dev first agent +
+ workflow builder +

+ +

+ Build and deploy your agentic workflows with an open source, +
+ user-friendly environment for devs and agents +

+ +
+ + +
+ +
+ +
+
+
+
+ ) +} diff --git a/app/page.tsx b/app/page.tsx index 89bbf285ff..5195ceb433 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,3 +1,3 @@ -export default function Home() { - return
Go to /w/1
-} +import Landing from './(landing)/landing' + +export default Landing diff --git a/public/hero.png b/public/hero.png new file mode 100644 index 0000000000..42598034cc Binary files /dev/null and b/public/hero.png differ