Welcome to my highly customized and polished submission for the VectorShift Technical Assessment.
This project goes far beyond a simple drag-and-drop implementation. It is a fully functional, beautifully designed, and highly interactive Directed Acyclic Graph (DAG) node editor. I set out to create a truly premium user experience, akin to industry-leading visual programming interfaces.
It seamlessly connects a React-based frontend canvas with a FastAPI Python backend to parse, validate, and analyze node networks in real-time.
The entire interface was designed from scratch without relying on bloated component libraries. It features:
- Deep Indigo Dark Mode: A stunning, eye-friendly gradient backdrop.
- Glassmorphic Nodes: Translucent, frosted-glass nodes (
backdrop-filter: blur()) with subtle box-shadows that make them feel like they are floating over the canvas. - Interactive Animations: Nodes float in when created, pulse with a glowing aura when selected, and inputs feature smooth focus transitions.
To ensure the codebase scales effortlessly, I built a universal <BaseNode /> component.
- All nodes (Input, LLM, Text, Output, and 5 Custom Add-ons) inherit from this master component.
- It automatically handles the Node body, glowing header dots, standardized padding, and even dynamic Handle (connection dot) generation.
- Unlimited Resizing: Integrated React Flow's
<NodeResizer />allowing users to click any node and drag glowing handles to scale it to any size. - Auto-Expanding Text Nodes: Textarea inputs calculate their scroll heights and dynamically resize to fit content perfectly as you type.
- Regex Variable Parsing: Typing
{{ variable_name }}instantly parses the string via Regex and magically sprouts a new connection handle on the node's edge. - Effortless Flow Deletion: Created a Custom Edge component. If you connect a flow incorrectly, simply click the bright red "X" sitting directly on the line to disjoint it.
- Robust Ctrl+Z Undo History: Built a full History Stack inside our Zustand store. Made a mistake? Deleted the wrong node? Just press
Ctrl+Z(orCmd+Z) anywhere to instantly undo your actions!
- Instead of using a clunky, default browser
alert()to show backend responses, I built a Custom Overlay Modal. - When you click submit, it simulates a processing delay, sends the entire graph structure to the FastAPI backend, calculates cycle-detection (DFS), and gracefully animates in a dashboard showing the exact
Number of Nodes,Number of Edges, and mathematically verifies if your pipeline is a validDAG.
This project is split into two parts: the Frontend (React) and the Backend (FastAPI). You will need two separate terminal windows to run them both simultaneously.
- Open a terminal and navigate to the
backendfolder:cd backend - Install the necessary Python packages:
pip install fastapi uvicorn
- Start the FastAPI backend server using Uvicorn:
The backend will be running on
uvicorn main:app --reload
http://localhost:8000.
- Open a second terminal window and navigate to the
frontendfolder:cd frontend - Install the Node modules:
npm install
- Start the React development server:
The frontend will seamlessly open in your browser at
npm start
http://localhost:3000.
Thank you for reviewing my assessment! I had a lot of fun building this and focused heavily on achieving a level of polish that users would truly love interacting with.