Home > Mobile >  static site generator vs dedicated backend for a website with premium content
static site generator vs dedicated backend for a website with premium content

Time:07-14

I am evaluating different framework choices for my website which would allow users to access premium content when they subscribe, below are the options that I thought of

  1. First choice (only with static site generator)

    • Hugo(static site generator) for the website
    • Auth0 for authentication authorization
    • Stripe for payment
    • Vaniala JS in Hugo will interact with Auth0 and Stripe
  2. Second choice (with dedicated back-end)

    • Python's FastAPI for website
    • In-house solution for authentication authorization using PostgresQL for persistent
    • Stripe for payment
    • Html served from FastAPI interacts with FastAPI for authentication authorization and payment and fast api delegates to Stripe for payment.
  3. Third choice (with dedicated front-end back-end)

    • Python's FastAPI to expose REST endpoint
    • React for front-end to interact with FastAPI REST endpoints
    • In-house solution for authentication authorization using PostgresQL for persistent
    • Stripe for payment

The first choice would be easiest to get started with but I think it would tricky to use Auth0 for authorization and allow only paid users access to premium content. The third choice offers most flexibility in terms of customization.

I am leaning towards second choice for my implementation as most of my content and static and need authentication, authorization and payment for serving premium content to paid users.

Does anyone have any suggestions/feedback on my decision of second choice?

CodePudding user response:

Option 1 wouldn't work; evaluating access grants without any backend of your own would be difficult, if not impossible. Option 2 would be the most simple form, although you might want to reconsider FastAPI if you are serving a website. It's not impossible (nor undesirable) but I just think there are better options.

I also don't understand why you don't want to combine stuff. You can:

  • Generate static pages with Hugo;
  • Use those pages as templates for serving it up with FastAPI and Jinja2;
  • Use Auth0 for authO/authZ (they have a blog about combining it with FastAPI)
  • Use Stripe for payment stuff, potentially combining it with FastAPI

Furthermore, this is an opinion based question and StackOverflow is not the place for that.

  • Related