ArchNet is an enterprise-grade, high-fidelity visual workspace for designing, auditing, compiling, and testing deep learning architectures. It empowers machine learning engineers to design complex model graphs, configure training hyperparameters, validate tensor shape matching, run animated forward passes, and instantly compile production-ready modules to PyTorch, TensorFlow, JAX, or ONNX.
- Interactive Canvas Workspace: A high-performance vector graphics board powered by Konva.js supporting node dragging, socket connect ports, bezier linkages, multi-selection, and group operations.
- Topological Shape Solver: Automatically propagates and calculates tensor sizes downstream from root input parameters in real-time, verifying rank compatibility and broadcasting compliance.
- Diagnostic Center & AutoML Copilot: A strict AST compiler and heuristical rules auditor that scans active graphs and saved library components for loop cycles, disconnected nodes, and anti-patterns.
- Bidirectional Trace Viewer: Select nodes on the canvas to highlight and auto-scroll corresponding generated code lines, or click tracking comments (
# node: {nodeId}) in the code editor to highlight/select nodes on the canvas. - Compiler Explanation Mode: Click any node on the canvas to inspect its step-by-step shape solver logic, active hyperparameters, parameters formula, and calculated weights arithmetic.
- Multi-Framework Compiler: Generates clean, production-grade Python classes (
class GeneratedModel) conforming to standard PyTorch, TensorFlow, Flax (JAX), and ONNX specifications. - Framework Benchmarking Dashboard: Compare compiled model latency (ms/batch) and peak VRAM allocations (GB) across PyTorch, TensorFlow, and JAX using interactive charts.
- SOTA Pre-trained Model Gallery: Browse ResNet, BERT, ViT, and GraphSAGE models, view historical training curves, and download pre-trained weights hosted on Hugging Face.
- Dataset Manager: Ingestion area featuring drag-and-drop CSV/ZIP uploading, tabular data previews, and database processing status tracking.
- Training Telemetry & Monitor: Stacked vertical monitor panel plotting training/validation loss and validation accuracy curves in real-time using
rechartsconnected to live WebSockets. - Sandbox Mode: A zero-login interactive playground for guest builders to draft models, run forward pass animations, and browse templates. Restricts premium functions (ONNX export, framework comparison, version diffing) with context-aware login dialog prompts.
- Bidirectional Trace Viewer: Integrated decoupled
hoveredNodeIdandselectedNodeIdstates globally, automatically matching code comments to Konva visual elements. - Compiler Explanation Mode: Exposed shape solver math in the explainability panel, displaying formula variables and weight equations (e.g. convolution channels projection).
- Credibility Dashboard & Walks: Expanded documentation with an interactive Compiler Architecture flowchart and a 3-step Node-to-Code mapping walkthrough.
- Framework Benchmarking Page: Plotted execution latencies and VRAM usage on A100/RTX 4090 configurations using Recharts charts loaded from verified Python metrics.
- Hugging Face Weight Releases: Integrated lightweight weight cards linking ResNet, BERT, ViT, and GraphSAGE checkpoints to Hugging Face repositories.
- Premium UI Polish & Micro-interactions: Integrated
framer-motionfor fluid, spring-physics slide transitions when opening or closing left, right, and bottom layout panels. - Weighty Canvas Dragging: Refactored Konva nodes to scale up (1.03x centered) and cast realistic drop shadows when dragged or selected.
- Interactive Grid Snapping: Adjusted the CSS background dot-grid to exactly match the
20pxsnapping grid and dynamically tint the dots blue during active node dragging.
This flowchart illustrates the relationships between the frontend workspace, state managers, compiler layers, and FastAPI/PostgreSQL cloud backends.
graph TD
Canvas["Node Editor Canvas"]
Sidebar["Diagnostic Center and AutoML"]
CodeView["Generated Code Viewer"]
Telemetry["Training Telemetry Dashboard"]
DatasetMgr["Dataset Upload Manager"]
BenchmarkView["Benchmarking Dashboard"]
CanvasStore["canvasStore - Zustand"]
ProjStore["projectStore - Zustand"]
TrainingStore["trainingStore - Zustand"]
PyTorchC["pytorchCompiler"]
TFC["tensorflowCompiler"]
JaxC["jaxCompiler"]
ONNXC["onnxCompiler"]
GraphQL["GraphQL API Endpoint"]
WS["WebSocket Telemetry Router"]
Celery["Celery Ingestion Workers"]
DB["PostgreSQL Database"]
Canvas -->|User Actions| CanvasStore
CanvasStore -->|Topological Sort and Solver| Sidebar
CanvasStore -->|Trigger Local Synthesis| PyTorchC
CanvasStore -->|Trigger Local Synthesis| TFC
CanvasStore -->|Trigger Local Synthesis| JaxC
CanvasStore -->|Trigger Local Synthesis| ONNXC
PyTorchC -->|Render Script| CodeView
TFC -->|Render Script| CodeView
JaxC -->|Render Script| CodeView
ONNXC -->|Render Script| CodeView
ProjStore -->|Sync Graph CRUD| GraphQL
GraphQL -->|Write and Read| DB
DatasetMgr -->|Upload and Process| GraphQL
TrainingStore -->|Websocket Connection| WS
WS -->|Live Telemetry Frames| Telemetry
Celery -->|Emit Metrics Event| WS
CodeView -.->|Bidirectional Highlight / Select| CanvasStore
BenchmarkView -->|Load Verified JSON Logs| CodeView
This diagram maps how user interface interactions in the canvas and the code panels are synchronized bidirectionally.
graph LR
subgraph Canvas ["Visual Canvas"]
Node["Konva Node Block"]
end
subgraph Store ["canvasStore State"]
Hover["hoveredNodeId"]
Select["selectedNodeId"]
end
subgraph Editor ["RealTimeCodePanel"]
Line["Generated Python Statement"]
Comment["node: nodeId comment marker"]
end
Node -->|Hover / MouseEnter| Hover
Node -->|Click / MouseDown| Select
Hover -->|Hook Subscription| Editor
Select -->|Scroll Into View| Editor
Editor -->|Highlight Line CSS| Line
Line -->|Click Line Gutter| Comment
Comment -->|Update Selection| Select
Select -.->|Pulsing Highlight Glow| Node
Telemetry updates from backend Celery tasks or local simulators cascade into charts and experiment histories.
sequenceDiagram
autonumber
participant Client as Training Monitor UI
participant Store as trainingStore Zustand
participant WS as FastAPI WebSocket Server
participant Celery as Celery Worker
Client->>Store: mount and startTraining
activate Store
Store->>WS: Establish Connection
activate WS
WS-->>Store: Handshake Successful
Note over Store, Celery: Epoch Execution Telemetry Loop (20 epochs)
Celery->>WS: Push Epoch metrics
WS->>Store: Forward WebSockets Frame
Store->>Store: Append to metrics and update epoch
Store-->>Client: Re-render charts
Celery->>WS: Job Completed
WS->>Store: Final Metrics frame
deactivate WS
Store->>Store: Record run in history and disconnect
deactivate Store
| Category | Technology | Purpose |
|---|---|---|
| Framework | Next.js 16 (App Router) | Static page rendering and layout routing |
| Core Runtime | React 19 & TypeScript 5 | Strict typing and component hierarchy |
| Canvas Graphics | Konva.js & react-konva |
Interactive workspace vector canvas |
| State Manager | Zustand 5 | Client-side reactive stores (Canvas, Project, Training) |
| Charts | Recharts v3 | Telemetry and benchmarking charts |
| Styling | Tailwind CSS v4 & Vanilla CSS | Glassmorphism, animations, HSL themes |
frontend/
βββ public/ # Static public assets
β βββ artifacts/
β βββ benchmark_data.json # Comparative execution logs
β βββ sota_metadata.json # Pre-run training curves and Hugging Face URLs
β
βββ src/
β βββ app/ # Next.js App Router Page View Controllers
β β βββ page.tsx # Main Model Workspace landing dashboard
β β βββ layout.tsx # General page template controller
β β βββ globals.css # Custom background animations, scrolls and dark variables
β β β
β β βββ docs/ # Docs, Compiler Architecture flow, and model walkthroughs
β β βββ datasets/ # Dataset Drag-and-Drop repository page
β β βββ editor/[projectId]/ # Dynamic interactive Canvas Node Editor workspace
β β β βββ benchmark/ # Framework benchmarking page with Recharts
β β β βββ deploy/ # Deploy setup panel
β β β βββ experiments/ # Runs history comparator
β β β βββ inference/ # Model testing API client
β β β βββ training/ # WebSocket telemetry dashboard
β β β
β β βββ models/ # Base visual templates importer panel
β β β βββ research/ # Prebuilt templates gallery
β β βββ settings/ # API credentials and sync setups
β β
β βββ components/ # Reusable Visual Custom Modules
β β βββ Layout/ # Header, Sidebar, MainLayout
β β βββ Canvas/ # Interactive Canvas modules (NodeGraph, CanvasWrapper)
β β βββ Panels/ # LayerLibrary, ConfigPanel, ExplainabilityPanel (Explanation Mode)
β β βββ Modals/ # Code Preview and versioning popups
β β βββ Training/ # Training dashboard widgets (Charts, History panels)
β β
β βββ store/ # Unified State Managers
β β βββ projectStore.ts # Project list fetching and auth management
β β βββ trainingStore.ts # Websocket metrics and historical run records
β β βββ canvasStore.ts # Active canvas nodes, connections (including hoveredNodeId)
β β
β βββ lib/ # Core compilation algorithms
β β βββ canvas/
β β βββ pytorchCompiler.ts # Compiles canvas graph to PyTorch scripts with tracking comments
β β βββ tensorflowCompiler.ts # Compiles canvas graph to TensorFlow code
β β βββ jaxCompiler.ts # Compiles canvas graph to Flax/JAX code
β β βββ onnxCompiler.ts # Compiles canvas graph to ONNX binary representation
β β
β βββ types/
β βββ canvas.ts # Types for Nodes, Links, Custom Blocks, and AutoML Suggests
β
βββ tsconfig.json # TypeScript setup
βββ package.json # Project dependencies
βββ next.config.ts # Next.js bundler setup
Ensure you have Node.js (v20+ recommended) installed.
Clone the repository and install all required modules:
npm installExecute the Next.js dev compiler locally:
npm run devOpen http://localhost:3000 in your browser.
Verify type check compliance and create optimized production static bundles:
npm run buildStart the production server:
npm run startThe topological shape solver propagates tensor dimensions downstream based on the following layer specifications:
Layer Type (NodeType) |
Expected Input Rank | Configuration Parameters | Spatial Output Shape Formula |
|---|---|---|---|
| Input | N/A |
dim (e.g. [224, 224, 3]) |
Returns dim (Base Dimensions) |
| Conv2D | 3D ([H, W, C]) |
filters, kernelSize, stride, padding
|
same: [H, W, filters] valid: [outH, outW, filters] where: |
| MaxPool2D | 3D ([H, W, C]) |
poolSize |
[outH, outW, C] where: |
| BatchNorm2D | 3D ([H, W, C]) |
N/A | Returns identical input shape [H, W, C]
|
| Dropout | Any | rate |
Returns identical input shape |
| Flatten | Any | N/A | 1D: [size] where |
| Dense | 1D ([Features]) or 2D |
units |
[units] or [Seq, units]
|
| Embedding | 1D / 2D ([Seq]) |
vocab_size, embedding_dim
|
[Seq, embedding_dim] |
| PositionalEncoding | 2D ([Seq, Dim]) |
embed_dim, max_len
|
[Seq, embed_dim] |
| MultiHeadAttention | 2D ([Seq, Dim]) |
num_heads, embed_dim
|
[Seq, embed_dim] |
| LayerNorm | Any | N/A | Returns identical input shape |
| TransformerBlock | 2D ([Seq, Dim]) |
num_heads, embed_dim
|
[Seq, embed_dim] |
| LSTM / GRU / RNN | 2D ([Seq, Dim]) |
hidden_size, return_sequences
|
return_sequences = true: [Seq, hidden_size] return_sequences = false: [hidden_size]
|
| BiLSTM | 2D ([Seq, Dim]) |
hidden_size, return_sequences
|
return_sequences = true: [Seq, hidden_size * 2] return_sequences = false: [hidden_size * 2]
|
| GCN / GraphSAGE | 1D / 2D | out_features |
[out_features] |
The Diagnostic Center scans the active model canvas and saved custom blocks using the following heuristic rules:
| Issue/Category | Check Logic | Severity | Programmatic Auto-Fix Action |
|---|---|---|---|
Loop Cycle (cycle) |
Traverses graph using a DFS stack to identify cyclic paths. | Error | Breaks the loop by deleting the cycle-inducing edge connection. |
Disconnected Layer (disconnected) |
Runs reachability trace from the Input node to verify connection path. | Warning | Links the disconnected node by adding an edge from the closest upstream block. |
Rank Conflict (rank) |
Validates layer rank requirements (e.g. Dense requires 1D, MaxPool requires 3D). | Error | If a 3D layer links to a Dense layer, it automatically inserts a Flatten node in between. |
Broadcasting Conflict (broadcast) |
Verifies that incoming parent edges at merge nodes have matching dimensions. | Error | Alerts the designer of mismatched spatial grids or channel configurations. |
Activation Missing (anti-pattern) |
Scans all Conv2D layers to ensure an activation function is set. |
High Suggestion | Configures activation: 'ReLU' on the target convolutional layer. |
Non-Standard Input (optimization) |
Verifies if the Input layer dimension matches typical 224x224 RGB grids. |
Info Suggestion | Resizes the input shape definition to standard [224, 224, 3]. |
Parameter Explosion (optimization) |
Checks if Dense connections exceed 500,000 parameter weights. | Medium Suggestion | Reduces fully connected units to 128 to save VRAM memory footprint. |
Pooling Recommendation (architecture) |
Detects if 3 or more convolutions are stacked successively without pooling. | Medium Suggestion | Inserts a MaxPool2D layer with poolSize: 2 after the convolutions. |
- Keep Canvas Modules Client-Side: All Konva stage layers rely on window coordinates. Ensure they are loaded dynamically via
CanvasWrapper.tsxand labeled'use client'. - Support Downstream recalculations: When creating a new node type in
src/types/canvas.ts, add its shape rules undercomputeNodeOutputShapeinsidesrc/store/canvasStore.ts. - Preserve Compiler Tracing: Ensure compiler files under
src/lib/canvas/correctly format target codeblocks underclass GeneratedModeland include appropriate node comments to compile cleanly in Next.js and PyTorch runtime environments.