Loading...
Loading...
Framework (OSS). Folder structure for a new Expo app. Use when scaffolding or laying out a new Expo project with Expo Router, or deciding where a file should live in one. For new projects only — never restructure an existing app to match.
npx skill4agent add expo/skills expo-project-structure├── assets/
├── scripts/
├── src/
│ ├── app/ # Expo Router routes ONLY — every file is a route
│ │ ├── api/ # server API routes, grouped here
│ │ │ ├── user+api.ts
│ │ │ └── settings+api.ts
│ │ ├── _layout.tsx
│ │ ├── _layout.web.tsx # platform-specific layout
│ │ ├── index.tsx
│ │ └── settings.tsx
│ ├── components/ # reusable UI: button, card, table…
│ │ ├── table/ # complex component → folder + index.tsx
│ │ │ ├── cell.tsx
│ │ │ └── index.tsx
│ │ ├── bar-chart.tsx
│ │ ├── bar-chart.web.tsx # platform-specific variant
│ │ └── button.tsx
│ ├── screens/ # screen bodies that route files render
│ │ ├── home/
│ │ │ ├── card.tsx # used only by Home — not shared
│ │ │ └── index.tsx # rendered by src/app/index.tsx
│ │ └── settings.tsx
│ ├── server/ # server-only helpers used by app/api
│ │ ├── auth.ts
│ │ └── db.ts
│ ├── utils/ # standalone helpers + colocated tests
│ │ ├── format-date.ts
│ │ └── format-date.test.ts
│ ├── hooks/ # reusable hooks: use-theme.ts…
│ ├── constants.ts
│ └── theme.ts
├── app.json
├── eas.json
└── package.jsonsrc/src/appsrc/app/src/app/@/*./src/*tsconfig.jsonsrc/appbar-chart.tsxcreate-expo-appindex.tsx@/components/tableapp/screens/import { Home } from "@/screens/home";
export default function HomeScreen() {
// route-specific concerns only — e.g. read url params here
return <Home />;
}screens/home/components/+apiapp/process.env.XEXPO_PUBLIC_*app/api//api/user/api/settings/user/usersrc/server/+apiserver/Platform.selectPlatform.OSif/elsebar-chart.tsxbar-chart.web.tsx@/components/bar-chart.ios.android.native.webStyleSheet.create({ ... }).stylesformat-date.test.tsformat-date.ts__tests__/AGENTS.mdCLAUDE.md.claude/src/app.jsonapp.config.tseas.jsonpackage.jsonassets/scripts/src/