BasicNext.js Orientation and the App Router Bet40 minLesson 6 of 8
What do src/app, public, the env files, and the server-only package each guarantee?

The illustrated walkthrough is behind sign-in.
Every prompt in the library is public. Any free InterviewOS account unlocks the diagram, the model answer, and the self-check.
Start with the answer
Overview
Sign in to read the model answer. Sign in
Objectives
What you'll learn
- State what the src/app, public and env-file conventions each guarantee.
- Explain exactly which env vars reach the browser and why.
- Use server-only to turn a silent leak into a build error.
Terms to know
Glossary
- NEXT_PUBLIC_
- The prefix that inlines an environment variable into client bundles at build time. Public by definition — never for secrets.
- server-only
- A package whose import makes a module unusable from the client graph, turning an accidental leak into a build error.
- Reserved filename
- The set of filenames the router treats specially under app/: page, layout, template, loading, error, not-found, default, route.