---
title: "Comment by kailoon on \"Set Up Subscription Payments With Stripe using Firebase and Next.JS\" | Hashnode"
description: "Thanks for the tutorial! I am trying to build a simple SaaS product with NextJs as well. I wasn&#39;t sure how to structure my data using firebase as it is diff"
url: "https://hashnode.com/posts/set-up-subscription-payments-with-stripe-using-firebase-and-nextjs/60ed3a16573c235ee63a235f/comment/6115f6e1e249483e1210ff56"
---

[Discussion](https://hashnode.com/posts/set-up-subscription-payments-with-stripe-using-firebase-and-nextjs/60ed3a16573c235ee63a235f)

Comment [Set Up Subscription Payments With Stripe using Firebase and Next.JS](https://hashnode.com/posts/set-up-subscription-payments-with-stripe-using-firebase-and-nextjs/60ed3a16573c235ee63a235f)

[kailoon](https://hashnode.com/@kailoon)

[Aug 13, 2021](https://hashnode.com/posts/set-up-subscription-payments-with-stripe-using-firebase-and-nextjs/60ed3a16573c235ee63a235f/comment/6115f6e1e249483e1210ff56)

Thanks for the tutorial! I am trying to build a simple SaaS product with NextJs as well. I wasn't sure how to structure my data using firebase as it is different compare to traditional table db. Can I pick your mind on this?

It is a restaurant menu app, paid user can create merchant, merchant has many categories, categories have many items. The key is to allow paid user to easily manage their shop inventory.

Normal user able to leave a review for the restaurant or fav a dish and show in their profile page.

How should I go with that? Thanks!

[Jarrod Watts](https://hashnode.com/@JarrodWatts)

[Aug 14, 2021](https://hashnode.com/posts/set-up-subscription-payments-with-stripe-using-firebase-and-nextjs/60ed3a16573c235ee63a235f/comment/6115f6e1e249483e1210ff56#reply-61170cfae9f08a51fd85ef53)

Hey there!

Sounds like an interesting project, for this kind of structure I'd probably recommend having a database for users, and a database for items.

Items could have a category field and a merchant field, then you could filter items by merchant and by category when you want to query them.

I'd also recommend watching some of Firebase's videos about structuring the database as they really helped me.

[youtube.com/watch](https://www.youtube.com/watch?v=haMOUb3KVSo)

[Jarrod Watts](https://hashnode.com/@JarrodWatts)

[Aug 14, 2021](https://hashnode.com/posts/set-up-subscription-payments-with-stripe-using-firebase-and-nextjs/60ed3a16573c235ee63a235f/comment/6115f6e1e249483e1210ff56#reply-61170d0cf6ebde51f64f9bd1)

[Jarrod Watts](https://hashnode.com/@JarrodWatts) And by "database" i mean top-level collections.
