Replies: 3 comments
-
Hey @wojtekmach, I talked to @krns and your suggestion to implement a single file admin panel with Phoenix Playground and Backpex. Great idea! There are a few questions that come to mind and I thought it would be best to discuss them here. We depend on Tailwind, daisyUI and Alpine.js. Maybe we could use the CDN versions of the tools for this use case. It won't be used in production anyway (or will it)? But I'm not sure if that would work well with LiveView. Something like that:
Is it possible to provide a base layout? How would you handle migrations? |
Beta Was this translation helpful? Give feedback.
-
Another challenge will be the routing. Currently we need to add some macro stuff to the router and Backpex generates a lot of routes based on that. I saw that you can provide a |
Beta Was this translation helpful? Give feedback.
-
Regarding layout and CSS/JS, I have a few open issues https://github.com/phoenix-playground/phoenix_playground/issues and I'm still considering options but I am leaning to something simple along the lines of: PhoenixPlayground.start(
live: DemoLive,
extra_head_html: """
<script ...>
"""
) If it's more practical to replace the layout wholesale, there could be a Regarding router, I could add support for defining multiple routes but if it is more practical to bring your own router, Regarding migrations, you can check out this script: In that script we always re-migrate the DB which would most likely not be a good idea here. You can start Repo in the same supervision tree as the Playground endpoint by using So I think all the foundational pieces are here already, perhaps? |
Beta Was this translation helpful? Give feedback.
-
Dashbit recently announced Phoenix Playground.
In this discussion I would like to evaluate if there is an easy way to provide a single file admin panel with Backpex.
Beta Was this translation helpful? Give feedback.
All reactions