Data Storage & CMS for Beginners?
Hi folks! Can someone tell me how to implement data storage (user settings & user files) and CMS (blog content) for beginners using OpenSaaS?
Is it Prisma that helps with this? Do I need to look at Prisma docs?
6 Replies
Hey @Baps , welcome! What exactly would you like to do? Develop a platform for others to write their blogs (like e.g. Medium), or just a blog for yourself?
If you just want to have a blog for yourself, you might even be ok without a database, just with static content (e.g. mdx files). Let us know and we can advise further 🙂
And yes, Wasp works with React, Node.js and Prisma so it is a required knowledge. If you go through our tutorial this could also be enough to get you started, especially with Prisma and Node
@matijash I know the very basics of React. Some questions:
1. Through using Wasp, and eventually figuring out the React part of it, I would be learning React more efficiently, as opposed to learning React in isolation. Correct?
2. Thank you for letting me know about a blog. What about various types of CMS items in a web app? Like design projects & blogs—two different CMS types in one web app?
3. What's the best way to store user settings? Say a user has logged in with Google.
You don't have to answer all of these questions, I respect your time—even some keywords I should Google would be helpful and I'll do the heavy work from there!
1. Learning React -> hard to say, I think you would be laerning it just fine in any case. Wasp might help with getting into it a bit faster, but there is also some value to going "vanilla". I wouldn't worry about it much, as long as you are writing React, you are learning, so do whatever makes the most sense for your project.
2. I am not sure what do you mean with CMS here. Wasp is a web app that uses Prisma to interact with the database (Postgresql), so normally you would use Prisma to describe the data in the database, and then also to create/read/update/delete (CRUD) it.
CMSs are usually somewhat specialized systems for storing some data, often a bit simpler data, and are usually used for more lightweight stuff -> certainly not something you need in Wasp / OpenSaas.
3. Storing user settings -> which kind? Something they enter on their own? Something you fetch from their Google account? In any case, probably you will want to store all those into the
User
entity, which means using Prisma.
I hope this helps -> it is hard to explain it all without going deeper into Prisma and other topics which are quite wide/deep. I do suggest reading a bit about Prisma possibly, to get an idea of what it does. Also, consider using https://usemage.ai/ to have AI generate you some Wasp apps -> it makes mistakes when they are a bit more complex, but still, code usually makes sense in general, so you can get a bit of an idea how some things could be done in Wasp.MAGE GPT Web App Generator ✨ MageGPT
Generate your full-stack React, Node.js and Prisma web app using the magic of GPT and the Wasp full-stack framework.
@Baps if you have a specific idea maybe you can give us a bit more details on what exactly you want to build "e.g. I want to build sth like Medium", and then we'll be able to provide more detailed help 🙂
This is so helpful! Let me try out your tips and this tool. I'm just experimenting with ideas.
Already love MageGPT.
I am glad it helps! Mage is an experiment, and will likely make silly mistakes for more complex projects, so don't take it too seriously -> but it can also give some good ideas relatively quickly, and give a nice start possibly, so I hope you have a good experience with it.