AVL Tree Car Backend is the server-side engine powering the ATC car simulation project. It exposes a REST API and a real-time Socket.IO interface to create, manage, and traverse an AVL self-balancing binary search tree whose nodes represent road obstacles — giving the frontend everything it needs to animate a car dodging hazards along a track.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/avl_tree_car/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Clone, install dependencies, and have the server running in under five minutes.
Project Structure
Understand how routers, controllers, models, sockets, and utilities fit together.
AVL Tree Concepts
Learn how the AVL tree is implemented — rotations, balance factors, and traversals.
API Reference
Full documentation for every REST endpoint and Socket.IO event.
What It Does
The backend manages a single sharedAVLTree instance whose nodes store Obstacle objects (position x, y, and type). Every insert and delete automatically rebalances the tree using LL, RR, LR, and RL rotations so that lookups stay O(log n) regardless of insertion order.
REST API
Add or remove obstacles and bulk-load simulation configs over HTTP.
Socket.IO
Subscribe to live tree updates and stream traversal results in real time.
Traversals
Inorder, preorder, and posorder walks emitted node-by-node to the frontend.
Getting Started
Connect your frontend
Point the ATC Frontend at
http://localhost:4500 and start the simulation.This repository is the backend only. The frontend lives at avl_tree_car_front and must be set up separately.