Convention
All pages inside /apps/web/app/app, folder are private by default.All pages inside /apps/web/app/home folder are public by default. So, if you want to add a new private page to your application, make sure to add it inside /apps/web/app/app folder.
How TurboStack ensures authentication?
We created a NextJS Middleware to ensure that all pages insideapp
folder need an authentified user to be available.
Here is the code for our AppMiddleware
:
apps/web/lib/middleware/app.ts