expo-project-structure

Defines folder structure conventions for scaffolding new Expo Router apps.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/CYRUS-pinto/pi-bot --skill expo-project-structure-cyrus-pinto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: expo-project-structure
Source: https://github.com/CYRUS-pinto/pi-bot/tree/main/.agents/skills/expo-project-structure
Command: npx skills add https://github.com/CYRUS-pinto/pi-bot --skill expo-project-structure-cyrus-pinto

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 together. This Skill provides a concrete, opinionated folder layout for new Expo Router projects so the structure is consistent from day one. ## Core Features & Use Cases - Routes-only app directory: Keeps every file in src/app/ as an Expo Router route, with API routes grouped under app/api/ using the +api suffix. - Separation of concerns: Places reusable UI in components/, screen bodies in screens/, server-only helpers in src/server/, and utilities with colocated tests in utils/. - Platform-specific code patterns: Uses file extensions like .web.tsx, .ios.tsx, and .android.tsx so Metro picks the right variant per platform. - 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 go — this Skill gives you the exact layout and naming conventions. ## Quick Start Use the expo-project-structure skill to lay out my new Expo Router app with the recommended src/ folder structure.

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 a routes-only src/app directory where every file is a route. Place reusable UI in components/, screen bodies in screens/, server helpers in src/server/, and utilities with colocated tests in utils/.

Where should API routes go in an Expo app?

Group API routes under app/api/ by appending +api to the filename, such as user+api.ts, producing endpoints like /api/user. Put shared server-only helpers in src/server/ to keep server code separate from frontend code.

Does Expo Router support the src directory?

Yes, Expo Router supports both app/ and src/app/ out of the box. To switch, move the folder and restart the bundler; the default create-expo-app template aliases @/* to ./src/* in tsconfig.json.

How do I write platform-specific components in Expo?

Split larger platform differences into separate files like bar-chart.tsx and bar-chart.web.tsx, imported extension-free so Metro picks the right variant. Supported extensions are .ios, .android, .native, and .web, and a default file is always required.

Should I restructure an existing Expo app to match this layout?

No. This structure is a starting default for new projects only, never a standard to enforce on existing apps. If an app already has a layout, follow its existing conventions and leave files where they are.