The goal of this test is to assess your ability to develop a minimal dynamic knowledge graph application where users can input nodes and relationships, and visualize the graph in real-time.
- Backend: Use either Node.js (Express) or Python (Flask/Django).
- Frontend: Use React (or any JavaScript framework).
- Graph Visualization: Use a graph visualization library like D3.js or Cytoscape.js.
- Database: Optional - You can use an in-memory data structure (like arrays) or a simple database (SQLite, MongoDB).
- Add Nodes: Users should be able to create nodes (e.g., entities).
- Add Relationships: Users should be able to create relationships between nodes.
- Display Graph: The application should display a dynamic graph visualization of nodes and relationships.
- Retrieve Graph Data: The app should have an API to retrieve all nodes and relationships.
-
Backend Setup
- Create an API using either Node.js (Express) or Python (Flask/Django).
- The API should allow adding nodes and relationships, and fetching the graph data.
-
Frontend Setup
- Develop a user interface using React (or a framework of your choice).
- Users should be able to add nodes and relationships through the UI.
-
Graph Visualization
- Integrate a graph visualization library (D3.js, Cytoscape.js, or similar).
- The graph should dynamically update as nodes and relationships are added.
-
Bonus: If you're comfortable, feel free to use a database to persist data between sessions.
- Fork this Repository: Fork this repository to your GitHub account.
- Work on a New Branch: Create a new branch for your implementation (e.g.,
yourname-feature). - Implement the Features: Complete the tasks as outlined above.
- Submit a Pull Request: When you’re done, submit a pull request back to this repository.
Your submission will be evaluated based on:
- Functionality: Does your application work as expected?
- Code Quality: Is your code clean, modular, and maintainable?
- Adherence to Requirements: Have you met all the functional requirements?
- User Experience: Is the UI intuitive and easy to use?
- Bonus Points: For adding extra features like persistent storage or optimizing the graph visualization.
Here’s an example of how you might structure node and relationship data:
- Node 1:
{"id": 1, "name": "GraphFusion", "type": "company"} - Node 2:
{"id": 2, "name": "Kiplangat Korir", "type": "person"}
{"from": 1, "to": 2, "relationship": "founder"}
You can format the data however you prefer in your implementation.
Please submit your pull request by September 25 2024.
Good luck! If you have any questions, feel free to reach out.