Building the schema
I want to archive the content for a scholar who writes a series of posts related to a single subject, this series will have different shape for it's posts than other serieses.
for example a series of posts have a
verseId, chapterId, point_1, point_2, point_3
.
another series posts may look like this: characterName, content
.
And there will be a serieses created in the future
I need some help and ideas on how to achieve that.5 Replies
I want to to build a dashboard to create the the serieses and their posts dynamically, any ideas on how to do it, and what tools to use to accomplish this?
For the first point you need relations
Second point it kinda depends on what u need to do but i guess Vite will work just fine
the second point is related to the first, my question is about how build the schema to be flexible and dynamic, and allow the admin who control the dashboard to build the shape of the posts for a certian series.
Hi @Anas Badran
You could consider using a schema that includes a base
Series
model and a flexible Post
model. For example:
The content
field as Json
allows you to store different structures for different series.
For building a dashboard to create series and posts dynamically, you could consider using a full-stack framework like Next.js with Prisma. This combination allows for type-safe database access and flexible API creation.after some discussions with chatGPT, I think I almost got what I want: