Take a moment to think about this
In this mini project, we'll combine skills from across the whole tutorial into one single app. The idea is 'Link Stash' — a simple bookmark manager where users save links with a title, URL, and tags. In Part 1, we'll create a new project with create-next-app, organize the app/ directory following routing conventions, and set up the root layout and navigation. The home page will list a hardcoded bookmark array for now — we'll add the data layer in Part 2. The point of this stage is to get hands-on practice with the layout/page hierarchy and Link navigation.
Let's build it
Create a new project with npx create-next-app@latest link-stash, choosing TypeScript and App Router. In app/layout.tsx, add a header with the site title and a nav (Home, Add Bookmark, Tags). In app/page.tsx, define a bookmarks array (id, title, url, tags) as temporary data and render a card list with .map(). For each card, create the dynamic route app/bookmarks/[id]/page.tsx to show the bookmark's detail — look up the id with find() in the array. Add a bit of styling for the card layout with globals.css or a CSS module.
Code Example
// app/layout.tsx
import Link from "next/link";
import "./globals.css";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<header className="site-header">
<h1>Link Stash</h1>
<nav>
<Link href="/">Home</Link>
<Link href="/bookmarks/new">Add Bookmark</Link>
</nav>
</header>
<main>{children}</main>
</body>
</html>
);
}
// app/page.tsx
const bookmarks = [
{ id: "1", title: "Next.js Docs", url: "https://nextjs.org", tags: ["docs"] },
{ id: "2", title: "MDN Web Docs", url: "https://developer.mozilla.org", tags: ["docs", "reference"] },
];
export default function HomePage() {
return (
<ul className="bookmark-list">
{bookmarks.map((b) => (
<li key={b.id}>
<a href={`/bookmarks/${b.id}`}>{b.title}</a>
<span>{b.tags.join(", ")}</span>
</li>
))}
</ul>
);
}In the browser, the Link Stash home page lists 2 bookmarks, and clicking one routes to its detail page.5-Minute Try-It
Add one more item to the bookmarks array and check in the browser within 5 minutes whether a new card shows up on the home page.
A quick word of caution
Hardcoding the data in a file at this stage is intentional — it'll be replaced with a database layer in Part 2, so there's no need to worry about database setup right now.