# Fetch Sanity Content
https://www.sanity.io/learn/course/content-driven-web-application-foundations/fetch-sanity-content.md
Query for your content using Sanity Client, a library compatible with the Next.js cache and React Server Components for modern, integrated data fetching.
Sanity content is typically queried with GROQ queries from a configured [Sanity Client](https://www.sanity.io/docs/js-client). Fortunately, one has already been created for you.
1. **Open** `src/sanity/lib/client.ts` to confirm it exists in your project.
Sanity Client is built to run in any JavaScript run time and in any framework. It is also compatible with Next.js caching features, React Server Components, and the App Router.
It also provides ways to interact with Sanity projects and even write content back to the Content Lake with mutations. You'll use some of these features in later lessons.
It's time to put everything we've set up to work. In this lesson, you'll create a route to serve as a Post index page and a dynamic route to display an individual post.
## Next.js App Router
For now, you'll focus on data fetching at the top of each route. React Server Components allow you to perform fetches from inside individual components. Future lessons may address where this is beneficial. For now, our queries are simple enough – and GROQ is expressive enough – to get everything we need at the top of the tree.
1. See the [Next.js App Router](https://nextjs.org/docs/app/building-your-application/routing) documentation for more details about file-based routing and how file and folder names impact URLs
The most significant change we'll make first is creating a separate "Route Group" for the entire application front end. This route group will separate the front end layout code from the Studio without affecting the URL. It is also useful when integrating Visual Editing and displaying the front end _inside_ the Studio.
1. **Create** a new `(frontend)` directory and **duplicate** `layout.tsx` into it
```sh
mkdir -p "src/app/(frontend)" && cp "src/app/layout.tsx" "src/app/(frontend)/"
```
You should now have **two** `layout.tsx` files inside the app folder at these locations:
```text
src
└── app
├── // all other files
├── layout.tsx
└── (frontend)
└── layout.tsx
```
The `(frontend)/layout.tsx` file has duplicated `html` and `body` tags, but you'll update the file those later in the lesson.
1. **Update** the root `layout.tsx` file to remove `globals.css`
## Update the home page
Later in this track, the home page will become fully featured. For now, it just needs a link to the posts index.
1. **Move** `page.tsx` into the `(frontend)` folder
2. **Update** your home page route to add basic navigation to the posts index.
```tsx:src/app/(frontend)/page.tsx
import Link from "next/link";
export default async function Page() {
return (