Toy Tetragraph Hash is a text transformation tool built using FastAPI for the backend and React for the frontend. The tool processes a user-inputted text, transforms it into a series of 4x4 matrices, and performs various operations on these matrices, ultimately providing a transformed text output.
- Clean and transform user input text
- Convert text into 4x4 matrices
- Apply transformations and calculate running totals
- Display the transformation steps and final result
backend/
: Contains the FastAPI backend implementation.frontend/
: Contains the React frontend implementation.
- Python 3.8 or higher
- Node.js and npm
- Git
-
Navigate to the
backend/
directory:cd backend
-
Create a virtual environment and activate it:
python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt (pip3 install -r requirements.txt) if python3
-
Run the FastAPI server:
uvicorn app:app --reload
-
Navigate to the
frontend/
directory:cd frontend
-
Install the dependencies:
npm install
-
Run the React development server:
npm start
- Open your browser and navigate to
http://localhost:3000
. - Enter the text you want to transform in the text area and submit.
- The transformation steps and final result will be displayed on the page.
- The main logic is implemented in
main.py
. - The API endpoints are defined in
app.py
.
- The main React component is
TextTransformation.js
in thesrc/pages
directory. - The CSS styles are defined in
src/App.css
.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.