Zum Hauptinhalt springen
ProdukteDesktop-WerkzeugeTASTECADZeichnungsprüfungTASTEFILESDateiverwaltungTASTEFTPDateiübertragungTASTESSHRemote-ArbeitsbereichTASTEZIPKomprimieren und EntpackenTASTEWINMDateiverwaltungEntwicklerwerkzeugeTASTECODEIntegrierte Entwicklungsumgebung für RustTASTESTUDIOIntegrierte Entwicklungs- und TestumgebungTASTEETLDatenintegration (ETL)ServerTASTEREMOTERemote-Desktop-ServerTASTEGEOGeodatenserverTASTEMAILE-Mail-ArbeitsbereichInvestierenTASTESTOCKDesktop-App für automatischen AktienhandelErste SchritteDownloadsDokumentationKaufenAlle Produkte
Marktplatz
Neuigkeiten
TechnikNeuigkeitenEntwickler-News von heuteEntwicklerdokuProgrammiersprachenRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWeb-Frontend-FrameworksNext.jsReactVue.js · NuxtSvelteKitAngularServer-FrameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressApp- & Desktop-FrameworksTauriFlutterReact NativeElectronAlgorithmenAlgorithmus-GrundlagenKernalgorithmenFortgeschrittene AlgorithmenAlgorithmen für die Praxis
CommunityProjekteEntwicklungslogsPromptsProbleme mit KI-ToolsShowcaseCommunity-Leitfaden
ZusammenarbeitWissenstransferWebsite-AufbauDesktop-App-AufbauRelease- und ZahlungspipelineVertriebspartnerKontakt
DiensteRemote-DesktopIndividuelle Installationspakete
TASTEDEV
Produkte

Desktop-Werkzeuge

TASTECADKomplexe Zeichnungen, mühelos geöffnetTASTEFILESNur die Dateien, die zählen – in BestzeitTASTEFTPDer aufgeräumteste Weg für Ihre DateienTASTESSHDie stärkere Verbindung zu Ihren ServernTASTEZIPSchneller packen, sicherer entpackenTASTEWINMEin tastaturorientierter Dateimanager mit zwei Fenstern

Entwicklerwerkzeuge

TASTECODERust-Apps bearbeiten, bauen, debuggen und testen – alles in einem FensterTASTESTUDIOVom Bearbeiten bis zu Remote-Tests und freigegebenen KI-KorrekturenTASTEETLDaten bewegen, die Werte im Blick

Server

TASTEREMOTEEin Remote-Desktop auf Ihrem eigenen ServerTASTEGEOEin GeoServer-kompatibler Geodatenserver, neu aufgebaut in RustTASTEMAILIhre E-Mail wieder in Ihrer Hand

Investieren

TASTESTOCKAutomatischer Aktienhandel nach Ihren Regeln: wann und was

Erste Schritte

DownloadsNeueste Versionen aller ProdukteDokuSo nutzen Sie jedes ProduktKaufenAbos und DauerlizenzenAlle ProdukteAlle Produkte im Überblick
Alle Produkte
MarktplatzNeuigkeiten
Technik

Neuigkeiten

Entwickler-News von heuteOffizielle Meldungen zu Sprachen, Frameworks, GitHub und KIEntwicklerdokuAnleitungen zu Sprachen, Frameworks und Algorithmen

Programmiersprachen

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Web-Frontend-FrameworksNext.jsReactVue.js · NuxtSvelteKitAngular
Server-FrameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
App- & Desktop-FrameworksTauriFlutterReact NativeElectron

Algorithmen

Algorithmus-GrundlagenKomplexitätsanalyse · Sortieren · Suchen · Grundlegende Datenstrukturen · Bäume und HeapsKernalgorithmenGraphtraversierung · Kürzeste Wege und minimale Spannbäume · Dynamische Programmierung · Greedy-Algorithmen · Teile und herrsche · BacktrackingFortgeschrittene AlgorithmenZeichenkettenalgorithmen · Mathematik und Zahlentheorie · Bitmanipulation · Segmentbäume · Union-FindAlgorithmen für die PraxisStrategie für Coding-Interviews · LRU-Cache · Rate Limiting · Konsistentes Hashing
Alle Entwicklungsdokumente
Community
ProjekteEntwickler und Projekte entdeckenEntwicklungslogsEntscheidungen und ErkenntnissePromptsWiederverwendbare AnweisungenProbleme mit KI-ToolsProbleme und Workarounds für Claude, Codex, GeminiShowcaseFertige ErgebnisseCommunity-LeitfadenWie wir offen entwickeln
Zusammenarbeit
WissenstransferNative Apps mit Rust und eguiWebsite-Aufbau10 Sprachen, Konten, Dokumentation und DownloadsDesktop-App-AufbauRust und egui, ohne WebViewRelease- und ZahlungspipelineSignatur, MSI, deb, rpm, AppImage, PrüfsummenVertriebspartnerEmpfehlen und 30 % erhaltenKontaktEntwicklung, Partnerschaft, Investition
Dienste
Remote-DesktopIhren Computer im Browser erreichenIndividuelle InstallationspaketeNur nötige Funktionen, Einstellungen vorab
Kaufen
DE
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Anmelden
Anmelden
TASTEDEV

Von kleinen Werkzeugen zu besserer Entwicklung.

