Podcast Lookup

Code with CodingCat.dev: Refine the open-source Retool for Enterprise

CodingCat.dev Podcast

  • June 30, 2024
  • 1 h 31 min
  • Season 2, episode 4
Episode page
About this episodehttps://codingcat.dev/podcast/cwcc-1_refine

Transcript

From the publisher

This transcript comes from the podcast’s own feed, shown as the publisher wrote it.

Code with CodingCat.dev: Refine the open-source Retool for Enterprise

00:00—
  1. I live inside my own world of make believe kids screaming in the craters profanities. I see God through ice covered in ink and then cross. Brought to you by refined dot DEV Open source retool for Enterprise. I I think that was kind of funny. It kind of somewhat transitioned how I wanted to.

  2. So let me let me bring up the banner. Welcome back, perfect peeps to code with coding cat. First of all, So today we're going to talk about refine. It's an open source tool for retool. I think my special guest, do you want to introduce yourself and and give us a like a, a 5 minute on refine?

  3. Yeah, hello, I'm Botwan. Technically, that's Refine. Today I'm going to introduce Refine framework and we are going to build a simple application to show about Refine. But first of all, what's Refine? Refine is an open source framework for building data intensive applications, mostly like internal applications, dashboards, admin panels. It's React based framework and like at the moment we are quite popular in at least React open source, open source. Then we have like 20 K GitHub stars, 15K developers, also more than 10,000 deployed applications and already on production.

  4. How we started we find is it's been 2 years since we are developing refined full time. We are backed by European VCs initially and last year we are accepted to Y Combinator summer batch. So. I have to ask more about your Y Combinator experience. That's pretty awesome. Yeah. So yeah, it was like last, last investment we got and then like we have some runway. How it started is actually we first version of refine started from our own needs.

  5. So we didn't want to like build the tool to like, I don't know, be famous or get attraction. But initially we were constantly building enterprise applications for big companies. So most of the projects of course need some kind of internal web app and dashboard and admin panel. So we we were constantly building this kind of application. So we thought like there should be easier and better way to do that because existing solutions, low codes, no code and stuff like that.

  6. They're nice and all in the beginning. But if you have more complex requirements and so you they cannot like really help you in the long run. So initially they are nice first a week, but as complexity of the application grows, they cause more trouble than it's worth. So first version of Refine was internal library.

  7. By the way, as a company we already had this habit of publishing open source packages before You find we have more than 15 packages with more than 1,000,000 downloads on PM and PM already. So this was started. OK, let's make it good enough. So share with community. First version of Refine was kind of good but not quite there.

  8. So it was like first iteration. So second iteration we wanted to address issues in the version one. For example, this is where we decided to make refined headless because core of the refine is React based but agnostic. So you can mix and match different libraries for different applications. Like you can use Material UI, you can use Ant design, Tailwind, whatever you want.

  9. Initially it wasn't like that. So we once we decided to make refined headless. So then we follow this mix and match approach that you are not locked into certain library or vendor or anything. So you can just still deliver things fastly but without compromising quality and flexibility. This was our initial position to with that because low code, first of all, there is no like git, git up version control. You cannot like someone breaks something and you cannot easily know who did it.

  10. And there is no like normal pipeline. But why low code is good for some use cases because you can quickly build something. So our target is to OK, let's still quickly build something without compromising flexible. So we still own the code, we can do whatever we want, but we still deliver it fast. So because enterprise requirements are high, like you need to add authentication, not only also authorization, some users cannot edit, some users cannot delay it and things like that, then you need to in the UI. Developers usually don't like that actually. But one maybe a good thing about local that if you are not a technical person, you can still do something, but up to some point, again, for example, if you do something wrong, obviously some technical people need to spend more time fixing that.

  11. Is a problem. So in the long run we like low code, no code. We have different approach, but benefits are are the same. And we also wanted to continue these benefits in the long run, not just first MVP, first version or something like that. So yeah, basically story of refine, it's that. Yeah, I love it.

  12. I wanted to show off this too, just kind of in my mind, like pictures always help everything. And this, this really shows where kind of refine comes into play between the authentication and your back end and front end platforms as well. So it's pretty cool. I do want to demo. Well, let me show you a couple different kind of things that refine can do out here. So different dashboards.

  13. By the way, I love whoever did the the front end on this site. It's it's super dope. So here is kind of some of the breakdowns. So it gets into like how you can actually specify the menu items and of course it's out in the the react side of things here and just use list and how you can pull in data. So it's really cool to be able to use this low code, no code approach to things and like be able to have all of that data saved just as you were saying.

  14. The cool part down here, if you look at all of these different connectivity points between front end UIS and and what you can actually abstract this into with next GS and remix. I mean, it's just endless. So it's really, really cool to be able to pull all of these different ones in.

  15. You also are kind enough to set up a little demo site for us on what we'll be building today. So today this is, this is kind of, it's obviously somewhat generic, but it still gives us our filters and things like that and allows us to build this in 60 minutes while still being able to learn more about refine and things like that. And we'll also include authentication as we kind of come into it here as well.

  16. So that's what we're going to build as we go through it. I am kind of curious how you got started with refine though. Do you have just a couple minutes before we shift gears? I'm I'm curious about your journey and what it takes to be a refined dev. Yeah, it's, at least for me, pretty exciting because I, I will.

  17. I have some open source packages, unpublished repositories and all like I, I already allowed to do some open source and on top of that, you do it with your team and sharing the similar ambitions. And it's really exciting actually for me. But of course there is like, not only we are not only coding, but there is also community part of that like giving support to people as much as possible.

  18. But of course, we cannot like provide support for 1000 users 1 by 1. So we try to automate most of the things and actually we try to make it so clear and obvious in our documentation, in our examples, wherever we we want people to not need to ask questions. So like, because if people asking the same question over and over again, this means like we couldn't explain the concept or something nicely. So that's actually why we recently created guides in our documentation, like we have API reference if you want to get like just basically interfaces what they do explain. But in our guides, we actually explain the concepts behind decisions, how we can mix and match. So once you go through the guides, yeah, general concepts for example, goes through all of them explain. So idea behind this guides is that once you read through them, you will be able to answer your own questions by reading them because you should have context and like generally architecture. So it should be clear.

  19. Hopefully actually after this, like we kind of got get slightly less questions about we have Discord community, of course, and we also try to provide support there to people. So like it's generally exciting. And also, it's not like working with private repository that no one will ever see.

  20. And we can change the thing the way you want and like, because you cannot randomly decide to delete something and I want to rename this, it's a bad naming. So let's get rid of that. You cannot do that because like maybe 400,000 downloads. So you don't want to break people thought obviously.

  21. So you, you need to do like more minor improvements continually and without compromising, of course, features and whilst still improving. So like, long, Long story short is like really good experience for me actually. So yeah. I love it. That's, that's really cool. OK. We're going to take a quick ad breaks to introduce folks a little bit more about Refine and then when we come back, we'll be building our application. Refine is an open source React framework for enterprise. It's a headless solution for all types of CRUD heavy applications such as admin panels, dashboards, and internal tools. Low code tools shine initially, but they lack the required flexibility for complex use cases. Teams can choose to start from scratch for greater control, but this often results in project delays and technical debt. Refine is the sweet spot between the two alternatives. With Refine, teams can rapidly build robust applications without compromising flexibility. Sweet.

  22. Thank you so much, Swan. All right, so that's everything we know about Refine. And now we're going to start building the application that we showed off. And just if you're just now joining, I just want to show that one more time. So here is the app that we'll be building with Refine. So you're going to walk me through, I hope and we'll we'll get started.

  23. I know you kind of gave me a couple, a couple cheat commands here. So I'm going to pop open VS Code real quick and then. So just guide me along at this point and I'll copy and paste if you if you want anything of those commands added to. So let's start by initializing the application. So I want to clarify that this application we're going to build like we have many examples like that, but for demonstration purposes, we are going to build it from scratch with some help from our help from our documentation and like our CLI which saves time.

  24. But we will start from scratch to better explain the concepts behind that. Yeah, first thing we're going to do is we already showed the application. So let's start creating a new application with NPM create refine app. And we, we are going to use starter with template. So this template just what you get if you create a new application with with but plus edit, refine core package. I love that.

  25. That's so cool. I don't know why but I always geek out over like CLI, like artistry. It's amazing to me. Yeah, this is kind of old school. And so we we want to believe that and like combine it with this deal with it meme. That's really. Cool, I'll do code and then dot dash. Nope, sorry slash dot slash.

  26. And then Dash R does it recursively. So there we go. Awesome. So it's got our nice little V project going on here. I see AV config our source files, it's got app dot TSX. It's pretty much empty, so let's just start by starting the application. Let's go step by step. MPM round dev you can say cool, so now we should have a server running already. Of course, opened it in the wrong window. One second, there we go.

  27. Yeah, now we have like nice welcome page without anything actually. So we are going to start building in this application. We are going to use RAP router for routing because we will have multiple pages UI library we are going to use and design. It's one of our supported UI libraries. So I want to explain this concept with supported. Sometimes people get impression, don't you support Tailwind? Don't you support that?

  28. Actually these libraries just are breach connection between and design and our refined core. So they are kind of bindings. But in theory you can do the same thing with just using core. But this for example and design integration just saves us some time, which we will show. So let's start with doing our first integration routing. You can run MPM, run, refine, add integration. So let's go with React Router.

  29. OK. So we can check the DIF to give idea like we could actually build it ourselves, just this is just to save time and. Yeah, so it looks like it just added React Router 6 and React Dom Router Dom. Yeah, this is like we have router provider because we find as I mentioned before refine core is headless.

  30. So for next chase we have refined them. Next chase router. For remix we have Remix router and this is Rev router. What it does actually, it helps us understand resources, routes and their relationships with the data, underlying data and pages and many other features. We are going to continue with that in a moment.

  31. So basically what it does, what it did is just rip browser router, refine, we pass router provider and we still have index as index route as welcome page. One thing I wanted you to do, I will explain it later, maybe line 12, we can move it into section 9 section. OK, OK, now we can see the application. Nothing should change.

  32. We will see that. But for example, we edit catch all route. For example, if you go to random route, you should see some error page. And this is our error page from core package. So let's continue with Ant design integration. Awesome. OK, you can run the same comment and this time let's yeah go with Ant design.

  33. Nice, I probably should have committed. Yeah. So if we check app TS6 again, so one thing's different. If you go back to browser for example, now we should have a better error page. It's following Ant design, using Ant design components and everything. As I mentioned, you can build it yourself, but just save time. And on the left side you see a cider with nothing in it for now and with default title and all.

  34. And we are going to continue building that one. So yeah, if you go back to code again, of course it's well complete. Let's comment out notification provider, it's line 23 at the bottom. Yeah, we will enable it later, but I want to show why, why it's useful in the future. So next thing we're going to do, let me check the. And I think you had told me like a lot of this is in a tutorial in Quick Start.

  35. Not necessarily exactly, but like. You can find a lot of this information in here as well. Yeah, Yeah, exactly. Cool. So we, we actually, my colleague Ali, he built a great tutorial and like not only explaining concepts really good, but it's also like there are a lot of great engineering stuff going on there because there are questions and if they cannot answer, they there's a button to fix the code.

  36. And then code is actually real time code reloads the page. And like if you do something, it's not just mock up that stays there. So basically you can write whole application there. So. We do have one quick question now while we're here, what about next JS is app directory router support?

  37. Do you guys have that already? Yeah, actually we recently released this app router support. There there is an example in examples directory with next JS project is already using app router. But at the moment we don't have like for example, at some parts you need to do use client because we are trying to catch up with community here. If you go to SRC folder, you're going to see app routes there. Yeah.

  38. So it's it's using layout TS6 and of course there are some. I'll put that out in the comments so you guys can get through it too. There you go. Cool. All right. So sorry, I didn't mean to completely cut it off where we were. So we're just kind of we added this, commented out the notification.

  39. What's the next step? Next step is we need some data so we can show something. I send you link here api.net JS query dot refined their graph QL. So let's go there. There's a nice graph QL playground. There we go. So if you go click docs on the right side, very right side. So we it's typical graphical queries mutations, we are going to connect it through data provider.

  40. So data provider concept in refine is it's a connection between your data source and refine. So instead of writing in line, I don't know parameters and endpoints and stuff like that, there is a centralized concept object called data provider. You can have multiple data providers as well. For example, for blog posts you want to use graphical, for categories you want to use REST or whatever. So we will use this one for now.

  41. For that, we already have documentation here. Let's go there and follow the steps. We are going to install a couple of. This one. I I send link nest JS query. There we go. Yes, this one, yeah. So first let's start with installing our data provider, refining Nest JS query and Graph QL Tech package.

  42. Graph QL tech package is used to generate Graph QL queries in a type safe manner. Yeah, that's great. And anyone watching, if you can't see any of the code, if it's not big enough, just let me know and I can increase some things even though it's starting to hurt my eyes already. OK, continue with our imports. Let's import data provider from Netschase query. Actually it's also in the documentation. If you Scroll down a bit, you're going to see yes, a bit up, up. This like second line imports data provider graphical client let.

  43. Me, get rid of this for a second. We'll do it there and then. This is within Refine, we put this. Data provider and there is a line in between them where we initialize client. So this client is you. You are responsible for passing client to us. It's it's a decision to make it flexible because if you use any internal client to connect, you cannot add your custom headers or authentication or anything.

  44. Here, I just wanted to hopefully put that in there. There we go. OK, so save that and put in the connection. All right. Let's let's check if ours app is still alive. All is good. Yeah, still pretty much nothing. So let's continue with adding our route. Finally, let's create in maybe pages folder blog posts and.

  45. Sorry, so like a new. Yeah, you can create a folder like Pages. It's just to follow like you can put it anywhere. But yeah, blog dash posts, TSX, it's a folder. We are going to add this TS6 inside there you can just add blog post List component also doesn't matter. Yeah, let's add list TS6 file

  46. and then we can initialize a typical React component just to say hello. This is list just to make sure we export construction. We used to have these. It's been a minute, Sir. Maybe it's just OK, we'll just do this. Actually, I could probably copy an example. Maybe this one we have some queries but not I can give you that maybe.

  47. We can write it out too. So just export list. Do you something like that? Equals something like this. Yeah, just just return a deal, say hello. At the moment we are going to put something in there, yeah. So since we are using rear router, let's add a new route after line 37. Yeah, let's remove in.

  48. OK, we can keep it. Also we need to pass path tweet. I can give you like some it. Is yeah, OK here I'll just I'll put it below here. Maybe a list from Is there shortcuts or no? I think you can do what is FTS 6. It should import it automatically. Yeah, yeah, yeah. Blog posts list yes, but it's not default export I see.

  49. Yep, you need to restructure it. Yeah. And if you do comment space, it should auto complete whatever you export there. There we go, ish. Maybe I need to change this to? Yeah, some capital. Behave a little bit. And it shouldn't be indexed. Let's give it a path like blog posts for example, with a slash in the beginning, not in the end.

  50. Blog test, dash posts. All right, I think. I'm not exporting the correct type, but I think maybe we'll be OK. What does it say?

  51. Here I'm I'm going to actually copy your example so I do this correctly. Yeah, so do change this round.

  52. Not for now, just so we're all following along.

  53. Sorry about that. I didn't see that you had pasted this. OK, now we're we're probably in a better spot. Yeah, yeah. Great. So if you navigate to Dash blog posts, so we we have a page, great. It's a step in the right direction. We're getting there, yeah. We're getting there, so let's continue with creating like in a typical Ant design application, obviously you need to create some table.

  54. For example, let's import table from Ant D is that. Is that within the blog lists? Yeah, yeah, at the top of this file, something like this. Oh, I like, I like cheating. This is good. My editor VS Code actually auto completes all the time. I just write table and. Oh. That's not comment dot and it just. Imports, that's one nice thing.

  55. Like when you're kind of away from the I love Tailwind, I'll say that first of all. But like when you have a nice UI collection or whatever you want to call it and the tooling that surrounds it as well, that's really cool. OK, so we're going to return table. Yeah. And let's have yeah for that.

  56. It should be sufficient. Just let's check. So we have table with no data. So we need to populate some data into this table always. So, so far we already have data provider, so we can connect to our data. But what are we going to do? So refine has hooks based architecture. So for example, we are going to get a list of blog posts. So we have who called use list.

  57. So we are going to use that import use list with capital L

  58. Yeah, yeah, I want to show you that. So one thing I want to like stop for a moment and explain that refind their core has use list and you can use it here actually no worries. But two, so we have table component here from Ant design. So actually make it work easier with Ant design. We have use table hook imported from refined dev and the package let's use that.

  59. The difference is that it takes care of making getting data from refined core and making it compatible with Ant design table. So. Yeah, the bottom line is that use table, let's say from and the I I sent you import something like that. Oops. Oh, sorry. Gotcha. Yeah, we can remove use list now. It's it's not needed.

  60. And so that so use table is like you said wrapping that kind of use list in ants. Yeah, like connects to our data, fetches data that makes it available to Ant Design tables and makes it comfortable in a way that Ant Design can render this data correctly. So let's use that hook. You can start with really simple, let's say construction construction and let's just structure it with.

  61. Yeah, it's table props. We are going to fetch table props from there. Yes, use table. So first thing we need to do is refine his like thing called resource. Resource is basically entity that connects different pieces of providers and application together. So in here we are going to use resource to connect to our correct for example API endpoint. Let's pass to use table hook.

  62. Let's pass with. Like applicant. Resource yeah, resource blog dash posts. For now, let's do that. So you can test string here. Resource the string blog dash posts. Just blog dash posts like. That I get close. Like this posts? Gotcha, Sir. Yeah, it's a string and perfect. Yeah. So let's continue with our graphical query.

  63. If you navigate back to documentation, we already have the query there, so we don't need to write ourselves at the top. Yeah, blog post. We can copy the first query and it's import and like. Obviously we can put it anywhere, but as a best practice, we choose to put it in a separate file called queries TS. So let's virtualize a new file called queries TS. Here we have ID, title, let's add status, yeah, after and let's fetch category ID as well.

  64. In this example in the list and also content, we don't need for list because we are not going to show content but we can add category ID for example. Yes we have created that ID, title, status, category. OK, great. So this is telling. I want to use this graphical query to connect. So let's test it to our hook.

  65. So you can use this syntax as a second parameter of the resource. Let's put a comma and there's a meta parameter and meta parameter has inside it. There is another prop called GQL query but it's inside meta starting. Yes, great. So it's also completed already. So I think you can say posts list. Yeah it's already common.

  66. Dot should auto import that. Sweet. Yeah, yeah, that's all. And then table props, are we destructuring those on the table? Exactly. Exactly. Yeah, cool. Makes sense? With three dots in the beginning, yeah. Sorry. So if you go back to our application we have some data. As you can see we already got pagination and everything. And if you want to check network tab it's already makes request and all.

  67. But obviously we don't show anything yet like the table. So from here we can start adding. Let me give you like example like this one. We need to add table dot column data, index ID and so on. So we show something. So we we need to add children to. Yeah, yeah. Is this? Oh, it's directly to.

  68. Yeah, it's self closing. Yeah, self closing. OK. But you of course you need to close table as well. I think why I think this is off for some reason. There we go. Oh I I forgot to copy this another. Yeah, no worries. It's it's all good. So we have ID. What else do we want in here?

  69. Let's do the same with title for example. Let me send you that as well to save some time. This time I copy pasted it of course. It's all good like that. So I notice this data index that is the the data that's coming in. That's the field from the graph QL. From response and title is what users see on the and.

  70. So like I can just call this Alex even and exactly. Cool. So let's do the same for status as well. So it's here, it's kind of like boring parts, something like. So we, if you go back, we will see status as well, of course and all. But let's add something slightly different. So this time we're going to add category.

  71. But this time category is not main field in our response. So it's like another entity. For this we have slightly different sign text, but again, it's not about refine, it's about Ant design. So we have this one. Oh, gotcha. OK, so it's an array coming in. Yeah, like for this entity go to category and inside it show me title because it's human readable.

  72. You don't want to show ID, it's not understandable. So if if you wanted ID as well, would you put another one of these in here and like put ID next to it? Yeah, exactly. Let's try that for example, yeah, yeah. So we have this one. Let's put created that finally for that, without going too much into details, if you edit, yeah, let's check that.

  73. So it's. It's not really human readable again like it's date what with ESO format which AP is can understand, but we can make it more readable for users for that. Actually you can import date field component from, refined the and the package again. Again, of course you can do the same thing yourself, but we just add this to make it easier for people.

  74. And finally, you can add render prop to render custom column.

  75. Yeah, it's prop of. Yeah, that should work.

  76. I think I missed something again. It's all good. I think it's just the. Object created, let me send you it again AM. I missing an extra 1. This one OK, this should work hopefully. And of course we need to enclose the component column also, so just another.

  77. So yeah, it's it's going to look slightly better. So you're you're essentially passing a a function and passing the value in for created at and you're passing that value over to the date field and it's going to format it correctly. Yeah. Cool. So I like it. I think we can move it a bit further with format LLL three capital L I think it's even more human readable to date field component.

  78. Sorry. Yeah. Oh yes, that's very. Nice. It's better. Do you does lol do local time zone by chance? Sorry, local time zone. Yeah. So I would see it in Eastern and you would see it. I don't even know what time are you. 6 hours ahead I think. Yeah, I'm GMGM t + 3, 99 hours in between. So of course our API returns UTC time zone, so we can you can use this time zone to format yourself like with anything. So yeah, I think this should be returning UTC, but depends on and design.

  79. With maybe some day JS some library you can convert it to users time zone. OK, cool. Great, now we have a list page that we can paginate and see some records and categories and stuff. So let's add some sorting here. Let's say I want to sort by ID. So how would you go about that if you weren't using refine?

  80. So you you are making request your API, you need to keep a state because if sorting parameter changes, you need to update the state and you need to update your API request, re fetch it, make sure it renders and like that's a lot of work with refine. It also takes some time. So let's go to blog posts list and first one to do ID let's add sorter prop which is boolean. You can just pass sorter after ID. Sorry, like right.

  81. Here Yeah yeah, sorter yeah, let's yeah, just like that. So by default it's true. If you do send nothing, it sends true. So let's go back to app and let's click it ID column so you can do the sorting already with just one probe and it takes care of refetching data and re rendering and updating records, making requests and all that again. Let's add filter by statuses for example. For that we are not going to use something special. It's also and designs default like. It's not about refine at this point because refine already provides compatible props to table. You just say let me check filters prop to status. Let me give you that.

  82. You need to pass this array so you can find it in Ant design docs. So let's explain a bit before we move on. This is again not about refines. Ant design text is what users see value it what goes to your API, right. So if you go back to our app again rights out of status. Now we have draft published rejected, you can click and now they are listed.

  83. Of course it sends. If you choose multiple it sends or query, for example, let's say just draft and publish. Yeah, I don't know if you don't want users to send multiple filters, you can say filter multiple falls, it's going to be converted into radio instead of check boxes. Again, this is without design, like you just do your stuff with Ant design, it's going to handle the rest.

  84. Yeah, yeah. So these examples were relatively simple. I'd love to. Even show off like the query when that goes across. So if I do published and hit OK in our network call like this is this is the craziness of this network call, right So? You can check payload for example. Yeah, that's what I was looking for.

  85. Thank you. So this is this is what actually comes out for that network call when you're coming across. And so if we hit the pagination, we get a new one, same deal, but it's paginating it with an offset. That's really cool. Yeah, like this was the whole point, The reason we started refined because this stuff are repetitive. What's important, you don't want to have an application without pagination, but you just will do same thing. Then you say I can share it here, but if you want to do slight change in a private app, so you need to like make 10 smart engineers discussed indefinitely, like for 10 hours straight to come up with the best solution. And like you don't want to do that. So everyone has different ideas and all like we kind of provide this unified interfaces contracts and as long as you satisfy refined core requirements, then it's all good.

  86. Because if you want to do anti integration, you know what anti wants, you know what refined wants. So we just get, I don't know, data from core make it understand and design. So this integration is just as I said like bindings basically some like in connections between this different libraries. And we'll probably get to this, but is there a a drag and drop equivalent of this coding side of this? Yeah, we, we have CRM example, you can check that. But again this drag and drop we don't have is empty, but we were using a library, I don't remember React what's what was that Jira open sourced Jira's package. So we have CRM example.

  87. Let me check that. Where is it? I think in the live demo there's one example that excuse me, example dot CRM dot refine dot dev. Yeah, yeah. Example dot CRM refine dot dev. So if we're so yeah, of course like we we have simple wall through here. So if you go to scrambled, you can already see on the left side.

  88. So it's the same thing. Of course, it's public API, so people add random stuff. So you can do drag and drop. And actually you can find the full source code here. Let me send the link so you can share with everyone. It's this one. So you can see the source code here. It's all open.

  89. You can see, review and just play with it. Nice. I'll share that out with everybody as well. We do have a a comment in the meantime person wanting to contribute to the project and any steps to easily like come in and start supporting that side of it. So it's not any different than any open source project. You go to issues, see if there's something you would like to work on.

  90. And in our documentation we have contributing guide. Of course, we have some commit convention and some checks that we already explained. Let me send the link. Those I think the contributing is right here.

  91. Yes, exactly. Yeah. So we already explained everything that make sure you follow commit Commission because like it's like some people send some comments and they spare their time. It's all nice. But CI fails. So you don't want to like not them. Like you need to update your commit structure, something like that. We fix for them, but it makes our lives easier if you follow the Commission but.

  92. For sure. Do you do you have any examples where you're building so like low code, no code. Do you have any examples where we're actually building out like a next JS application and where those buttons go? Or is it mainly the back end that we would put those? Yeah, actually I want to show you something.

  93. So let's go back to our risk page. Yep. Sorry, my fingers got off the keyboard. There we go. So if they're going to use next JS, literally nothing changes about this file. It's exact same API. Maybe you need to add use client directive at the very top of the page if it's client only or something.

  94. But that's the thing which we find. So let's say imaginary case that you're going to migrate to Nexjs, you're going to create Nexjs application instead of pages, blog posts and importing route path in there, you're going to create SRC app blog posts page. TS6 code is exactly the same, but in the of course layout TS6 instead of real router V6 router provider, you're going to import next chase router provider. So like using refine is no different other than some configuration on the shell app like entry points or something like that.

  95. You can use the same with Remix as well actually like it's no different. Like Refine code is the same as we mentioned, we provide like centralized contract and centralized API for different kind of libraries. But at the end of the day, at this point, other than it's really no one see that coming that server components stuff like it's everything like running S categories on reactivates. But again, like maybe you need to use client directive to the top of the page.

  96. We by the way, we try to support this server only components, client only components, hybrid components in our latest refined next Chase router release. So, but the thing with that is when you provide so many integrations and different libraries support for example, there is inconsistency between Ant design and Nextchase. So people starting project with refine using Nextchase and Ant design, then ask us, hey, Ant design in the, I don't know, like server size rendering doesn't work as expected, but it's we are basically just using Ant design. It's not about just refine, but we do our best to like provide support as well.

  97. But yeah, that's one, one thing we had to like explain over and over again that if you are using Ant design, if you are using next, yes, you need to check respective dogs because like refine just puts them together. So. But it doesn't mean we don't provide any support at all. Like we try to make it easier at FAQ questions, answers and things like that. So what from here?

  98. The next step for a person would be to like, hook up their back end. What, what is the easiest way to kind of go about that? Would you suggest diving into like, hey, I have a a super base, can I connect out to it just like we we did a lot of Graph QL on here for API that you guys already have stood up. What's the process that typically you would take to connect some data points?

  99. Yeah, like you, you need to check our data providers, see if you find something that is useful for you. We have many integrations for Superbase for example. But if you have some API that is not Superbase or not consistent, so you can create your own data provider. Basically you need to in this data provider, we are sending parameters from Refine again in a consistent way and giving you all the information you need. Then we are asking you to return data in this structure. Actually if you want to check, I can send you a CLI command NPM run refine at provider data.

  100. So if you run this command, we will give you like some boilerplate data provider. Aligen are one of our engineers with that. So it's all that. So if you go providers, data provider, so we with nice typings and all we give you so there's a get list, resource pagination filters, all provided you in a type safe manner.

  101. So we could feel in between like make sure your API gets correct request, make sure you return area of data for this one or whatever and then the rest refine will handle. So you don't need to care about invalidation, refetching, refreshing or stuff like that. We will take it from there.

  102. So you just need to provide this interface but also let me check link. What about? What about ones that are a little less structured data? So when we start to talk about Mongo DB or Firebase, is that something that you guys have dove into yet? Yeah, nice thing about open source. We have Refine Firebase open source library.

  103. I'm not sure if they updated to use latest version of refine for Mongo DB. In our enterprise packages we provide connections to not just Mongo DB but any kind of database like we provide some solution. The problem with that you need to provide the consistent API if you want to build something quickly, but that's usually a problem. So we have some tools for our enterprise users that you can use.

  104. Basically you give your database, Postgres, Mongo DB, whatever. We build BFF back end on the fly that are that is 100% compatible with refined. So for that all you need to do is just provide your APIURLAPI also generated by our tools for that. But for other cases, let me check. We have a lot of integrations actually data provider if you go packages, air table app, right graph P address, trapeze for base crude Hosura son. And in the end, we also have community data providers list there.

  105. And of course, there are a lot of data providers that aren't published open source because like people are using for their own internal API or something like that. But like if you know the structure of API requests responses that you can build it easily. So there are actually there is a a like one cool package.

  106. I like it was written with Go. So yeah, from your definitions models, it boils, it boils graphical beacon similar to what we have here. And then this folk, I don't remember his name, sorry, but he also created the data provider for that. So it's really cool. That's awesome. So not to put you on the spot too much, but I know you guys compare yourselves a lot to retool and retool kind of has more of a a graphical user interface for like a no code type of solution.

  107. Is that something that's in the works or is it possible to do that in the enterprise version? So we position our self as an alternative to retool but that's not because we are no code solution, we are in low court or just enough court solution. But the reason we compare ourselves with retool is that what is the main benefit of retool?

  108. We solve the same problem in a different ways, but at the same time like same speed but with more flexibility, with more quality and more consistently. So like people use retool because they need to build a dashboard page overnight and something quickly. So we still provide you that you can still dashboard overnight. Quickly, but two weeks later, two months later you can do any modification to your API unlike like UI tools or something like that.

  109. So we solve same problem in a slightly different way. But the thing like our solution is just not to save the day one day, next day, but like entire life cycle of application. We got you. As I mentioned, you see that we have CLI commands to make things faster and things like that, that you can write it yourself. But we most of the things we cover your use case. So again, you can boot the dashboard and pages or admin panel in a day again.

  110. But you will have version control, you will have authentication, authorization, all all that stuff actually. Perfect. Yeah. Do we have we, I have about 30 minutes left on our live coding session. Was there any interest in adding that authentication page that we kind of showed off?

  111. Is that possible? Yeah, let's let's continue with that. Like cool, I wanted to add add a page, but we don't need to follow. Let's add authentication, then let's continue. Whatever you want to go to next, that'd be great. Yeah. So let's say MPM, refine, add provider, refine, OK, run, refine, add provider.

  112. Let's run this script and here let's pick off provider with space. OK. Yeah, enter now. So yeah, you can use the default path. I wonder if I should delete. No, no, no, you don't need to do anything. You didn't report that. It can't say that it's not a problem. Let's also our off provider.

  113. So of course we're not going to implement like requests and responses, cookies stuff. Just to give you idea that for example in login, what you know is login accepts params, there are e-mail and password. Let's assume that user sent correct password. Let's write very secure code here. Let's use local storage.

  114. Very secure. Just a new idea like. Of course it's not like real world exactly. Instead of you can replace line 11. OK, gotcha. I see where the secure camera. Is boiler very secure? Our provider? Yeah, of course you can return successful error and stop. Let's not go there. Secondly, we do want to do so.

  115. Let's say we write our very secure params into local storage. So let's go to check methods. Let's skip register as well in our check method here where you need to implement your checking authentication logic. So let's write another one which is very secure. That sounds great. Yeah, let's just read all and let's just say if not all that can stay, that can stay.

  116. Sorry. As an else case, yeah, yeah. So OK, let's implement logout again, just this one. Remove item of. So normally since I work for authentication company, I should say like don't do this as we're joking about like call out to your to your OIDC endpoints and and do the full. Authentication.

  117. By the way in our CRM example we have next off example as well which is like real solution unlike here. But here in a limited time we want to provide concept like at the end of the day you validate something, make request and write it somewhere. Of course you need to have course rules and like cookies and all this security stuff.

  118. But we are keeping it simple here. And forget identity, let's also have hard coded return definition which is you. I like that the avatar was that's that's pretty good. Yeah, you, I think you can return remove the second return. So now we have like very secure authentication provider that we need to tell refine that we have all providers. So they need to use it that exactly. Maybe you guess we need to pass another prop to refine component.

  119. Let's go out provider and just write the same thing. I think it will import right? I think I got the. Yes, so now we have all providers. So refine knows if you ask to login it will do login. If you do check, it will check and do this stuff. But the problem is we didn't wrap anything with that.

  120. So we just tell refine that if someone asks to check this route, use this. But we didn't tell. So for that we have authenticated component. You can see this one. You can import it from refine their core library. Yeah, what we need to do here is you can see at line 36, so we have team layout and all right, let's on top of that wrap this all teamed layout with authenticated components. And we need to press key as well to that. Let's say in case you may have multiple, there are some box that different authenticated components doesn't log out or so we need to provide unique keys React requirement. So you can say I don't know, some string authenticated routes or something like that.

  121. Yeah, cool. So now, OK, we have nothing here. If you go back to app, we have nothing if you try to refresh like you can't go there to blog posts route. So it's redirect you to long page which doesn't exist now. So let's go with that. So line 34, we wrapped our authenticated routes, right?

  122. So let's go to closing element of 34 after 46 yeah, let's add a new route. Obviously give it path like slash login as a prop to this route component not as children is same like yeah path login and we need to pass yeah so for that again you can build your authentication page on everything. But we also have like some baked cooked solution for that you just need to import this off page component. I think you can just type it here. It should import.

  123. By the way, I want to mention that refined them Core also had this component, but obviously without any styling, just with business logic, but again, like following the same logic off page. Refine the Ant design package. Yeah, this is this doesn't look really good. So if you go back to update, import from core to refine the Ant design. So let's import it from Ant design. I think it's line seven.

  124. No, not empty. Refine the empty. Yeah. Yeah, that one, yes. We'll just. Yeah, yeah, much more nicer. So you can of course are very secure of provider will accept any e-mail password you provide still what it's. Probably my my standard Richard add example. Yeah. Hey, we're in. Yeah, wait, wait here. So we navigate it to if you check that our provider, we navigate it to redirect to slash in our our provider and our first page is still welcome page if you see here, Yeah, after login, yeah, redirect to.

  125. So for that also if you want to redirect users to certain page you need to add resource definition. Let's go with resource definition. Go to FTS 6 again. Sorry, where am I going? FTS 6. Oh, OK. Let's pass another prop to refine component resources, which is an array of objects. Yeah.

  126. And let's give it the name Blog Dash posts.

  127. And so our resource definitions are you just give it name and you also provide pets routes. So after name, let's say list, list. And for list it's going to be slash blog dash posts. So the test we already define, so this is telling refined this resources list page is living there. I'm going to explain the details later, so let's replace our welcome page component with this one. Oops.

  128. This one navigate the resource component. We're doing. Navigate to resource welcome page. Yeah, just oh, navigate to resource. I'm sorry, I'm totally lost. It's OK, sorry if I wasn't. So instead of welcome page component you need to add navigate to resource component. So replace. Yeah, I sent in the chat.

  129. Oh, OK. Sorry, sorry. Oops, sorry, I sent the wrong one. This one. So instead of this, we're doing this. Yeah. So let's add import. Yeah, again like for Remix you have different import, but so if you go back to app again, so if you go back to route. So what it does is it checks your resources. You can of course pass resource prop to it and explicitly set some resource, But if it doesn't find any resource, it will redirect user to do first resource. Maybe we have some time to quit that edit page. Let's do that.

  130. That would be nice. So again, blog posts list, let's add blog post edit TS6 component, yeah.

  131. OK. So let's remove the hook. We are not going to use use table here. So first thing we want to do is add import form from Ant design itself. All right, yeah, let's replace all return definition with form and also let's I'm going to give you that to save some time because they are repetitive stuff and design requires. Let's add this form items as chill form component. I didn't send you form though, sorry. Yeah, like you can update imports select also from Yeah. Funny, usually it gives me a nice prompt. I don't know why not Oops.

  132. I use command dot. It auto imports. Oh really nice. Let's. So obviously for graphical we need to have some mutation to send to your back end. I send you mutation code as well. Let's move it into our queries TS file. So normally so you're going to render edit form but this is only mutation.

  133. So when all your data available so you need another query to get existing data. We have some like nice feature there. We convert your mutation into graphical query to populate initial data. So let's here, let's import use form again from Let me wait send you here again refine their core also has use form, but we have Ant design library use form hook, which is again compatible with Ant design form. Yeah.

  134. And the I think you need to move it inside the component. Yes, Sir. So again, as you can see, we have form probes. Let's test them to form component. Yeah. And finally, we need to add route definition in our FTS 6 again, if we haven't already. So let me give you the definition for that to save you some time.

  135. So for resource definition you need to add edit blog posts ID edit and for route definition you need to have this one. OK. I'm not sure if your component name is the same, but like. Yeah, let's. Update Let's go to blog post Edit Yeah.

  136. Cool. And we need definition. We need to also pass edit, so refine knows where to find this edit routes in reserve definition if you go top of the page list. And yes, so like to clarify, this is not like hard requirement, but I'm going to show you why it's useful for us. So if you go back to app, finally, we need to add button. Let me give you that as well.

  137. This one in our list page, we need to add another column. So this let me explain the code as we copy pasted. So you need to import edit button from and design refine there and T package. Yeah.

  138. It is not liking this. Oh yeah, I sorry. So the thing with that we use ID as data index because the we need to know which record to edit so we need to get ID. So we use ID and edit button again. This some like flavor that you can build yourself. But if you if you have I 18 and like different languages translations and I'm going to show you if we have time left, like authorization, for example, you can say no users should be able to edit. So this edit button will be disabled by default. So but you can do it yourself.

  139. So let's click that. Hopefully it will render our not so looking good page. So last thing I want to do is to import this one. Let's wrap our edit page with edit component from again refine the and the package. Is it the entire form? Yeah, above form, yeah, yeah. And let's close it as well. And also this save button props is coming from use form hook. I think we already imported that. Let's import edit compound from refine dev and T Yes, we. So let's see the page.

  140. So yeah, it looks kind of better. What about the? The data coming. Through. Yeah, exactly. Let's go with that. So let's go back to edit page again. I mean the code, sorry, use form. Where did we import use form? From Anthony. Yes, decon mutation form props post edit mutation. Yeah, by now we should have.

  141. What about the like default data? Oh, I guess it does have ID. Yeah, if you go back to edit, we have some spaces. Could you delete them? Oh yeah, in here. Yeah, yeah, Form item, let's go to edit page. Yeah, we have drop down and everything. If you go draft for example. So if I change this to. Yeah, so one thing here, if you notice that your updated component record went to the last let's go to list page to quick fix that.

  142. We want to see updated, updated records first. So you need to do pass this prop into your stable hook. Let me explain it without like copy pasting is sometimes fine as long as you know what you're doing. So let me explain. So let's paste it first. So this use table accepts props like filters and stuff.

  143. So what we are doing here, we are adding initial sorter that is applied by default. What we say is updated it field order descending. So let's save it and refresh the page. So now we see this record first, of course, not updated record. But one thing I want to mention that if you sort by ID, for example, in the browser, I mean, no, no, no, in the browser, let's sort by ID and add some filter, status filter, any filter rejected.

  144. Yeah. And let's say you have these results you want to share with your colleague. And if you refresh the page, now everything's lost. So because they are not persisted in query T, So also we have an easy solution for that. For this one, you need to pass this prop to refine components options, sync with location through into app in FTS 6 refine component as a new prop.

  145. Yeah, yeah. So let's go back now. As you can see, like we already have query parameters persisted. So if you change the filters, query params will change as well. So if you share this link they will stay there. Also, and maybe I don't know how much time left, but one final thing I want to show is editing live provider. So if you create like open edit page in a new tab, for example, or the browser, no, no, go to open edit page in a new tab. Let's keep it here.

  146. So go back to this page list page, I mean in the browser again. Oh, sorry. So what I want to show you is that we are going to update record with ID 5 right? Yep, I think. So if you update it, do something and yeah, go back. And if you go to list page, there is nothing exchange you.

  147. You cannot see updated record because you don't have real time integration. So it's actually easy to add with that should take no more than 5 minutes. But if you go back to this documentation page again, we also have light provider. First thing you need to do is to install Graphql VS package. Second one, yeah, let's install and while it's being installed, let's go to documentation again.

  148. Yeah, we have real time section there. Real time section on the right side, yes. So addition to that, you need to import create client from Graphql VS it's Graphql Websocket client connection and in app TS6, of course, yeah. And also VS clients, yeah, instead of HTTPS, we use Websocket protocol.

  149. Yeah, let's import live provider from exactly. Now we need to initialize VS client. If you go back to documentation, it's yeah, just that yeah. So now finally we need to enable live mode next to sync with location. You can press live mode auto true. It should auto complete for you.

  150. Yes. So let's do the same thing again and see if we. Can. That's it. It's further go like this. Yeah, let's check it doesn't work. Let me let me refresh once just to make sure. Yeah, it didn't accept like render provider. There you go. It's. You can change status or anything so. I think these are sorted by status, so.

  151. Oh, maybe not. OK, so.

  152. If you click that, did this happen? No. No, the I the title did. I don't know if it's not seeing a subcategory like that. Oh yeah, as you say, there's a sorter so it's not in the. I think you can just navigate to page again, like without any filters or sorters on the list page, just blog posts and let's try to edit ID 5 again. Yeah, there you go.

  153. It took a bit like. Oh, that's fantastic. You know, I, I really love this. So I used to work at app right as a Devrel as well. And the the idea of like having to set up all of the, the different live syncing and like all this table stuff, but having refined just automatically do this, especially being able to put AUI wrapper already in there, like that's a huge step in my mind.

  154. So that's really cool. I'll be excited to try this out with some Firebase stuff. I didn't know there was a a community edition with it, so I'm pretty pumped about that as a Firebase GD. Is there anything else that I'm missing? We have just a couple minutes. Maybe one final like Steve, just one more thing.

  155. We can just try to enable this notification provider prop just to see the difference. It's, it's the same with all other features. So you can just enable notification provider at line 38, I guess. Yeah. So let's go back to edit and record. Like it doesn't matter. OK, so let's edit a record. Just do something, I don't know, test or anything. And so now you have success notification, error notification.

  156. It's also as simple as that, like, like I think main benefit of refining is our core package provides centralized contract for all other integrations. So you don't need to do bike shedding long discussions. And like this is as long as you comply with refined contracts, interfaces and all you, you know that it will work. It will just work like I don't need to do anything special as long as I satisfy this parameters, responses, types, whatever.

  157. You know the rest of your whole application is going to work like you want to change your, I don't know, notification color to slightly something different. You just do it in a one place and it it just works. How? How straightforward is it to like switch from Ant design to material UI or something? Is it just kind of find and replace? Yeah, like it's, it's again, it's not about refine. It's like it's a question for how can I migrate to Material UI from Ant design?

  158. Because as I said, refine provides hooks. So we imported use table from Refinder ante. If you're going to use Material UI, you're going to import the same one from Refinder MUI package. And then the rest of the work is about updating your Ant designing ports with Material UI and things like that.

  159. But you don't need to change your routes, you don't need to change your definitions, data provider and nothing, just components. So we like kind of provide mix and match approach that you can put different things together and they will just work. Of course you will need to import notification provider from we as well, but it's as simple as that like. Well, very cool.

  160. I really appreciate the walkthrough and I hope everybody goes out and tries out refine today. So thank you so much. We'll see you all next time. Yeah, thank you. For people who are interested, we have this source code of this repository. Let me send you link real quick if they want to, like we skipped authorization and some stuff, but they can find the full source code here with some select options.

  161. Filter by. Options and I'll, I'll put the official one on our coding cat page as well, so you can get back to it. Very cool. All right, we'll see you all. Thanks. Bye bye.