Inspiration
The spark for LogicFlow AI came during a late-night study session for my Digital Logic Design course. I realized there was a massive friction point in the engineering workflow: we brainstorm and sketch complex circuits on paper or whiteboards, but then we have to manually "re-draw" them in software or write tedious Verilog code to test them. I wanted to create a bridge that could instantly turn a hand-drawn diagram into a functional, digital system.
What it does
LogicFlow AI is a full-stack application that transforms hand-drawn logic circuit sketches into digital silicon. A user simply uploads a photo of their diagram, and the system: Recognizes components like AND, OR, XOR gates, Multiplexers, and Flip-Flops. Extracts the connectivity (the "netlist") between these components. Generates synthesizable Verilog code and provides a real-time Boolean truth table. Simulates the logic so users can interact with their "paper" circuit digitally.
How we built it
I built LogicFlow AI using a modern, robust tech stack designed for speed and precision: Frontend: A responsive Next.js and Tailwind CSS interface for seamless image uploads and code visualization. The AI Brain: Gemini 1.5 Pro serves as the vision engine, identifying gate types and port connections from raw, often messy, hand-drawn images. Logic Engine: I developed a custom TypeScript engine that takes the AI's raw data and recursively evaluates the Boolean expressions. Math & Logic: Used LaTeX integration for clear mathematical representation of the logic, such as: $$f(A, B, C) = \sum m(1, 3, 5, 7) = (A \cdot B) + \overline{C}$$
Challenges we ran into
The biggest hurdle was Ambiguity. Hand-drawn lines are rarely straight, and "wires" often cross in confusing ways. The "Junction" Problem: Teaching the system to distinguish between two wires just crossing and two wires being electrically connected was difficult. Recursive Loops: Handling feedback loops in sequential circuits (like Latches) required careful management of the evaluation engine to prevent infinite recursion. Prompt Engineering: It took significant iteration to get the AI to output a structured JSON format that my TypeScript engine could reliably parse every time.
Accomplishments that we're proud of
From Sketch to Code: Successfully generating a structural Verilog file that can be dropped directly into professional tools like Vivado or Quartus. The Evaluator: Building a custom engine that handles multi-level gate nesting without losing logic integrity. UX/UI: Creating a "Developer Portfolio" grade interface that makes high-level hardware engineering feel accessible and modern.
What we learned
This project pushed me deep into the world of Abstract Syntax Trees (AST) and graph theory. I learned that AI is incredibly powerful at "seeing," but the "thinking" (the rigid logic) still requires a strong algorithmic backbone. I also gained a much deeper appreciation for Hardware Description Languages (HDL) and the complexities of synthesis.
What's next for LogicFlow AI
The roadmap for LogicFlow AI is ambitious: Real-time AR: Using a mobile camera to overlay logic states (1s and 0s) directly onto the paper sketch via Augmented Reality. Advanced Components: Expanding support to include complex Integrated Circuits (ICs) and 8-bit micro-architecture blocks. Export to PCB: A feature to export the recognized schematic directly into an Altium or KiCad-ready file format for physical circuit board manufacturing.
Built With
- gemini-2.5-flash
- next.js
- reactflow
- tailwindcss
- typescript
Log in or sign up for Devpost to join the conversation.