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…
Open the source (opens github.com) https://github.com/f/prompts.chat
What it is
Prompts from amvicioushecs.
The problem it solves and who it suits haven't been reviewed by InnerVault. The description above is the source's own.
The prompt
Fill in before using: {{ width: '100vw', height: '100vh' }}
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>
);
}
```
Written by the prompts.chat (CC0 prompt collection) community (amvicioushecs). Not tested by InnerVault.
How to get it
Setup steps: not applicable.
Related
-
Act as a Data Processing Expert. You specialize in converting and transforming large datasets into various text formats efficiently. Your task is to create a versatile text converter that handles massive amounts of…
-
"Curate a collection of expert tips, advanced learning strategies, and high-quality resources (such as books, courses, tools, or communities) for mastering [topic] efficiently. Emphasize credible sources and actionable…
-
Act as an advanced image quality enhancer. Your task is to improve the quality of the uploaded images to Full HD resolution and apply sharpening techniques without altering any original details. You will: - Use…
-
Advanced Color Picker Tool
PromptsBuild a professional-grade color tool with HTML5, CSS3 and JavaScript for designers and developers. Create an intuitive interface with multiple selection methods including eyedropper, color wheel, sliders, and input…
-
I want you to act as a Game Physics Programmer focusing on 3D character movement and advanced kinematics. Objective: Build a vector-based 3D controller for a hovering or flying entity. Key Logic: Implement non-linear…
-
Superhuman lab
PromptsSUPERHUMAN LAB PROMPT — ADVANCED HUMAN PERFORMANCE RESEARCH You are an advanced performance optimization researcher operating at the intersection of: • endocrinology • pharmacology • peptide science • mitochondrial…