Advanced Sales Funnel App with React Flow
Act as a Full-Stack Developer specialized in sales funnels. Your task is to build a production-ready sales funnel application using React Flow. Your application will:
- Initialize using Vite with a React template and integrate @xyflow/react for creating interactive, node-based visualizations.
- Develop production-ready features including lead capture, conversion tracking, and analytics integration.
- Ensure mobile-first design principles are applied to enhance user experience on all devices using responsive CSS and media queries.
- Implement best coding practices such as modular architecture, reusable components, and state management for scalability and maintainability.
- Conduct thorough testing using tools like Jest and React Testing Library to ensure code quality and functionality without relying on mock data.
Enhance user experience by:
- Designing a simple and intuitive user interface that maintains high-quality user interactions.
- Incorporating clean and organized UI utilizing elements such as dropdown menus and slide-in/out sidebars to improve navigation and accessibility.
Use the following setup to begin your project:
```javascript
pnpm create vite my-react-flow-app --template react
pnpm add @xyflow/react
import { useState, useCallback } from 'react';
import { ReactFlow, applyNodeChanges, applyEdgeChanges, addEdge } from '@xyflow/react';
import '@xyflow/react/dist/style.css';
const initialNodes = [
{ id: 'n1', position: { x: 0, y: 0 }, data: { label: 'Node 1' } },
{ id: 'n2', position: { x: 0, y: 100 }, data: { label: 'Node 2' } },
];
const initialEdges = [{ id: 'n1-n2', source: 'n1', target: 'n2' }];
export default function App() {
const [nodes, setNodes] = useState(initialNodes);
const [edges, setEdges] = useState(initialEdges);
const onNodesChange = useCallback(
(changes) => setNodes((nodesSnapshot) => applyNodeChanges(changes, nodesSnapshot)),
[],
);
const onEdgesChange = useCallback(
(changes) => setEdges((edgesSnapshot) => applyEdgeChanges(changes, edgesSnapshot)),
[],
);
const onConnect = useCallback(
(params) => setEdges((edgesSnapshot) => addEdge(params, edgesSnapshot)),
[],
);
return (
<div style={{ width: '100vw', height: '100vh' }}>
<ReactFlow
nodes={nodes}
edges={edges}
onNodesChange={onNodesChange}
onEdgesChange={onEdgesChange}
onConnect={onConnect}
fitView
/>
</div>
);
}
```
Camp Planner
{
"research_config": {
"topic": "Logistics-Oriented and Car-Free Camping Planning Analysis",
"target_persona": {
"age_group": "${age_group:30-35}",
"group_size": "${group_size:4}",
"travel_mode": "Intermodal Transportation (Public Transit + Hiking/Walking Only)"
},
"output_lang": "${lang:English}"
},
"context": {
"origin": "${origin:Ankara Yenimahalle}",
"destination_region": "${destination:Nallihan}",
"specific_date": "${date:March 14, 2026}",
"priorities": [
"Logistical feasibility",
"Safety",
"Nature immersion",
"Minimalism/Ultralight approach"
]
},
"knowledge_base_requirements": {
"transport_analysis": [
"Main artery bus/train lines and specific stop locations",
"First/Last Mile connectivity (Local shuttles, taxi availability, or trekking distance from the final stop)",
"Weekend frequency and ticketing/payment methods (e.g., local transit cards vs. cash)"
],
"site_selection_criteria": [
"Accessibility: Max 5km hiking distance from public transit drop-off points",
"Legality: Officially designated campsites or safe, legal wild camping zones",
"Resource Availability: Proximity to water sources and basic necessities (WC/Market)"
]
},
"goal": {
"primary_objective": "To create a sustainable, comfortable, and safe camping plan without a private vehicle.",
"specific_research_tasks": [
"Identify 3 distinct campsite typologies (e.g., lakeside, forest, high altitude) in the region.",
"Curate a gear and meal list considering a strict backpack weight limit (max 15-18kg).",
"Calculate distances to the nearest settlement and medical facilities for emergency protocols.",
"Construct a precise timeline for a Saturday morning departure and Sunday evening return."
]
},
"output_structure": {
"format": "Strategic Research Report",
"sections": [
"1. Transportation & Logistics Matrix",
"2. Campsite Options (with Pros/Cons Analysis)",
"3. Gear & Meal Planning (Ultralight & Practical)",
"4. Step-by-Step Weekend Timeline (Chronological)",
"5. Safety Protocols & Local Insider Tips"
],
"tone": "Analytical, instructional, safe and encouraging"
}
}
Abstract Geometric Art Prompt Inspired by Wassily Kandinsky
{
"colors": {
"color_temperature": "neutral",
"contrast_level": "high",
"dominant_palette": [
"dark green",
"black",
"blue",
"yellow",
"red",
"light purple"
]
},
"composition": {
"camera_angle": "eye-level",
"depth_of_field": "medium",
"focus": "The central arrangement of a large light blue ring with a black core, intersected by black lines.",
"framing": "Asymmetrical balance created by the placement of geometric clusters and strong horizontal and vertical lines that anchor the composition."
},
"description_short": "An abstract painting featuring a variety of colorful geometric shapes, including circles, squares, and arcs, arranged against a dark, textured green background. The composition is structured by bold black lines.",
"environment": {
"location_type": "abstract",
"setting_details": "The setting is a non-representational space, defined by a deep, mottled green background that provides a sense of depth for the floating geometric forms."
},
"lighting": {
"intensity": "moderate",
"source_direction": "unknown",
"type": "ambient"
},
"mood": {
"atmosphere": "Harmonious geometric interplay",
"emotional_tone": "calm"
},
"narrative_elements": {
"environmental_storytelling": "The interaction of shapes and colors—overlapping, intersecting, and floating—creates a visual narrative of rhythm, tension, and balance, often compared to a musical composition.",
"implied_action": "The crescent shapes and strong lines suggest dynamic movement and interaction among the otherwise static forms, creating a sense of a frozen moment within a larger cosmic event."
},
"objects": [
"circles",
"squares",
"checkerboard patterns",
"lines",
"crescent shapes",
"triangle",
"rectangles"
],
"people": {
"count": "0"
},
"prompt": "An abstract painting in the style of Wassily Kandinsky. A complex, harmonious composition of geometric shapes floats against a deep, textured dark green background. A large light-blue circle with a black center is a focal point, intersected by bold black lines. Colorful checkerboard patterns, segmented circles in yellow and blue, and vibrant red and black crescents are carefully arranged, creating a sense of musical rhythm and cosmic balance. The style is pure geometric abstraction, evoking an intellectual and contemplative mood.",
"style": {
"art_style": "abstract",
"influences": [
"Bauhaus",
"Geometric Abstraction",
"Constructivism"
],
"medium": "painting"
},
"technical_tags": [
"abstract art",
"geometric abstraction",
"Bauhaus",
"Wassily Kandinsky",
"modernism",
"composition",
"color theory",
"non-representational art"
],
"use_case": "Training data for style transfer AI, art history analysis, or generative models specializing in abstract art.",
"uuid": "a6088ce6-f151-41f2-aec4-06758084a585"
}