This project is a single-page application (SPA) editor built using React, TypeScript, and Redux. The editor allows users to add predefined polygons to an empty editor area, manipulate/interact with existing shapes, and serialize the editor state to JSON. The UI consists of two parts: the editor area on the right and a toolbar on the left.
-
Link of repo:
https://github.com/rizwanahmed7/spa-editor.git
-
npm install
-
npm start
-
Open http://localhost:3000 in your browser to view the editor.
- The editor area is initially empty.
- Users can add predefined polygons using shape-adding tools,manipulate/interact with existing shapes.
- The toolbar is located on the left side of the UI and consists of six tool buttons.
- Clicking on a tool button activates a corresponding tool.
- Only one tool can be active at a time.
- Text labels are used instead of icons.
- Selection tool
- Move tool
- Closest points tool
- Add triangle tool
- Add square tool
- Add hexagon tool
- React
- TypeScript
- Redux
- I used Redux for global state management and Drag/Drop for shape manipulation.
- I divided the full problem into two parts: a toolbar and an editor.
- I liked dividing my problem into different parts.
- I enjoyed using Redux for my state management.
- I created custom shapes without using any libraries.
- I did not use any libraries for styling.
- React with typeScript
- ReduxToolkit