d4380cc53bcd3c8ac7eab9416ba438a456ece6ea
Graph with Reflection on Code
This project demonstrates a simple graph data structure and its visualization using D3.js.
The graph supports adding nodes, directed edges, and reflexive edges (self‑loops).
The UI renders the graph in an SVG canvas with a force‑directed layout.
Features
- Pure JavaScript implementation (no Python or other languages).
- Reflexive edges can be added automatically.
- Interactive visualization with drag support.
- Simple test suite using Jest.
Getting Started
-
Clone the repository
git clone https://git.brojs.ru/kuzakhmetovartur/povtornyy-ekzamen-2-graf-s-refleksiey-na.git cd povtornyy-ekzamen-2-graf-s-refleksiey-na -
Install dependencies
npm install -
Run the application
npm startOpen your browser at
http://localhost:3000(or the port shown in the console). -
Run tests
npm test
Project Structure
├── public
│ └── index.html # Entry point for the browser
├── src
│ ├── index.js # Application bootstrap
│ ├── graph.js # Graph data structure
│ └── ui.js # Rendering logic
├── __tests__
│ └── graph.test.js # Jest tests for Graph
├── package.json
└── README.md
License
MIT License
Description
Languages
Python
57.4%
JavaScript
40.7%
HTML
1.9%