Skip to content
Discussion options

You must be logged in to vote

Hello @Fred638,

The root directory is the one you initialize with npm init which is usually the parent folder of next.config.js and package.json.

project-root/
├── app/                     # App Router (pages, layouts, etc.)
│   ├── api/                 # API routes
│   │   └── auth/            # Authentication-related API endpoints
│   │       └── route.ts     # API route handler
│   ├── layout.tsx           # Root layout
│   ├── page.tsx             # Home page
│   └── protected/           # Protected routes
│       └── page.tsx         # Protected page
├── src/                     # Optional: Application source code
│   ├── lib/                 # Reusable logic
│   │   ├── auth.ts     …

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@Fred638
Comment options

@RamezCh
Comment options

Answer selected by Fred638
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Fred638
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development
5 participants