This is a single page application for educating about the problem of fair dividing a resource among several people, commonly called "Cake Cutting." It is built with React and uses React-Router for internal routing.
It was bootstrapped with Create React App which simplifies app set up.
It is hosted from github using Netlify. View it live at https://fairslice.netlify.app/.app/
This project uses Material UI components. These are a robust set of components and styling built by Google and used by hundreds of apps and websites. In the code, anything imported from @mui/material or @mui/icons-material is Material UI.
Graph display uses the data visualization library D3 in a very basic way. The mapping between pixels and graph values uses D3, but that's about it.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
See the section about deployment for more information.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
Working with SVGs in React is the same as working with HTML elements, however, the SVG elements include more display logic than HTML. In particular, z-index does not work with SVG so elements will be stacked in the same order as in the file.