50BytesOfJohn
50BytesOfJohn
Explore posts from servers
XXata
Created by 50BytesOfJohn on 7/25/2024 in #help
Is it possible to restrict api key to specific branch only?
Great. Voted. Thanks for the info. Will be waiting for this update.
4 replies
XXata
Created by AD Amorim on 7/18/2024 in #help
what is the ideal column type to store the content of a Tiptap editor?
@AD Amorim not sure about the performance of such approach but in case of bigger documents maybe you could store it as files in some storage like AWS S3, or maybe even xata file storage and just keep the reference to the file in database.
10 replies
XXata
Created by AD Amorim on 7/18/2024 in #help
what is the ideal column type to store the content of a Tiptap editor?
Hey, I'm actually using xata and tiptap in one project. I was also wondering about the approach and reading about this for a while, as it's kinda not obvious and it also depends on use case and what features do you need. I'm using basic editor stuff, like simple formatting and code blocks. After user edits etc. I'm sending html, and processing it with rehype pipeline, some sanitization, code highlighting etc. and then saving the produced html to text column. When the user wants to edit document, i'm loading this html to tiptap. For now I haven't seen any issues, tiptap understands the formatted html without issues, performance is okey and everything is cool. I belive that the problem may be when you need to start using some very specific or complicated stuff, like some custom nodes, comments, collaboration. Then I think it's better to keep both HTML and JSON, where html can be used to speed up the rendering (no need to always convert JSON to HTML), and JSON can be used when user want's to edit the document. I found this approach to be used by many people while researching this topic. When it comes to the column type for JSON, I'm not so experienced, but if you won't be filtering db by the fields from that JSON, I think you can use text column for stringified JSON as well. Some better postgres expert can say if there's any difference :D. Also, as @Oreki mentioned, keep in mind field limits if a document is huge.
10 replies
KKinde
Created by 50BytesOfJohn on 7/7/2024 in #💻┃support
Sometimes when a user is logged out, it's redirected to kinde page
So for my app, I have all routes protected with middleware. I have defined site URL, post login, post logout URLs in env, all set for my app homepage. I know it may be hard to help me here, as I'm not able to fully reproduce it. I mean, sometimes when I open the app after some time on tablet (so I believe session expires), I see this kinde page. But sometimes, especially on PC, it's just showing the login page normally. I just thought that maybe you are aware of such thing already. Would it be possible to add a setting or something, that would show something like "Back to app" or "Back to website" button on that page. Even just in case someone is lost and see this page? Since it's a different domain it may be confusing, and I believe such a button could be helpful, with customized link or just link to app homepage that's already in settings I think.
8 replies
KKinde
Created by 50BytesOfJohn on 7/7/2024 in #💻┃support
Sometimes when a user is logged out, it's redirected to kinde page
Hey, thanks for reply. I'm using the nextjs sdk, with withAuth middleware
8 replies