git clone https://github.com/jaman7/logic-react-react-flow.git .
npm i
docker-compose up -d
npm run dev
npm i
npm run dev
The app will be available at: http://localhost:5173/
email = test@test.io password: "Test123$"
An interactive educational platform built with React, TypeScript, and React Flow for simulating, visualizing, and minimizing digital logic functions. The application includes real-time logic gate simulation, Karnaugh map-based minimization, and automatic logic circuit generation.
- Simulates basic logic gates: AND, OR, NOT, NAND, NOR, XOR, XNOR
- Interactive buttons to toggle input values (
0
or1
) - Dynamic LED output indicators
- Auto-play functionality to step through truth table inputs
- Time-series chart of input/output changes using ApexCharts
- Truth table viewer with row selection
- Adjustable simulation speed (10s, 5s, 2s, 1s, 0.5s)
- Define number of inputs and outputs (up to 4)
- Input truth table manually or import via CSV
- Validation of binary formats and lengths
- Export valid tables to CSV
- Karnaugh Map (K-map) generation and visualization
- Automatically minimized Boolean function (e.g.,
F(A,B) = A'B + AB'
) - Auto-generated logic gate diagram using React Flow
- Framework: React 19, TypeScript
- UI Libraries: PrimeReact, SCSS Modules
- Simulation & Charts:
- React Flow – logic circuit builder
- ApexCharts – waveform charts
- Form Validation:
react-hook-form
,yup
- Internationalization:
react-i18next
(EN/PL support) - State Management: Zustand
- Data Processing:
kmap-solver
,kmap-solver-lib
– for logic minimizationmathjs
,papaparse
This project is a RESTful API built with Express.js, Prisma ORM, PostgreSQL, Redis, and JWT authentication. It supports user management, authentication, and logic gate truth tables, including seeding predefined logic structures.
- JWT-based authentication (access & refresh tokens)
- Token verification using RSA keys
- Secure session handling with Redis
- Modular architecture with Zod validation
- REST API with:
- User CRUD (with roles)
- Truth table management (preloaded examples)
- Environment-based config system using
config
andenvalid
- Dockerized Redis
- Testing with Jest + Supertest
- Prettier + ESLint ready