An interactive knowledge graph and visual encyclopedia for AI/ML concepts. Built with Next.js 16, featuring a canvas-based force-directed graph, architecture visualizer, and structured learning paths.
/ to focus search, Escape to close panels, Alt+Arrow for history navigation.| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router, Turbopack) |
| Language | TypeScript |
| Styling | Custom CSS with CSS variables, @property animations |
| State | Zustand (atomic selectors for render optimization) |
| Graph Engine | Custom Canvas 2D — force-directed physics, spatial grid partitioning, lerp-smoothed camera |
| Font | Plus Jakarta Sans (Google Fonts) |
src/
├── app/
│ ├── globals.css # Base reset, loading screen, toast, panel/modal animations,
│ │ # scrollbar, code blocks, tooltip, accessibility
│ ├── layout.tsx # Root layout (meta, fonts, CSS imports)
│ └── page.tsx # Main page — LoadingScreen, Toast, Home (data orchestrator),
│ # AppContent (all UI split into prop-driven component)
├── lib/
│ └── graph-engine.ts # Canvas knowledge graph engine (~1010 lines)
│ ├── Physics: spatial grid O(n) neighbor lookup, repulsion/attraction/gravity
│ ├── Rendering: radial gradient bg, cached dot grid, curved edges with arrows,
│ │ quantum packet animations, gradient-filled nodes with glow
│ ├── Interaction: mouse drag/pan, wheel zoom (lerp-smoothed), touch pinch-zoom
│ ├── Performance: dirty flag + idle frame skipping with full rAF stop/wake,
│ │ label truncation cache, sorted node draw order cache
│ └── Dark mode: full theme swap via setDarkMode()
├── store/
│ └── useTitanMLStore.ts # Zustand store — all app state and actions
└── public/
├── css/
│ ├── styles.css # Main component styles + dark mode overrides
│ ├── architectureStyles.css # Architecture gallery & flow visualizer
│ └── knowledgePath.css # Knowledge path gallery & timeline
├── data/
│ ├── graphData.json # Categories & terms with relationships
│ ├── architecture.json # Architecture definitions with steps
│ └── knowledgePath.json # Learning paths with steps/subpaths
└── assets/
relatedTerms, selectedTermCategory, and currentArch are memoized to avoid recomputation on every render._wake(). Saves CPU and battery._sortedDirty flag.nodeId:maxLabelPx and cleared on data reload.destroy() clears all arrays, maps, caches, event listeners, and canvas references. ResizeObserver is disconnected on unmount.db.ts, utils.ts, api/route.ts, components/ui/, hooks/) removed. Unused codeBlockRef eliminated._boundListeners[] for complete cleanup.@keyframes, emoji rotation, fade-in on mount via loaderFadeIn keyframe, and fade-out + scale transition on data load. Loader is conditionally rendered (removed from DOM after fade-out).translateY + scale + opacity) and smooth exit animation with 300ms crossfade.key prop, triggering viewFadeIn animation on each navigation.styles.css. Panel sections stagger-animate on open.suppressHydrationWarning on both <html> and <body> to handle browser extension attribute injection._sortedNodes copy instead of mutating this.nodes during iteration.getTerm ReferenceError — graph.onNodeSelect callback was calling undefined getTerm(). Fixed to use useTitanMLStore.getState().terms.find().loaderFading state was set but never applied to className. Now conditionally renders the fade-out loader div._wake() mechanism on all interaction handlers._labelCache now cleared in loadData() to prevent stale entries after data reload.codeBlockRef. Copy button is fully inline React state. Added padding-top: 40px for button clearance.viewFadeIn animation each time.:focus-visible styles and :focus:not(:focus-visible) reset.db.ts, utils.ts, api/route.ts, components/ui/, hooks/.# Install dependencies
npm install
# Development server
npm run dev
# Production build
npm run build
npm start
Open http://localhost:3000 in your browser.
| Created by Abhishek Shah — Portfolio |
All rights reserved.