- Python 3.8+
- Node.js 16+ (for frontend)
- npm or yarn
python app.py
# Select "Desktop (Tkinter)" from menupip install -r requirements.txtcd frontend
npm install
cd ..cd backend
python main.pyBackend will run on http://localhost:8000
cd frontend
npm run devFrontend will run on http://localhost:3000
python app.py
# Select "Web (React + FastAPI)" from menu
# Browser will open automatically to http://localhost:3000- GET
/api/health- Check if backend is running
- GET
/api/bst/state/{db_id}- Get current BST state - POST
/api/bst/insert/{db_id}?value={value}- Insert node - POST
/api/bst/delete/{db_id}?value={value}- Delete node - GET
/api/bst/traverse/{db_id}/{method}- Traverse (bfs, dfs, inorder, etc.)
- GET
/api/hash/state/{db_id}- Get hash table state - POST
/api/hash/insert/{db_id}?key={key}&value={value}- Insert item - POST
/api/hash/delete/{db_id}?key={key}- Delete item
- GET
/api/tree/state/{db_id}- Get tree state - POST
/api/tree/insert/{db_id}/{parent_id}?value={value}- Insert node - GET
/api/tree/traverse/{db_id}/{method}- Traverse tree
- GET
/api/recursion/state/{db_id}- Get recursion tree state - POST
/api/recursion/insert/{db_id}- Insert node
- GET
/api/list-databases- List all databases - POST
/api/create-database/{adt_type}?db_name={name}- Create new DB - DELETE
/api/clear-database/{db_id}- Clear database
When backend is running, visit:
- Interactive Docs: http://localhost:8000/docs
- Alternative Docs: http://localhost:8000/redoc
- Ensure FastAPI is installed:
pip install -r requirements.txt - Check if port 8000 is in use:
netstat -ano | findstr :8000
- Clear node_modules:
rm -rf frontend/node_modules && cd frontend && npm install - Clear npm cache:
npm cache clean --force
- Confirm backend is running on http://localhost:8000
- Check CORS settings in
backend/main.pyif needed
- Change port in
frontend/vite.config.js(server.port) - Change port in
backend/main.py(uvicorn.run port)
cd frontend
npm run buildOutput: frontend/dist/
Recommended: Deploy with docker or cloud platform (Vercel, Heroku, AWS)
- Make changes to backend → API automatically reloads
- Make changes to frontend → Vite HMR automatically updates
- Test in browser with React DevTools & Konva debugging
- Implement BST Canvas visualization with Konva
- Implement Hash Table visualization
- Implement Tree visualization
- Implement Recursion stack animation
- Add frame capture/export functionality
- Add user authentication
- Deploy to production