Expo project tour
app/, components/, hooks/.
Tour the Expo project. By the end you'll know which folder holds what and how file-based routing works in Expo Router.
The tree
apps/mobile/āāā app/ file-based routes (= URLs / screens)ā āāā _layout.tsx root layout, mounts providersā āāā index.tsx the home screenā āāā (auth)/ grouped routes (parens = no URL segment)ā ā āāā _layout.tsxā ā āāā login.tsxā ā āāā register.tsxā āāā (tabs)/ tabbed navigationā āāā _layout.tsxā āāā index.tsx first tabā āāā settings.tsxāāā components/ reusable UI (Button, Card, ā¦)āāā hooks/ useAuth, useUsers, ā¦āāā lib/ api client, secure-storage, utilsāāā assets/ images, fonts, iconsāāā app.json Expo config (name, icons, splash, deep linking)āāā eas.json build profiles (preview, production)āāā tsconfig.jsonāāā package.json
File-based routing
Same pattern as Next.js App Router. The file becomes the URL.
app/index.tsx ā /app/about.tsx ā /aboutapp/(auth)/login.tsx ā /login ā (auth) doesn't appear in URLapp/users/[id].tsx ā /users/123app/_layout.tsx ā wraps every child screen
Grouped routes ā the (parens) trick
Folders in parens are route groups. They organise files without affecting the URL. Use them to share a layout across related screens:
app/āāā (auth)/_layout.tsx auth-screen layout (centered card, no tabs)ā āāā login.tsxā āāā register.tsxāāā (tabs)/_layout.tsx main app layout (with bottom tab bar)āāā index.tsxāāā settings.tsx
Same URLs as before ā /login, /register,/, /settings. Different shells.
The root layout
import { Stack } from 'expo-router'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { AuthProvider } from '@/hooks/use-auth'const queryClient = new QueryClient()export default function RootLayout() {return (<QueryClientProvider client={queryClient}><AuthProvider><Stack screenOptions={{ headerShown: false }} /></AuthProvider></QueryClientProvider>)}
Mounts React Query + AuthProvider once for the whole app. Every screen below it can call useQuery and useAuth().
router.push('/users/123'); the file at app/users/[id].tsx renders with useLocalSearchParams() returning { id: '123' }.Quick check
Try it
Open apps/mobile/app/_layout.tsx in your scaffolded project. Read it. Then in notes.md:
- List what providers it wraps the app in
- List what screens are accessible (look at the file tree under
app/) - Find one routegroup (folder in parens). Write its purpose in one sentence.
What's next
Last lesson of this chapter ā actually run it. Simulator vs Expo Go vs dev build, and which to use when.
Spot a typo? Have an idea?
Help us improve this lesson. One click opens a GitHub issue with the lesson URL pre-filled ā suggest clearer wording, report a bug, or request more depth. The course keeps improving thanks to learners like you.
Suggest an improvement on GitHub