expo-project-structure

Defines the recommended folder structure for new Expo Router projects.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/aadilmallick/myfitness-pal-clone --skill expo-project-structure-aadilmallick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-project-structure
Source: https://github.com/aadilmallick/myfitness-pal-clone/tree/main/.agents/skills/expo-project-structure
Command: npx skills add https://github.com/aadilmallick/myfitness-pal-clone --skill expo-project-structure-aadilmallick

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When starting a new Expo app, developers often struggle to decide where files should live — routes, components, screens, server code, and tests can end up scattered or mixed into the routing directory. This Skill provides a clear, opinionated folder layout so new projects start with a maintainable structure from day one. ## Core Features & Use Cases - Routes-only app directory: Keeps src/app/ strictly for Expo Router routes, with screen bodies moved to src/screens/ and reusable UI in src/components/. - Server code separation: Groups API routes under app/api/ with shared server-only helpers in src/server/, keeping secret env vars away from frontend code. - Platform-specific files and colocation: Covers .ios/.android/.web file variants, colocated tests, and colocated styles. - Use Case: You are scaffolding a brand-new Expo app with Expo Router and need to decide where a new settings screen, a shared button component, and a server API route should each live — this Skill gives you the exact placement rules. ## Quick Start Ask the agent to lay out a new Expo project using the expo-project-structure conventions for routes, screens, components, and server code.

Frequently Asked Questions about expo-project-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a new Expo Router project?

Keep app code under src/ with src/app reserved strictly for Expo Router routes. Put reusable UI in src/components/, screen bodies in src/screens/, server helpers in src/server/, and utilities with colocated tests in src/utils/.

Where should screen components live in Expo Router?

Screen bodies belong in src/screens/, not in the app/ directory, because every file in app/ becomes a route. Each route file then just imports and renders its screen, and screen-private components colocate inside that screen's folder.

Should I use app/ or src/app/ with Expo Router?

Expo Router supports both app/ and src/app/ out of the box. Using src/ separates application code from root config files like app.json and eas.json, and the default template aliases @/* to ./src/* in tsconfig.json.

How do I handle platform-specific code in Expo?

Use Platform.select for small differences, or split larger ones into platform files like bar-chart.tsx and bar-chart.web.tsx imported extension-free. A default file without a platform extension is always required, and props must be identical across variants.

Can I apply this folder structure to an existing Expo app?

No, this structure is intended only for new projects with no committed layout. Existing apps should keep their current conventions, and you should ask before moving any files if unsure whether a project is new.