Is it possible to make a web app and a native app that shares the same database? Please teach me how it is done ๐Ÿ˜…

Hi guys, I just dove in to Hypi :grin: I am not a coder/programmer but I am eager to learn :wink:

I would like to make a web app as well as native apps (ios/android) and was hoping to know if it is possible that they share the same database.

In effect, I would like to make posts, divide them into categories and feed them to the apps.

Overall there are filters that I would like to implement for native app posts as well as web app posts.

On the marketing side of things, I would like to guide the users to install the native mobile apps. So that I can send push notifications.

Hopefully someone here have implemented a similar use caseโ€ฆ

Please share your thoughts and method,

Truly appreciate your time,

Edward

Hi @TinkerGaps,

Linking two apps with one database

It is possible for a single database to be shared between a web and mobile app. At the moment this is a manual process that we must do for you through a support request but we will enable it to be done from the editor in the future without needing to contact us.

For now, you have to create two apps and we will connect them for you.

The app

To your app itself building the whole thing in one reply may be a bit too much so Iโ€™ll start with an overview of one approach you can take and then some details about one screen and you can follow up with further questions on the rest.

Some things are not clear but here is what Iโ€™ll assume:

  1. By post, you something like a blog post
  2. There is a screen which lists posts
  3. There is a UI that allows users to create posts (or is it only your account that can create posts, meaning you need an admin panel?)
  4. The filter is a text that the user can enter to search the posts

From the above, you have two screens

Post list screen

On this screen, you can keep it simple and show the list of posts and when the user taps on one of them, you show the full post content in a pop over ( you could expand as well if you donโ€™t want. a pop up)

  1. In the Hypi editor, create a component called โ€œpost summaryโ€ by clicking the diamond icon in the top left and then clicking the + icon
    Screenshot 2023-06-29 at 11.44.28
  2. On the canvas, there should be a blue square, click this and then on the right, scroll down and click the โ€œResetโ€ next to the fill colour
  3. Scroll back up and click the PX next to the 100.0 under width and choose %, this will make the component fill the widget of the phone
  4. Click the widget icon next to the diamond to switch back and search for the ListTile widget
  5. Drag the list tile on to the canvas
  6. Drag a Text widget on top of the ListTile, it should pop up and ask where to place the Text, select โ€œtitleโ€ from the dropdown and close the pop up
  7. Drag a Text widget on top of the ListTile again, this time select the sub-title forom the drop down

Now you have a component which can be used to display a single postโ€™s title and created date

Once you get through these steps, Iโ€™ll guide you through the next part of creating the screen to display your list of posts