Interactive web interface for the Redux computational complexity knowledgebase
- Website: https://redux.portneuf.cose.isu.edu/
- Backend Repository: Redux Backend
- About Redux Frontend
- Prerequisites
- Local Development Setup
- Code Overview
- Adding to the Codebase
- Deployment
- Branching Strategy
- Definition of Done
- Contributors
- Additional Resources
The Redux Frontend is a Next.js-based web application that provides an interactive interface for exploring computational complexity problems, reductions, and visualizations. The frontend is integrally linked to the Redux REST API and depends on the backend being installed and running.
Key Features:
- Interactive problem visualization using React and D3.js
- Real-time problem reduction visualization
- Solution and certificate verification interface
- Gadget highlighting for reduction mappings
- SVG-based rendering for mathematical structures
Before you begin, ensure you have the following installed:
- Node.js (with npm)
- Redux Backend (must be running)
git clone https://github.com/ReduxISU/Redux_GUI.git
cd Redux_GUInpm installThe Redux GUI requires the Redux API to be running. If you need to work on both the frontend and backend simultaneously:
- Clone the Redux API repository
- Launch the Redux API using
dotnet run - The API will be available at
http://127.0.0.1:27000/
npm run devThe Redux frontend is currently functionally complete. The majority of future additions will be visualizations.
Visualization Files:
components/Visualization/svgs/Visualizations.js- Maps problem names to visualization componentscomponents/Visualization/svgs/ReducedVisualizations.js- Maps reduction names to visualization componentscomponents/Visualization/svgs/- Contains all SVG-generating React components
Page Components:
components/pageblocks/- Major components that make up the main interfacepages/index.js- Main page that implements all components
Widgets:
components/widgets/- Reusable React components used throughout the application
When adding new features:
- New major components → Add to
components/pageblocks/folder, then implement inpages/index.js - New visualizations → Add to
components/Visualization/svgs/folder - New widgets → Add to
components/widgets/folder
All visualizations are built on the frontend. Follow these steps to add a new visualization:
Add your visualization to the components/Visualization/svgs/ folder.
Requirements:
- Must be a React component function
- Must return an SVG element
- Should take only a URL for an API call as a parameter
Example structure:
Current best practice is that these functions take only a URL for an API call, which returns information specific to the visualization. Because each visualization is specialized, the way the SVG is generated is up to the developer working on the problem, although they should follow the style of current visualizations and reuse methods for similar visualizations wherever possible.
- The API URL should return information specific to your visualization
- Follow the style of existing visualizations
- Reuse methods for similar visualizations wherever possible
- Ensure the visualization works for both solved and unsolved problem instances
Once your visualization is complete, add it to the appropriate map:
For general problem visualizations:
- Open
components/Visualization/svgs/Visualizations.js - Add your component to the map with the problem name as the key
For reduction visualizations:
- Open
components/Visualization/svgs/ReducedVisualizations.js - Add your component to the map with the reduction name as the key
Example:
const visualizationMap = {
"My Problem Name": (props) => <MyProblemVisualization {...props} />,
// ... other visualizations
};New major page components should be:
- Created in the
components/pageblocks/folder - Implemented in the
pages/index.jsfile
General-purpose React components should be added to the components/widgets/ folder.
To deploy the application in production mode:
npm install
npm run build
npm startThis will:
- Install all dependencies
- Build a production-optimized version
- Start a production server on port 3000
Alternatively, deploy using Docker:
npm run build
docker build -t reduxgui .
docker run -it --rm -p 3000:3000 --name reduxgui reduxguiNote: The Docker server uses production binaries, so warnings will be different from the development environment.
- Branch name:
ReduxAPI_GUI - Additions should only be made through merging from the
developbranch - Requires code review before merging
- Branch name:
develop - Most code additions are made directly here
- Relatively few merge conflicts
- Make changes on the
developbranch (or create a feature branch fromdevelop) - Create a pull request to merge into
develop - Assign a reviewer for code review
- Reviewer completes the pull request after approval
- Periodically merge
developintoReduxAPI_GUIfor production deployment
** Important:** The person who completes the code review is responsible for completing the pull request.
All added visualizations must fulfill the following requirements:
React Component Structure
- Visualization function is a React component that returns an SVG
- Component takes an API call URL as a parameter
API Integration
- API endpoint specific to the visualization is functional
- Both solved and unsolved variations have working endpoints
- Endpoints are documented correctly in the backend
Feature Completeness
- Solution highlighting is functional for general problem visualization
- Gadget highlighting is functional for reduction visualizations
- Works for all relevant reduction types
Code Integration
- React component is added to the correct visualization map
- Component follows the style of existing visualizations
- Reuses methods from similar visualizations where applicable
This project is developed by students and faculty at Idaho State University's Computer Science Department.
For a complete list of contributors, visit our About Us page.
- Redux Backend Repository
- Redux Backend API Documentation
- Wikipedia: What is NP-Complete?
- Karp's 21 NP-Complete Problems
- Framework: Next.js (React)
- Visualization: D3.js, SVG
- Styling: CSS/Styled Components
- API Communication: REST API calls to Redux Backend
- Backend API: Redux
- Quantum Solver: quantumsolver
- Issues: Use GitHub Issues for bug reports and feature requests
- Discord: Join our community
- Weekly Meetings: Thursdays at 11:20 AM MT via Zoom
This project is developed at Idaho State University's Computer Science Department.


