This is a Truth Table Generator and Visualizer built with React.js. The application allows users to create truth tables based on the number of variables they specify, customize the column headers (except the output column), and input custom output values. The app also includes functionality to export the generated table to the clipboard for pasting into Google Docs.
Ensure you have the following installed on your machine:
Install Node.js:
Verify the installation:
node -v
npm -v
These commands should return the versions of Node.js and npm.
Clone the repository to your local machine:
git clone https://github.com/your-repo/truth-table-generator.git
Open the project in your preferred code editor. You can use Visual Studio Code or IntelliJ IDEA:
File
> Open Folder
and selecting the folder containing the cloned repository.Open
from the welcome screen and choose the project directory.Install dependencies by running the following command inside the main folder (where package.json
is located):
npm install
Run the application using the command:
npm start
This will start the development server, and you can view the app by navigating to http://localhost:3000
in your web browser.
Once you’ve generated the truth table, you can press the Export button. The table will be copied to your clipboard in a format suitable for pasting into Google Docs or any other text editor that supports CSV formatting.
```plaintext truth-table-generator/ ├── node_modules/ ├── public/ ├── src/ │ ├── App.css # Styles for the app │ ├── App.js # Main React component with the logic for generating the truth table │ ├── index.js # Entry point for React ├── package.json # Project configuration and dependencies └── README.md # Information about the app and how to run it