Why file-based routing?
/blog/why-file-based-routing
Folder structure as routing removes an entire category of bugs (routes defined in code drifting from the files that implement them) and makes the URL space of an app visible just by looking at app/.
This page was generated by
app/blog/[slug]/page.tsx— one file handling every post slug. Try changing the URL to a slug that doesn't exist to see notFound() trigger the nearest not-found.tsx(or Next's default 404) instead of crashing.