support@tastedev.netTASTEDEV unterstützen
ProdukteProduktübersichtKaufenDokuDownloadsMarktplatzSupport
CommunityProjekteEntwicklungslogsPromptsProbleme mit KI-ToolsShowcase
RichtlinienÜber unsDatenschutzerklärungNutzungsbedingungenAbo-BedingungenRückerstattungCommunity-Richtlinien
KontoAnmeldenRegistrieren
Besucher
Heute
Gestern
Aufrufe gesamt
Firma
GXSOFT
Vertretungsberechtigt
CHOI YOUNG GU
Handelsregisternummer
853-44-00368
Anschrift
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Telefon
+82-10-4404-1523
E-Mail
whitecalvin@tastedev.net
Datenschutzbeauftragter
CHOI YOUNG GU

© 2026 TASTEDEVProduktinformationen basieren auf verifizierten Entwicklungsquellen.Veröffentlicht · wird verbessert

Next.js-Dokumentation
Next.js
Getting Started with Next.jsProject StructureCore ConceptsData and StateTestingDeployment
Diskussionen

Next.js-Anleitung · 2/6

Project Structure

Dieses Kapitel ist vorerst nur auf Englisch verfügbar.

Next.js uses file-system routing: folder and file names decide your URLs and how the UI is composed. Where you put a file is therefore part of your application's design. This chapter covers the top-level folders, configuration files, special file names and the conventions you will use every day.

Top-level folders and files

A project created with create-next-app looks roughly like this (details depend on the options you chose):

my-app/
  app/
    layout.tsx        root layout
    page.tsx          home page /
    globals.css       global styles
    favicon.ico
  public/             static files such as images
  next.config.ts      Next.js configuration
  tsconfig.json       TypeScript configuration
  eslint.config.mjs   lint configuration
  package.json
  next-env.d.ts       generated type declarations
Folder or filePurpose
appThe App Router: routes, layouts and pages
publicStatic files served as-is. public/logo.png is available at /logo.png
srcOptional. If chosen, app lives in src/app
next.config.tsFramework settings such as image domains, redirects and output mode
.env*Environment variable files
proxy.tsCode that runs before a request is handled. Earlier releases call this file middleware.ts

Special file names

Inside app, only files with reserved names have special meaning. Each folder (route segment) can contain:

FileMeaning
page.tsxThe UI for that URL. A route is public only when this file exists
layout.tsxShared UI that wraps child routes and keeps its state across navigation
loading.tsxUI shown while content loads (a Suspense fallback)
error.tsxUI shown when a child throws (must be a Client Component)
not-found.tsxUI for notFound() calls and unknown URLs
route.tsA Route Handler that returns an HTTP response instead of UI
Fragen zu diesem Kapitel?
Vorheriges KapitelGetting Started with Next.jsNächstes KapitelCore Concepts
template.tsxLike a layout, but re-created on every navigation

Because of this rule you can safely colocate components, styles and tests inside route folders: anything that is not page.tsx or route.ts is never exposed as a URL.

Dynamic routes and folder conventions

Square brackets in a folder name capture part of the URL as a parameter. In recent releases params is passed as a Promise, so you await it.

// app/blog/[slug]/page.tsx  ->  /blog/hello-world
export default async function PostPage({
  params,
}: {
  params: Promise<{ slug: string }>;
}) {
  const { slug } = await params;
  return <h1>Post: {slug}</h1>;
}

The folder naming conventions are:

  • [slug]: a single dynamic segment
  • [...slug]: a catch-all segment that matches several levels (/docs/a/b/c)
  • [[...slug]]: an optional catch-all that also matches the URL without parameters
  • (marketing): a route group in parentheses. It does not appear in the URL and is used to split layouts or organize files
  • _components: a private folder starting with an underscore, excluded from routing entirely

next.config.ts

Framework configuration lives in next.config.ts (or .js, .mjs) at the project root. Writing it in TypeScript gives you autocompletion for every option.

// next.config.ts
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  images: {
    remotePatterns: [{ protocol: "https", hostname: "images.example.com" }],
  },
  async redirects() {
    return [{ source: "/old-blog/:slug", destination: "/blog/:slug", permanent: true }];
  },
};

export default nextConfig;

Import aliases and environment variables

The paths setting in tsconfig.json maps @/ to the project root (or src), so you can write import { db } from "@/lib/db" instead of long relative paths. create-next-app configures this alias by default.

Environment variables are loaded from files such as .env, .env.local, .env.development and .env.production. Secrets usually go in .env.local, which should not be committed.

# .env.local
DATABASE_URL=postgres://user:pass@localhost:5432/app
NEXT_PUBLIC_SITE_NAME=My App

Only variables whose names start with NEXT_PUBLIC_ are included in browser code. Everything else is readable on the server only, so never give that prefix to secrets such as database URLs or API keys.

Metadata files

The app directory also supports conventional files for search engines and social sharing. Dropping in favicon.ico, icon.png or opengraph-image.png generates the matching tags automatically, while robots.ts and sitemap.ts produce their content from code.

// app/sitemap.ts
import type { MetadataRoute } from "next";

export default function sitemap(): MetadataRoute.Sitemap {
  return [
    { url: "https://example.com", lastModified: new Date() },
    { url: "https://example.com/about", lastModified: new Date() },
  ];
}

Summary

  • URLs follow the folder structure of app, and a route is public only when it has a page.tsx or route.ts.
  • Special files such as layout, loading, error and not-found divide up the UI responsibilities.
  • Folder conventions like [slug], (group) and _private handle dynamic URLs and organization.
  • Keep framework settings in next.config.ts and secrets in .env.local, and prefix only browser-safe values with NEXT_PUBLIC_.

0 Kommentare

Top-KommentareNeueste zuerst

Anmelden · Melde dich an, um einen Kommentar zu schreiben.