Frontend Technical Assessment for VectorShift
A visual pipeline editor that allows users to build directed graphs using drag-and-drop nodes, connect them into pipelines, and submit them to a backend service for structural analysis.
Built with React + React Flow + Zustand for the frontend and FastAPI for backend pipeline analysis.
- π Table of Contents
- β¨ Introduction
- βοΈ Tech Stack
- π Core Features
- π€Έ Quick Start
- π§± Project Structure
- π Application Flow
- π§ Architecture Overview
- π Future Enhancements
- π€ Contribution
- π Contact
This project is a visual pipeline builder inspired by node-based workflow tools.
Users can:
β’ Drag nodes from a toolbar
β’ Build pipelines on a visual canvas
β’ Connect nodes using edges
β’ Add dynamic variables inside text nodes
β’ Submit the pipeline to a backend service for validation
The backend analyzes the pipeline and returns:
- Number of nodes
- Number of edges
- Whether the graph is a Directed Acyclic Graph (DAG)
This project demonstrates frontend architecture, component abstraction, dynamic UI behavior, and backend integration.
- React 18 β UI library
- React Flow β Node-based graph rendering
- Zustand β Lightweight global state management
- Create React App (CRA) β Project scaffolding
- JavaScript (ES6) β Application logic
- CSS β Styling
- FastAPI β Python backend framework
- Python β Backend logic
- Uvicorn β ASGI server for FastAPI
A reusable BaseNode component enables easy creation of new node types without duplicating layout or styling.
Supported nodes include:
- Input Node
- LLM Node
- Output Node
- Text Node
- Math Node
- API Node
- Delay Node
- Filter Node
- Condition Node
A consistent dark UI theme across:
- Nodes
- Toolbar
- Canvas
- Submit controls
Ensures visual clarity and maintainability.
Text nodes support:
Hello {{user}} your order {{order_id}} is ready
The system automatically:
- Parses variables
- Creates corresponding input handles
- Positions handles dynamically
- Auto-resizes the text area based on content
Using React Flow, users can:
- Drag nodes onto the canvas
- Connect nodes with edges
- Move and organize pipelines visually
The pipeline can be submitted to the backend where it calculates:
num_nodes
num_edges
is_dag
Example result:
Nodes: 4
Edges: 3
Is DAG: true
The result is displayed via a frontend alert.
Make sure you have installed:
- Node.js
- npm
- Python 3
- pip
git clone https://github.com/Itssanthoshhere/VectorShift-Frontend-Assessment.git
cd VectorShift-Frontend-Assessmentcd backend
pip install fastapi uvicorn
uvicorn main:app --reloadBackend runs on:
http://localhost:8000
API Docs:
http://localhost:8000/docs
cd frontend
npm install
npm startFrontend runs on:
http://localhost:3000
frontend/
β
βββ public/
β βββ index.html
β
βββ src/
β βββ nodes/
β β βββ BaseNode.js
β β βββ inputNode.js
β β βββ llmNode.js
β β βββ outputNode.js
β β βββ textNode.js
β β βββ mathNode.js
β β βββ apiNode.js
β β βββ delayNode.js
β β βββ filterNode.js
β β βββ conditionNode.js
β β
β βββ draggableNode.js
β βββ toolbar.js
β βββ ui.js
β βββ submit.js
β βββ store.js
β βββ App.js
β βββ index.js
β
βββ backend/
βββ main.py
Toolbar
β
Drag Node
β
React Flow Canvas
β
Nodes + Edges stored in Zustand
Submit Button
β
Send nodes + edges
β
FastAPI Backend
β
Pipeline Analysis
β
Return result
β
Frontend Alert
Built using React Flow for graph rendering and Zustand for centralized state management.
Key responsibilities:
- Drag-and-drop pipeline creation
- Node rendering
- Edge connection handling
- Dynamic node behavior
- Backend API interaction
FastAPI service responsible for:
- Receiving pipeline structure
- Counting nodes and edges
- Checking if graph is a Directed Acyclic Graph
- Returning analysis results
Potential improvements include:
- Node configuration panels
- Pipeline persistence (database)
- Graph validation before submission
- Export/import pipeline JSON
- Real-time pipeline execution
- Visual DAG validation indicators
- Improved node styling system
This project was developed as part of a technical assessment.
However contributions are welcome.
Steps:
1. Fork repository
2. Create feature branch
3. Commit changes
4. Submit pull request
GitHub: Itssanthoshhere
LinkedIn: Santhosh VS
β If you like this project, consider giving it a star on GitHub.