Question about pages vs screens

Hey everyone,

Up until recently, I assumed WeWeb AI couldn’t handle creating multiple “pages.” But I’ve come to realize that it doesn’t necessarily need to – it can create a menu and dynamically show different screens within a single page, similar to how Replit manages views. That opens up some interesting possibilities, but also a few questions for me.

I’m building a SaaS client portal app with three main account types:

  • Master Admin – The app owner who views the app like a product.

  • Super Admin – The account owner/user who manages their own clients.

  • Clients – End users who interact with the product or service.

It’s a dual-sided portal, and I want to make sure I’m designing it the right way from the start.

My questions:

-Should I be creating a separate page for each account type (e.g. Master Admin, Super Admin, Client), and build their respective interfaces on those pages

-Or is it better to design everything within a single “page”, and use dynamic views or conditionally rendered sections based on the logged-in user’s role?

-Does designing everything in one page scale well for apps like this? Or does it get messy and hard to maintain?

Extra context:

-I’ll be relying heavily on WeWeb’s AI features for building the UI and logic.

-I’m just starting to plan this out, so any advice or best practices from those who’ve built similar multi-role apps would be super helpful.

Thanks in advance!

1 Like

Hi @Danny ,

-Should I be creating a separate page for each account type (e.g. Master Admin, Super Admin, Client), and build their respective interfaces on those pages
-Or is it better to design everything within a single “page”, and use dynamic views or conditionally rendered sections based on the logged-in user’s role?

Generally that depends on your html DOM. In other words, ‘how many html elements your pages have and what kind of logic (in terms of complexity) they should include’.

The more elements you have on the page the 'heavier" it becomes and that affects loading speed.

It’s also hard to maintain one single page that is used by different users with different roles or used in different modes (view / edit).

For example, I created a page with two sets of html-elements - one set for viewing data and another set for editing. Eventually it came to a point where I had no longer control over variables, workflows, etc. So I decided to split those modes between two separate pages.

At the same time, if your page data is not complex it’s sometimes better to have all “modes” / “user roles” under one page. Its easier to have it all in one place to avoid duplication nad keep everything in one place.

In the end it all depends on what kind of data you have and what the set of html elements is. Both approaches can be effective.

-Does designing everything in one page scale well for apps like this? Or does it get messy and hard to maintain?

One more crucial thing for scaling is a good initial data organization and proper use of Weweb’s libraries, components and variables. Components can make you building process much more easier if you build them flexible. The same goes for workflows - several reusable global workflows with checks and decisions can save you a lot of time in the future.

So it’s all about proper architecture of the project you want to build. 80% of thinking, 20% of doing.

-I’ll be relying heavily on WeWeb’s AI features for building the UI and logic.

It has pros and cons. Pros - it can drammatically increase you building speed at the start. Cons - it may create an invisible wall that you won’t even know how to overcome.

So, my advice it to use AI but double-check the results. You need to make sure that you know how all AI-created elements works. Without this it will be extremely problematic to scale.

3 Likes

I would say it depends on how big your application will be. I would go with separate pages so you can focus on redirection based on role to be honest. But the most important is to make sure you are using reusable component across your application.

Using Weweb AIs is great and you should do it but then, use the component it has created to create your reusable component. Else it will be a nightmare to maintain.

2 Likes

Can wewebs ai create new pages Meaning if let’s say I need it to build a page and build another page and connect the two, can the ai do that or can it only work on one page at a time?

Simple answer: yes.

In reality it depends on what you mean by “connecting the two” and by “can it only work on one page at a time”.

AI can build workflows and pages. It also can add links between pages. And it can work with all of your project context (until its too big, which happens pretty quickly).

If you asking about the possibility of triggering AI from two separate instances of editor at the same time to edit different pages, I just have never tried it.

In theory it may work, but in my opinion it also may be an incorrect way to use it, because when two or more instances of AI agent work concurrently the project context changes immediately and it may come to errors.