Next.js App Router is stable since 13.4.
Here are some steps I've done to migrate my static blog from pages/ to app/ directory.
App Router Incremental Adoption Guide
Update next from package.json and package-lock.json
Folder structure
app/layout.tsx (Server Component)
app/page.tsx (Server Component)
app/index-page.tsx (Client Component)
Note: If your fetch fails like below in local development, change localhost
to 127.0.0.1
in your fetch url.
https://github.com/node-fetch/node-fetch/issues/1624
getStaticPaths -> generateStaticParams
app/posts/[slug]/page.tsx (Server Component)
getStaticProps -> getProjects (can be named anything)
app/page.tsx (Server Component) or
app/posts/[slug]/page.tsx (Server Component)
next.config.js
package.json
Change Cloudflare Pages Build configuration to above.
"next build",
tailwind.config.js
Done.