Interactive Boolean logic minimization tool using the Quine-McCluskey algorithm.
- Interactive Karnaugh map editor (2-6 variables)
- Automatic Boolean expression minimization using Quine-McCluskey algorithm
- Sum of Products (SOP) and Product of Sums (POS) output
- Don't care conditions support
- Visual loop highlighting with interactive term selection
- Export/import state as JSON
- Dark mode support
- Keyboard navigation
# Install dependencies
npm install
# Serve the Karnaugh Map demo application
npx nx serve karnaugh-demo
# Open http://localhost:4200 in your browserThis repository contains two publishable npm packages:
Core algorithm library for Boolean function minimization using the Quine-McCluskey method.
npm install @mintplayer/quine-mccluskeyAngular component library providing an interactive Karnaugh map UI.
npm install @mintplayer/ng-karnaugh-mapThe karnaugh-demo application is available as a Docker image on GitHub Container Registry.
docker pull ghcr.io/mintplayer/karnaugh-map-app:main
docker run -p 8080:80 ghcr.io/mintplayer/karnaugh-map-app:main
# Open http://localhost:8080docker build --tag karnaugh-demo .
docker run -p 8080:80 karnaugh-demo├── apps/
│ ├── karnaugh-demo/ - Karnaugh Map Solver application
│ ├── karnaugh-demo-e2e/ - E2E tests for karnaugh-demo
│ ├── shop/ - Example e-commerce app (Angular SSR)
│ ├── shop-e2e/ - E2E tests for shop
│ └── api/ - Example backend API
├── libs/
│ ├── mintplayer/
│ │ ├── ng-karnaugh-map/ - Angular Karnaugh map component library
│ │ └── quine-mccluskey/ - Quine-McCluskey algorithm library
│ ├── shop/ - Shop feature libraries
│ ├── api/ - API libraries
│ └── shared/ - Shared models
├── Dockerfile - Docker build for karnaugh-demo
└── nx.json - Nx workspace configuration
# Development
npx nx serve karnaugh-demo # Serve the app
npx nx build karnaugh-demo # Build for production
npx nx test quine-mccluskey # Run unit tests
npx nx lint ng-karnaugh-map # Lint a library
# E2E Testing
npx playwright install chromium # Install browser (first time)
npx nx e2e karnaugh-demo-e2e # Run e2e tests
# Build all projects
npx nx run-many -t build
# Run all tests
npx nx run-many -t test
# Visualize project dependencies
npx nx graphThe karnaugh-demo application has Playwright e2e tests covering:
- Page title and layout
- Variable add/remove functionality
- Edit/Solve mode switching
- Solve functionality with result display
- UI component visibility
# Install Playwright browsers (required once)
npx playwright install chromium
# Run e2e tests
npx nx e2e karnaugh-demo-e2e
# Run e2e tests with UI
npx nx e2e karnaugh-demo-e2e -- --ui# Build the Quine-McCluskey library
npx nx build quine-mccluskey
# Build the Angular Karnaugh map library
npx nx build ng-karnaugh-map
# Build outputs are in dist/libs/mintplayer/The repository uses Nx Release for versioning and publishing:
# Release libraries
npx nx release-
CI (
ci.yml) - Runs on PRs and main branch pushes- Linting, testing, building, type checking
- E2E tests with Playwright
-
Publish (
publish.yml) - Runs on main branch pushes- Builds Docker image
- Pushes to GitHub Container Registry
- Generates build provenance attestation
- Frontend: Angular 21
- Build System: Nx 22
- Testing: Vitest (unit), Playwright (e2e)
- Styling: Bootstrap 5, SCSS
- Container: Docker with nginx
MIT