Routing
التوجيه (Routing)
GLS-000154
Definition
The system that maps URLs to pages or components in your app.
النظام الذي يعيّن URLs إلى صفحات أو مكونات في تطبيقك.
Why It Matters
Next.js file-based routing is one of its killer features. Every page on 404Fault — /projects, /glossary/[slug], /admin — exists because of a file in the /app directory.
التوجيه المعتمد على الملفات في Next.js هو أحد مميزاته الرائعة. كل صفحة في 404Fault — /projects و/glossary/[slug] و/admin — موجودة بسبب ملف في مجلد /app.
Full Definition
AI Builder Tips
Avoid these mistakes when using Routing:
Confusing App Router and Pages Router conventions
Forgetting that [slug] must be accessed via params.slug in the component
Sign in to unlock guided AI explanations from AI Teacher.
Generate a Prompt
Copy this prompt and use it directly with any AI model — no setup needed.
Help me build a project using Routing. Explain: 1. What is Routing and why it matters 2. The core architecture and required tools 3. Step-by-step implementation plan 4. Common mistakes to avoid: Confusing App Router and Pages Router conventions, Forgetting that [slug] must be accessed via params.slug in the component 5. Best practices and production tips