|
1 |
| - |
| 1 | +<h1 align="center"> |
| 2 | + <img src="extension/src/assets/icons/enabled-128.png" alt="Logo"> |
| 3 | + <br> |
| 4 | + StateViz |
| 5 | +</h1> |
| 6 | + |
| 7 | +<h4 align="center"> |
| 8 | + Analyze application state across multiple frontend libraries |
| 9 | +</h4> |
| 10 | + |
| 11 | +<p align="center"> |
| 12 | + <img src="doc/badges/badge.svg" alt="Tests status"> |
| 13 | +</p> |
| 14 | + |
| 15 | + |
| 16 | +- [Why?](#why) |
| 17 | +- [Features](#features) |
| 18 | + - [Supported libraries](#supported-libraries) |
| 19 | +- [Installation](#installation) |
| 20 | + - [From Source](#from-source) |
| 21 | +- [Tests](#tests) |
| 22 | + - [Unit and Integration Tests](#unit-and-integration-tests) |
| 23 | + - [Example Applications](#example-applications) |
| 24 | +- [Future Work](#future-work) |
| 25 | +- [License](#license) |
| 26 | +- [Attributions](#attributions) |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +## Why? |
| 31 | +The motivation behind creating this extension stemmed from my experience using various frontend frameworks. I found it frustrating to juggle multiple extensions, each in a separate tab, with its own layout and UI. This was especially true for a polyglot project (React/Svelte) I was working on. |
| 32 | + |
| 33 | +I wanted a single extension that could provide a unified view of the application state, regardless of the frontend library used. Something that could be easily extended to support new libraries and provide a consistent experience across all of them. |
| 34 | + |
| 35 | +So, I decided to develop a proof-of-concept. As things progressed, it became the basis for my [CS Master's thesis](#thesis) and StateViz was born. |
| 36 | + |
| 37 | +## Features |
| 38 | +- **Multi-Library Support**: Inspect web applications built with different libraries, including those using multiple libraries simultaneously. |
| 39 | +- **App Structure Visualization**: Visualize the structure of your application, including components, DOM elements, and library-specific elements like Svelte blocks. |
| 40 | +- **Real-Time Data Inspection**: Inspect component data in real-time, including props, state, and library-specific details like contexts and hooks for React. |
| 41 | +- **Element Filters**: Use filters to display only the elements you are interested in. |
| 42 | +- **DOM Element Highlighting**: Efficiently highlight DOM elements corresponding to selected tree nodes. |
| 43 | +- **Light and Dark Mode**: Choose between light and dark themes for a comfortable user experience in any lighting condition. |
| 44 | + |
| 45 | +### Supported libraries |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +... and more to come! |
| 50 | + |
| 51 | +## Installation |
| 52 | + |
| 53 | +<!-- ### Chrome Web Store |
| 54 | +The extension is available on the Chrome Web Store. You can install it from [here](https://chrome.google.com/webstore/detail/stateviz/). |
| 55 | +6. Open the developer tools in any tab that runs a supported frontend library application. |
| 56 | +7. Click on the StateViz tab in the developer tools to start using the extension. --> |
| 57 | + |
| 58 | +### From Source |
| 59 | +1. Clone the repository: |
| 60 | +```bash |
| 61 | +git clone https://github.com/steciuk/StateViz.git |
| 62 | +``` |
| 63 | +2. Move to the extension directory: |
| 64 | +```bash |
| 65 | +cd StateViz/extension |
| 66 | +``` |
| 67 | +3. Install dependencies: |
| 68 | +```bash |
| 69 | +npm install |
| 70 | +``` |
| 71 | +4. Build the extension: |
| 72 | +```bash |
| 73 | +npm run build |
| 74 | +``` |
| 75 | +5. Load the extension in Chrome. |
| 76 | + - Open Chrome and navigate to `chrome://extensions`. |
| 77 | + - Enable Developer mode. |
| 78 | + - Click on `Load unpacked` and select the `dist` directory inside the `extension` directory. |
| 79 | + |
| 80 | +6. Open the developer tools in any tab that runs a supported frontend library application. |
| 81 | +7. Click on the StateViz tab in the developer tools to start using the extension. |
| 82 | + |
| 83 | +## Tests |
| 84 | +### Unit and Integration Tests |
| 85 | +To run the tests, use the following command in the `extension` directory: |
| 86 | + |
| 87 | +```bash |
| 88 | +npm run test |
| 89 | +``` |
| 90 | +### Example Applications |
| 91 | +In `test-apps` directory, you will find a collection of example applications designed to help you test and explore the capabilities of the extension. |
| 92 | + |
| 93 | +To run any of the example applications, navigate to the desired directory and: |
| 94 | + |
| 95 | +1. Install dependencies: |
| 96 | +```bash |
| 97 | +npm install |
| 98 | +``` |
| 99 | +2. Start the development server: |
| 100 | +```bash |
| 101 | +npm run dev |
| 102 | +``` |
| 103 | +3. Open the application in your browser. |
| 104 | +4. Use the extension to inspect the application. |
| 105 | + |
| 106 | +<!-- ## Thesis |
| 107 | +The thesis document can be found [here](doc/thesis.pdf). --> |
| 108 | + |
| 109 | + |
| 110 | +## Future Work |
| 111 | +See the [issues tab](https://github.com/steciuk/StateViz/issues) for planned features and improvements. |
| 112 | + |
| 113 | +## License |
| 114 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 115 | + |
| 116 | +## Attributions |
| 117 | +Current extension logo made by [Tanvir Islam](https://thenounproject.com/creator/tanvirislam/). |
2 | 118 |
|
3 |
| -### Attributions |
4 |
| -Temporary extension logo made by [Tanvir Islam](https://thenounproject.com/creator/tanvirislam/) |
|
0 commit comments