Loading Depth Study
Preparing your workspace
Next.js App Router uses the app directory and special files to organize application routes and shared UI.
The App Router organizes routes through folders inside the app directory. A page.tsx file defines the UI for a route, layout.tsx provides shared UI around nested routes, loading.tsx can define a loading experience, and error.tsx can provide route-level error handling. Route groups and dynamic segments help organize larger applications without making the URL structure unnecessarily complex.
A learning platform can have app/courses for public courses, app/dashboard for student pages, and app/admin for platform administration.
app/
page.tsx
courses/
page.tsx
dashboard/
page.tsx
loading.tsx
admin/
users/
page.tsxThe folder structure creates routes for the homepage, courses, dashboard, and admin users.