1---
2title: Top-level src directory
3description: Learn how to use a top-level src directory in your Expo Router project.
4hideTOC: true
5---
6
7import { FileTree } from '~/ui/components/FileTree';
8
9import { Terminal } from '~/ui/components/Snippet';
10
11As your project grows, it can be helpful to move all of the directories containing application code into a single **src** directory. Expo Router supports this out of the box.
12
13<FileTree
14  files={['src/app/_layout.js', 'src/app/index.js', 'src/components/button.js', 'package.json']}
15/>
16
17Simply move your **app** directory to **src/app** and restart the development server with a clear cache:
18
19<Terminal
20  cmd={['$ npx expo start --clear', '', '# Or when exporting', '$ npx expo export --clear']}
21/>
22
23**Notes**:
24
25- The config files (**app.config.js**, **app.json**, **package.json**, **metro.config.js**, **tsconfig.json**) should remain in the root directory.
26- The **src/app** directory takes higher precedence than the root **app** directory. Only the **src/app** directory will be used if you have both.
27- The **public** directory should remain in the root directory.
28- Static rendering will automatically use the **src/app** directory if it exists.
29- You may consider updating any [type aliases](/guides/typescript#path-aliases) to point to the **src** directory instead of the root directory.
30