W
Wasp2mo ago
Geeklad

Integration of a dashboard into my React application

Hey Wasp lovers! I built a small React app without using additional framework, which I may try to migrate to wasp. However, first I'd like to integrate a dashboard like the Open SaaS one with all the useful features into my app. Yes, my question seems odd :wasplang: . How to achieve such a thing technically-wise? Thank you for your feedback.
6 Replies
kapa.ai
kapa.ai2mo ago
Hi @Geeklad. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To integrate a dashboard like the one in Open SaaS into your existing React application without using Wasp, you would face some challenges. The Open SaaS dashboard is tightly integrated with Wasp's framework and features. However, I can provide some general guidance based on the information available: 1. Wasp's routing: Open SaaS uses Wasp's routing system, which is built on top of React Router. You would need to implement similar routing in your React app. Wasp Docs on Pages & Routes (https://wasp-lang.dev/docs/tutorial/pages) explains how Wasp handles routing. 2. Root component: Wasp allows defining a root component that wraps your entire application. You could implement something similar in your React app to provide a common layout. Wasp Docs on Client Config (https://wasp-lang.dev/docs/project/client-config) describes this feature. 3. Tailwind CSS: Open SaaS uses Tailwind CSS for styling. You would need to integrate Tailwind into your React app to achieve a similar look and feel. 4. Authentication: Open SaaS includes built-in authentication features. You would need to implement your own authentication system or use a third-party solution. 5. Database integration: Open SaaS uses Prisma for database operations. You would need to set up your own database solution and create the necessary APIs. 6. State management: Open SaaS likely uses React Query for data fetching and state management. You would need to implement similar functionality in your app. It's important to note that many of the features in Open SaaS are deeply integrated with Wasp's framework, making it challenging to replicate them in a standalone React app. If you're interested in using these features, it might be more efficient to consider migrating your app to Wasp. If you decide to proceed with Wasp, you could start by following the Wasp Quick Start Guide (https://wasp-lang.dev/docs/quick-start) to set up a new Wasp project and then gradually migrate your existing React components into it. Remember, the Open SaaS template is designed to work within the Wasp ecosystem, so integrating just the dashboard part into a non-Wasp React app would require significant effort and may not provide the same level of functionality and integration. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Geeklad, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Filip
Filip2mo ago
Hey @Geeklad, glad you're considering Wasp! Can you be more specific with your question (what did you try, where did you get stuck, etc.)?
Geeklad
GeekladOP2mo ago
Hi @Filip Sorry, you're right. My request wasn't very clear. I built an app front-end using plain React. Now I'm wondering if I can integrate the admin dashboard from OpenSaaS.sh into my app? Knowing that it can lead to incompatibility and performance issues. Thank you
Filip
Filip5w ago
Hmm, my first instinct tells me that's going to be difficult. But, if you only want the dashboard and not use OpenSaas, you can look at OpenSaas's source and just pluck out the dashboard: https://github.com/wasp-lang/open-saas @Geeklad You will have to adapt the code to fit your use case, of course I'll tag @Vinny (@Wasp) who made Open Saas to fact-check me on this
Vinny (@Wasp)
Vinny (@Wasp)5w ago
Yep. Or you can copy and paste your React components into the Open SaaS app if there aren't too many
Geeklad
GeekladOP5w ago
Alright, I've got a hell of a challenge in front of me, I like that. I'll let know how it goes.

Did you find this page helpful?