Logo-amall

I know that Next13 is in the experimental version phase, but the concept of a solution with a new app structure is interesting. Does anyone have a sample of how to use NHost (its basic functions - authentication, authorization, storage, graphql) with the new app structure? Now I'm working on a project for our tennis club, which has a general public section (information, reservation system - viewing only, membership information), and also has a section for logged in users, who are divided into three levels of permissions (user, member and admin ). My concern is how to properly implement the NHost provider (I assume it must be a client component) and if NHost works with this new option introduced in NextJs 13.

Last active 3 months ago

8 replies

13 views

  • EV

    I know that Next13 is in the experimental version phase, but the concept of a solution with a new app structure is interesting.
    Does anyone have a sample of how to use NHost (its basic functions - authentication, authorization, storage, graphql) with the new app structure?
    Now I'm working on a project for our tennis club, which has a general public section (information, reservation system - viewing only, membership information), and also has a section for logged in users, who are divided into three levels of permissions (user, member and admin ).
    My concern is how to properly implement the NHost provider (I assume it must be a client component) and if NHost works with this new option introduced in NextJs 13.

  • EL

    I haven't seen any example of this yet. I think this is mostly due to the app structure being a beta feature from Next.js. Things might change significantly in the future.

  • EV

    OK, I'll try it and see how it works. We will let you know with what result.

  • EV

    So after a week of experimentation and attempts to integrate and use the new app structure, I'm back in the old "pages" using NextJs.
    I'm probably old enough to understand server components (in conjunction with retrieving data from GraphQl, using authentication and authorization).
    But the very concept of routing in the app directory seemed nice to me. But as I say I'm stuck on getting the data for the site. Well, I'll wait until someone else shows me how to do GraphQL+Auth in this new solution. I didn't find the way…

  • EL

    @EvzenSupler thanks for giving it your best. Maybe you can start a discussion on GitHub with your findings and where you got stuck? And we can collaborate more there and keep track of eveything?

  • EL

    https://github.com/nhost/nhost/discussions/new

  • EV

    As soon as I have some time, I will create Turborepo - NHost+Next13+UI and write in the discussion on github.

  • EV

    but I see that there is already one question about Next13 and the app folder. https://github.com/nhost/nhost/discussions/1152

Last active 3 months ago

8 replies

13 views