-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[blog] Add post about how MUI uses Toolpad #40172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
prakhargupta1
merged 41 commits into
mui:master
from
prakhargupta1:blog-how-mui-uses-toolpad
Mar 4, 2024
Merged
Changes from 11 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
2acd779
add
prakhargupta1 94dbc18
add
prakhargupta1 336b18f
lint
prakhargupta1 92cd7aa
edits
prakhargupta1 d1468e1
add-videos
prakhargupta1 9696044
add video
prakhargupta1 fb99668
space
prakhargupta1 b7c4300
Update docs/pages/blog/2023-toolpad-usage-in-mui.md
prakhargupta1 1b3f714
add soft line break
prakhargupta1 245aaca
Merge branch 'blog-how-mui-uses-toolpad' of https://github.com/prakha…
prakhargupta1 e8ba930
typo
prakhargupta1 bf96c2a
Apply suggestions from Sam's review
prakhargupta1 1c3f7b6
more edits
prakhargupta1 bf6e79e
replace What's next with Conclusion
prakhargupta1 6034222
add
prakhargupta1 b6fb13b
add
prakhargupta1 6de6b76
lint
prakhargupta1 5265d61
edits
prakhargupta1 13ceef2
add-videos
prakhargupta1 003715e
add video
prakhargupta1 e7324cd
space
prakhargupta1 2deec73
add soft line break
prakhargupta1 479cc16
Update docs/pages/blog/2023-toolpad-usage-in-mui.md
prakhargupta1 d51ef51
typo
prakhargupta1 be884c1
Apply suggestions from Sam's review
prakhargupta1 ac033b5
more edits
prakhargupta1 0d1e329
replace What's next with Conclusion
prakhargupta1 3fd34bf
polish
oliviertassinari d4bc1c6
Fix build
oliviertassinari 610f4f7
Sam's review
oliviertassinari 9035ba9
more sam's review
oliviertassinari b4a4fef
more polish
oliviertassinari 61dac54
more polish
oliviertassinari bd4faa2
prettier
oliviertassinari 5b33c8b
Merge branch 'blog-how-mui-uses-toolpad' of https://github.com/prakha…
prakhargupta1 41178e4
update the OG image card
danilo-leal 25522ee
Merge branch 'blog-how-mui-uses-toolpad' of https://github.com/prakha…
prakhargupta1 5f81c0c
change date to coming Monday
prakhargupta1 c7669c8
Merge branch 'heads/upstream/master' into pr/40172
Janpot 01bbaf6
Update toolpad-use-cases.js
Janpot 1460deb
Bharat's suggestions
prakhargupta1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import * as React from 'react'; | ||
| import TopLayoutBlog from 'docs/src/modules/components/TopLayoutBlog'; | ||
| import { docs } from './2023-toolpad-usage-in-mui.md?@mui/markdown'; | ||
|
|
||
| export default function Page() { | ||
| return <TopLayoutBlog docs={docs} />; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| --- | ||
| title: How does MUI use Toolpad? | ||
| description: Explore how we use Toolpad for production use cases at MUI. | ||
| date: 2024-01-15T00:00:00.000Z | ||
| authors: ['prakhargupta'] | ||
| card: true | ||
| tags: ['Product', 'News'] | ||
| --- | ||
|
|
||
| Toolpad helps full-stack engineers build internal tools quickly. | ||
| Internal tools encompass data-intensive CRUD interfaces, analytics dashboards, or custom apps that make teams productive. | ||
| Toolpad offers a low-code, GUI-based, code-friendly way of building apps and comes as a node package that can be imported in an existing codebase. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| We have been dogfooding Toolpad at MUI to build our internal tools. | ||
| It has proven beneficial as we now have well-organized, centrally located KPI dashboards and operations apps. In this blog post, we'll discuss four such apps. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <a href="https://tools-public.mui.com/prod/pages/OverviewPage"> | ||
| <img alt="MUI public app for tracking KPIs" src="/static/blog/2023-toolpad-usage-in-mui/tools-public.png" loading="lazy" width="2400" height="1394" /> | ||
| </a> | ||
|
|
||
| ## Problems tackled through Toolpad | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Our internal tooling is easy to use and less error prone now; earlier, some apps were a set of instructions written on a Google doc/Notion. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 2. A user had to log into multiple services to update/manage their day-to-day chores. Now, one interface does it all. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 3. We utilized Pipedream, Metabase, Google Sheets, and other tools to streamline our day-to-day operations. | ||
| It meant we had distributed code at multiple places accessible to only a few. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Now, we have everything on GitHub, and collaboration is easier. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Let's delve into four scenarios that Toolpad has successfully addressed: | ||
|
|
||
| ## 1. Support key validator | ||
|
|
||
| We offer a priority support service to our MUI X premium customers, for their queries they get an expedited response under an SLA of 24 hours. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| They share their issue through a **Priority Support: SLA** template on our repositories. | ||
| Upon creating an issue, they are redirected to validate the key, and upon validation, the SLA count starts and the correct labels get assigned to the issue. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <a href="https://tools-public.mui.com/prod/pages/validateSupport"> | ||
| <img alt="Premium key validator support app" src="/static/blog/2023-toolpad-usage-in-mui/validate-support.png" loading="lazy" width="2400" height="1394" /> | ||
| </a> | ||
|
|
||
| [Source code](https://github.com/mui/mui-public/blob/master/tools-public/toolpad/resources/updateMuiPaidSupport.ts) | ||
|
|
||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| The [updateMuiPaidSupport.ts](https://github.com/mui/mui-public/blob/master/tools-public/toolpad/resources/updateMuiPaidSupport.ts) file hosts all functions that are called from Toolpad. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| It uses the [custom function](https://mui.com/toolpad/concepts/custom-functions/) feature and combines GitHub actions, Google Sheets, and Octokit to read and verify user-provided information. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| The fetched data is then bound to the UI components. | ||
| It took one developer a few hours to build the app. | ||
oliviertassinari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| It uses [page parameters](https://mui.com/toolpad/concepts/page-properties/#page-parameters), [secrets handling](https://mui.com/toolpad/concepts/custom-functions/#secrets-handling), [shell removal](https://mui.com/toolpad/concepts/page-properties/#display-mode), and custom styling as additional features of Toolpad. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## 2. Customer support KPI tracker | ||
|
|
||
| The read-only page below uses [HTTP requests](https://mui.com/toolpad/concepts/http-requests/) data source feature of Toolpad. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Through the query builder UI we fetch the latest 100 support requests from Zendesk to calculate the average time we took to revert to the customers. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| It uses a [custom component](https://mui.com/toolpad/concepts/custom-components/) which we named as 'health badge'. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Based on the metric value, the component shows three color-coded states: Problem (red), Warning (yellow), and OK (green). | ||
| Other KPI pages also use this health badge and pre-built charts component to compare stats, see trends, and spot anomalies. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <a href="https://tools-public.mui.com/prod/pages/zendeskFirstReply"> | ||
| <img alt="Zendesk first reply" src="/static/blog/2023-toolpad-usage-in-mui/zendesk.png" loading="lazy" width="2400" height="1394" /> | ||
| </a> | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The above app in dev mode below: | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <video controls width="100%" height="auto" style="contain" alt="zendesk first reply in devmode"> | ||
| <source src="/static/blog/2023-toolpad-usage-in-mui/zendesk-first-reply-dev.mp4" type="video/mp4"> | ||
| Your browser does not support the video tag. | ||
| </video> | ||
|
|
||
| We opted for Toolpad since Metabase doesn't support importing data from REST APIs. | ||
| It's possible in Google Sheets but it requires writing a lot of JS code and since we wanted to embed it in a [Notion page](https://www.notion.so/mui-org/KPIs-1ce9658b85ce4628a2a2ed2ae74ff69c#3974cb6ed12b4c5a9013bac63113e3bc), Toolpad was the ideal choice. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Toolpad handles state management, routing and simplifies query building, data binding, and removes the need to write glue code. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| You can explore the above two apps in dev mode in your local by running the underlying [node app](https://github.com/mui/mui-public/tree/master/tools-public). The next two apps are private to MUI. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## 3. Manage overdue invoices | ||
|
|
||
| We have an internal operations process to remind our customers who have invoices overdue. | ||
| Based on the due date, a reminder email is required to be sent. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| From the Toolpad app, the operations team sees a table for all customers who need to be contacted. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| They select one, email them from Zendesk, and update the status = CONTACTED, which is then written back to the database. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| This is a private app for internal use and can't be shared but the following video gives a quick demo: | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <video controls width="100%" height="auto" style="contain" alt="overdue invoice page"> | ||
| <source src="/static/blog/2023-toolpad-usage-in-mui/overdue-invoice.mp4" type="video/mp4"> | ||
| Your browser does not support the video tag. | ||
| </video> | ||
|
|
||
| Earlier, we used a combination of Metabase and Google Sheets to fetch and edit records but it was cumbersome to operate and sometimes caused data inconsistency issues. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Now through Toolpad we managed to bring it all under one roof, easing out our operations team's routine work, leading to increased productivity. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## 4. Contributor payout | ||
|
|
||
| We have a script to fetch monthly payout data for the contributors of MUI Store. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Our operations team is responsible for the task but they can't run the script and had to ask engineers to run it for them. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| The solution was to import the script into Toolpad and create a UI for it. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| The below video shows the app, on choosing the dates, the script runs and the output is a Slack copy that our team shares with our contributors: | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <video controls width="100%" height="auto" style="contain" alt="contributor payout page"> | ||
| <source src="/static/blog/2023-toolpad-usage-in-mui/contributor-payout.mp4" type="video/mp4"> | ||
| Your browser does not support the video tag. | ||
| </video> | ||
|
|
||
| ## What's next? | ||
oliviertassinari marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| We are fixated on optimizing for the biggest pains that developers face when building admin apps. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| We have recently revamped our UX and added [data provider](https://mui.com/toolpad/concepts/data-providers/) feature to add server-side capabilities to the datagrid. | ||
prakhargupta1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| We are currently working on adding authentication and authorization in Toolpad. | ||
| You can check out more [examples](https://mui.com/toolpad/examples/) and visit our [GitHub repo](https://github.com/mui/mui-toolpad/) to evaluate the product. | ||
| In case you need any further information, feel free to reach out to the team at [email protected]. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.68 MB
docs/public/static/blog/2023-toolpad-usage-in-mui/contributor-payout.mp4
Binary file not shown.
Binary file added
BIN
+8.72 MB
docs/public/static/blog/2023-toolpad-usage-in-mui/overdue-invoice.mp4
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+122 KB
docs/public/static/blog/2023-toolpad-usage-in-mui/validate-support.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.4 MB
docs/public/static/blog/2023-toolpad-usage-in-mui/zendesk-first-reply-dev.mp4
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.