keystone icon indicating copy to clipboard operation
keystone copied to clipboard

[WIP/RFC] Full Next.JS experience with App Router

Open gautamsi opened this issue 1 year ago • 4 comments

This is my attempt to modernize the template with App Router and server side actions. This also brings the fullNext.JS experience without using isolated nextjs folder.

changes:

  • use NextJS app router
  • Use this in client only rendering for now. use client for quick POC
  • Work with real files instead of hidden .keystone/admin instance of Next.JS
  • generates <src|optional>/app/admin or app/(admin) folder to make use of basePath config

Need to fix

  • dashboard/list paths (have fixed it one point but broken again)

Roadmap

  • [ ] upgrade Next.JS and React to 15 and 19
  • [ ] Use server actions for forms
  • [ ] use server code with keystone context instead of graphql
  • [ ] still use graphql for certain part of the portal
  • [ ] Add support for composable UI elements, which will pave the way for UI Extension (aka Hooks in v5)
  • [ ] upgrade @keystone-ui to be ssr friendly
  • [ ] ...TBD

@dcousens This PR is for feedback and collaboration to make it next gen, I have plans to add more features like nested lists. Wanted to get your take on this if ThinkMill is willing to work in this direction or not.

this is using part of eslint cleanup branch, should be less clutter once the other PR merges

gautamsi avatar Jun 24 '24 00:06 gautamsi