Open Mefisto04 opened 1 month ago
@Mefisto04 Hi, thanks for your suggestion. How do you plan to fix this problem?
The dependencies in the code are here: https://github.com/memfreeme/memfree/blob/main/frontend/components/code/evaluate-component.tsx
My previous plan was to provide a public github template repository, and then users can copy the code generated by memfree directly into a file and use it online. Like this one: https://github.com/Yuyz0112/dewhale/tree/main/preview-ui
Because memfree supports ShadcnUI, ShadcnUI has a large number of components, and just telling users about the dependencies is not enough.
And tailwind also needs some configuration: https://github.com/memfreeme/memfree/blob/main/frontend/components/code/iframe-renderer.ts
I think we can add a preview top-level directory to the memfree repository, configure package.json, tailwind.config.js, and ShadcnUI components.
Do you have any good ideas and suggestions? Thanks
Exactly as your response uses different library and component so to give package installation command at top which is used in that response will be helpful for user.
Hi, The key point is that all components or pages generated by memfree have the same dependencies, so we don't need to remind users every time we reply. We only need to tell them once in one place. A public github repository template should be the simplest. Do you have a better idea?
fare points, but if some user generate a template with the shadcn component like button,cards so it have to add the button and cards separately by installing like npx shadcn@latest add button and for cards as well
No, in this template project, we will define all the dependencies that may be needed, and all the Shadcn UI components will be included in it.
As long as it is the code generated by memfree. the user only need to follow the following steps to use it:
1. git clone
2. bun i
3. copy the code generated by memfree
3. bun dev
In the future, we will also consider supporting one-click deployment of UI pages to vercel or cloudflare page, which also requires a github repository template
This issue addresses the lack of library installation recommendations in the generated UI code. While the code provides useful snippets, it does not indicate the necessary libraries to install for proper functionality. Implementing this feature will significantly enhance user experience by guiding users on required dependencies.
Attached Screenshot:
please assign me this issue so that i can start work on it.