LogiSketch is an interactive web tool designed to bridge the gap between Boolean algebra and digital logic circuits. It parses boolean equations in real-time, generates truth tables, and visualizes the corresponding logic circuit diagram instantly.
👉 Try it live: logisketch.djenriquez.dev
Built for students, engineers, and hobbyists, LogiSketch simplifies the process of visualizing digital logic.
- Real-Time Parsing: Type equations (e.g.,
AB + C') and see the circuit update instantly. Supports up to 5 inputs (A-E). - Schematic Fidelity: Features realistic Triangle SPDT Switches, standard battery symbols, and high-fidelity logic gate representations.
- Universal Logic Modes: Switch between Standard gates (AND/OR/NOT), NAND-only, and NOR-only implementations with a single click.
- Interactive Visualization: Powered by React Flow, the circuit diagram is fully interactive—zoom, pan, and drag nodes.
- Dynamic Truth Table: Automatically generates the full truth table for your current equation.
- Professional Wiring: Implements specialized Trunk-Logic routing for power and ground rails, mimicking professional circuit schematics.
- Professional Reports: Generate and download a high-quality PNG report containing the equation, truth table, and circuit diagram.
- Mobile Optimized: Fully responsive design with a split-stack layout for mobile devices and touch-friendly controls.
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Visualization: @xyflow/react (React Flow)
- Animations: Framer Motion
- Export: html-to-image
| Standard Mode | NAND Implementation |
|---|---|
Visualizing Q = AB + C |
The same circuit using Universal Logic |
-
Clone the repository
git clone https://github.com/RokiTheWise/CircuitBuilder.git cd LogiSketch -
Install dependencies
npm install # or yarn install -
Run the development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000to see the app in action.
- Input: Use the input counter to select the number of variables (1-5).
- Type: Enter your boolean equation in the text box.
- Use
+for OR - Use
'for NOT (e.g.,A') - Implicit multiplication is AND (e.g.,
AB)
- Use
- Explore: Drag the canvas to inspect the generated circuit.
- Mode: Click "NAND" or "NOR" in the sidebar to see how to build the circuit using universal gates.
- Export: Click the Actions dropdown in the top right and select "Download Report" to save your work.
- Basic Gate Implementation
- Universal Logic (NAND/NOR)
- Report Generation
- Triangle SPDT Switch UI
- Professional Trunk Wiring
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Dexter Jethro Enriquez
- Portfolio: djenriquez.dev
- GitHub: @RokiTheWise
Made with ❤️ and Boolean Algebra.