H
Homarr•8mo ago
Vishal

new widgets

I have tested GET and POST calls on postman works fine, but I want to create new widgets for those APIs need some help just started I'm following this link - https://homarr.dev/docs/community/developer-guides#creating-a-new-widget
💻 Developer Guides | Homarr Docs
Hold on! This is a technical documentation that
13 Replies
ajnart
ajnart•8mo ago
Okay ? Do you need help ?
Vishal
Vishal•8mo ago
do I need to fork the repo or by just create a new .tsx I'm using https://vscode.dev/ I just need help from where do I start 🤔
Tag
Tag•8mo ago
You need to fork the repo, and once you're done making the widget you can make a PR to merge your changes into dev I would recommend doing it on your machine directly with vscode though
Vishal
Vishal•8mo ago
Merging with dev would not be a good idea, can't I use my widgets when after I deploy homarr in my server Basically it would contain API key and bearer token, want to make it available only for my internal team
Tag
Tag•8mo ago
if that's the case then you'll need to add it every time there's an update. The system allows for you to use the API key in the app integration though instead of hardcoding the keys with a bit of luck, pulling dev everytime will not conflict with your widget though
Vishal
Vishal•8mo ago
ahh just now I got to know that, The one I'm trying to do is actually called as ( REST API to CRUD Operations), is there any template which i can use and bind with homarr custom widget so I have the API's for Create, Read, Delete, update is not required I guess so the one I tested on postman something like 1 - I get the data from GET request 2 - I add field values from GET data to the body of POST and then POST request 3 - and for delete I read the post data to fetch the the ID and then add that ID to DELETE request all this works successfully from the postman but can I create a custom widget for this? right or is there any other way
Tag
Tag•8mo ago
you can check other widgets to get an idea of how to make one. Any widget with integration could be a good base but check multiple of them to see if there is anything that resembles what you need more. The API handling happens on the server side, in the routers (src -> server -> api -> routers)
Vishal
Vishal•8mo ago
I'll try myself referencing those but this is doable right, can you share me a link for other widgets
Tag
Tag•8mo ago
I just did, that's the folder path in the project to find the server side of the widgets
Vishal
Vishal•8mo ago
ok got it, I'll have a look
Vishal
Vishal•7mo ago
I would like to learn the API integration so that I can build some for homarr. I wish to be apart of homarr https://github.com/ajnart/homarr/issues/1653#issue-1994091094 and also some private API integrations. would be helpful for my use case. can you show me one example in your free time. how its done at homarr, reading a doc or following existing code would not work for a beginner. I have installed vscode in my laptop but where do I start how do I align the files and how to check the output of the existing once. all stuck with a question mark ? I know I might be asking for too much, you Don't have to spoon feed each and everything I just need a start push
GitHub
Kubernetes API · Issue #1653 · ajnart/homarr
Description As most of the organization are including K8s pipeline into their existing one. homarr dashboard with Authentication and future version Role-based access control (RBAC) including Intera...
ajnart
ajnart•7mo ago
I think @vishb472 that #💬・ask-kapa can help you a lot with this, ask it how to create a custom integration Then you will have to look at a YouTube video on how to make API routes in nextjs or trpc, it should be fairly easy if you see how we have some stuff setup
Vishal
Vishal•7mo ago
Ok I'll try it