Provide an API #462
Replies: 13 comments 14 replies
-
Hello @lewebsimple In the near future, we will evaluate the option of document the current api or expose a specific public api. |
Beta Was this translation helpful? Give feedback.
-
The Figma and Sketch APIs might serve as useful inspiration here: https://www.figma.com/developers, https://developer.sketch.com |
Beta Was this translation helpful? Give feedback.
-
When this feature gets implemented, compatibility with figma plugins would be great as it allows the plugins to be reused here too |
Beta Was this translation helpful? Give feedback.
-
Hello! @niwinz Здравейте! Can you please tell me if there is any information about the implementation of API RPC in penpot? First of all, I want to get data in the Vue web application on my localhost from the penpot backend in order to display statistics on projects that the user has in penpot. |
Beta Was this translation helpful? Give feedback.
-
After that, I want to understand how to make an import in the SVG format in a third-party application through the API from the backend? Is it possible to read about it somewhere? It's all complicated for me, but I want to understand :-) Като си се хванал на хорото, ще го играеш до края 😸 |
Beta Was this translation helpful? Give feedback.
-
Hello @VladimirLevadnij Здравейте Здравейте, аз не съм българин, но го разбирам доста добре и също говоря малко. I think I have many questions here and I try to answer separatelly:
If you have more concrete questions, feel free to ask them here or sending us an email. |
Beta Was this translation helpful? Give feedback.
-
@niwinz Thank you very much for your response! At the moment, everything related to Clojure and ClojureScript is difficult for me :-) Taiga, as far as I remember, has a Django backend, I worked with this framework and made changes to the local version of Taiga. I have also mainly worked with GraphQL and REST. RPC is an unknown technology for me. It turns out a lot of new things at once, but my friends and I want to understand the project, so we will gradually do it, thanks to the fact that you find time for consultation :-) As part of our technological experiment, we would like to receive data from Penpot in some format, preferably in JSON format, in order to then convert them to other formats. User @KlausSchaefers wrote the issue here #1333 It turns out we need something the same. But if now there is no possibility of issuing data in the JSON format, then it is possible in any format. I realized that the backend does not know about SVG, but knows about "structured data". As I understand it, this is an extended JSON, which is called "transit format". This format suits us. Tell me, please, is there an example somewhere of how you can turn to the backend and get some data from the Penpot project (I'm talking about local deployment of Penpot) from a familiar JavaScript framework, for example, from Vue or React? To see how this is done, including understanding what mechanism is used to authorize in order to confirm the right to receive data from the project. Is it possible to receive and send some kind of token similar to a JWT token? |
Beta Was this translation helpful? Give feedback.
-
I have a user. This user has a project "New Project 1". In this project, a drawing of a button. My question I wrote above was how can I get this project's data from the backend (I need to know how to get the data, how to log in to verify the right to access this project, and so on). But also I'm wondering if I can somehow add some custom metadata to this button image? I want to indicate in this metadata that this image is the button, and other specialized options for this button. |
Beta Was this translation helpful? Give feedback.
-
@niwinz I have created issues. It turns out the following threads of discussion:
Also, I would like to understand in more detail if you have a plan to create a plugin system? If so, do you have an understanding of how you plan to implement the plugin system, do you have an understanding of the architecture of the plugin system that you want to implement? |
Beta Was this translation helpful? Give feedback.
-
Is there any plan to do that in the future? |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I just discovered Penpot and haven't tried it yet, but it looks fantastic! I'm about to launch a Figma plugin and found out about you guys looking for places to promote my plugin. I'm glad you guys are working on an API and plugin support. Developing a plugin for Figma has been a nightmare. And I would be happy to help you guys avoid some of Figma's mistakes. Just so you have an idea, it took me an entire week to figure out how to debug my plugin from VS Code. Something I believe should be straightforward or, at least, well documented. The process is so cumbersome I wrote a how-to article to make sure I don't forget how to do it. Let me know where would be the proper place to raise concerns (like an RFC or community meeting). Btw, I've created several frameworks and I recommend open but small architectural design meetings with future plugin developers. I know I'm eager to port my Figma plugin to Penpot :) |
Beta Was this translation helpful? Give feedback.
-
There is a working API now (docs). We're experimenting with it for porting the Bitcoin UI Kit from Figma to Penpot. We have a really rough demo set up that loads in file data and renders colors, text styles and components (rendering those very poorly). If you'd like to see how it works, the preview is here, and the code here. The code for loading a file from the API via an access token is in this file. A huge helper for API usage would be some type of open-sourced library for rendering Penpot components on the web from API data. This is really intricate, and I am sure a ton of future tools based on the API would benefit from this. |
Beta Was this translation helpful? Give feedback.
-
Any plans on having user facing plugins inside the editor itself, and not just a regular API? I'm exploring the possibility of using Penpot to streamline the icon creation process for KDE contributors. Right now, the current workflow is:
The Breeze icon theme has thousands upon thousands of icons. Sometimes we add more in the order of hundreds, with each icon going through the same process by hand. The thing is, Penpot has color tokens, so we can map the color to a name. A designer can create these tokens, say
I have a basic implementation made for Figma (icon-jetpack), but KDE being a FOSS-centric community, we'd prefer to have more choices. I guess theoretically it should be possible to do the same with the existing API using an external program. The icon would have to be marked for optimization by appending a specific substring to the name of the group/frame, as the API has no access to the currently selected groups by the user (at least I haven't found it). The user would also have to either manually run it each time or to have the app poll every once in a while. Thank you guys as always, we're rooting for you <3 |
Beta Was this translation helpful? Give feedback.
-
Is some kind of API planned in the future ?
Basic CRUD for projects / components could be useful for workflow pipelines.
Beta Was this translation helpful? Give feedback.
All reactions