A visual, interactive DFA (Deterministic Finite Automaton) simulator built with React + TypeScript + SVG.

designed to:
- help beginners understand Automata Theory visually
- bridge the gap between theory and implementation
- simulate DFA execution step by step
Built as a learning-first project for Automata Theory (TOC / FLAT).
- 📍 Visual States (circles)
- ➡️ Directed Transitions with arrowheads
- 🔁 Curved arrows for opposite-direction transitions
- 🎯 Start state indicator
- ✅ Final (accepting) states shown with double circles
- ☠️ Dead / Trap state handling
- 🟠 Current state highlighting
- 🔥 Active transition highlighting during execution
- ⌨️ Step-by-step input processing
- ❌ Automatic rejection via dead state
- Deterministic Finite Automaton (DFA)
- Start State
- Final (Accepting) State
- Dead / Trap State
- Transition Function δ(q, a)
- String Acceptance & Rejection
- One-symbol-at-a-time processing
- States are defined as data
- Transitions are defined as rules (
from,to,label) - The UI renders everything using
.map()(data → visuals) - Input is processed one character per step
- DFA moves state based on matching transition
- If no transition exists → DFA enters dead state
- Acceptance depends on final state at the end
git clone https://github.com/Sran012/state-machine-lab.git
cd state-machine-labpnpm installpnpm run devBuilt with 💖 by Sujal Rana