Adding and Fetching content from a database

I am creating a site using October CMS 4 and am using these folders in theme to serve content : ./layouts, ./partials, ./pages

But now I want a page called Daily Tidbits where each tidbit would be stored in the database having fields like created_date and tidbit - where do store models and how and from which file(s) like controller do I fetch to display on the daily.htm page ? (Since there is no app/Models)

And how do I add daily tidbit content to it in admin ?

Hi @anjanesh
welcome here!

So you find yourself at a crossroad.

For your case, you will need to decide between using Tailor or create your own plugin.
Pluging will allow you to create your own app Model, since you are mentioning that.

I suggest that you have a look at the Tailor documentation
and an existing plugin such as RainLab.Blog to get an idea on how to build a plugin.

Tailor

RainLab.Blog plugin

So the only use of the MySQL database is when using a plugin, existing or creating a new one.
Else all content is stored in files in October CMS is it ?

I checked out the docs on Tailor (took ChatGPT’s help to give me a solution too) - if model can be structured in yaml using Tailor, will it be possible to have search functionality if a user wants to search for a news item (Tidbit) that’s located in files ? I’ve been so used to SQL and ORM that I can’t imagine how search / sort will work when structured data is stored in files.