expo-project-structure

Defines folder structure conventions for scaffolding new Expo Router apps.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/gmackie/agent-skills --skill expo-project-structure-gmackie
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: expo-project-structure
Source: https://github.com/gmackie/agent-skills/tree/main/skills/expo-project-structure
Command: npx skills add https://github.com/gmackie/agent-skills --skill expo-project-structure-gmackie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When starting a new Expo app, developers often struggle to decide where files should live, especially with Expo Router's file-based routing where every file in the app directory becomes a route. This Skill provides a proven folder layout so new projects start with clear separation between routes, screens, components, and server code. ## Core Features & Use Cases - Routes-only app directory: Keeps src/app/ strictly for Expo Router routes, with screen bodies moved to src/screens/ so complex UI has a proper home. - Server code separation: Groups API routes under app/api/ with shared server-only helpers in src/server/, keeping Node-side code apart from frontend code. - Platform-specific files and colocation: Covers .ios/.android/.web file variants, colocated styles and tests, and kebab-case component naming matching the default template. - Use Case: You just ran create-expo-app and need to decide where a new settings screen, a reusable button, and a /api/user endpoint should go. This Skill gives you the exact layout and the reasoning behind each placement. ## Quick Start Use the expo-project-structure skill to lay out my new Expo Router app with the recommended src directory 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 src/app reserved strictly for Expo Router routes. Place 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 go in Expo Router?▼

Put complex screen bodies in src/screens and let each route file in src/app simply render its screen. Colocate a screen's private components inside its own folder, such as screens/home/components.

Can I use this structure on an existing Expo app?▼

No, this layout is intended for new projects only. If an app already has a folder structure, follow its existing conventions rather than restructuring files to match this skeleton.

How do platform-specific files work in Expo?▼

Create variants like bar-chart.tsx and bar-chart.web.tsx, then import extension-free. Metro picks the right file per platform. Supported extensions are .ios, .android, .native, and .web, and a default file is always required.

Where do API routes live in an Expo app?▼

Append +api to a file inside app/ to create a server API route, and group them under app/api/ to produce paths like /api/user. Shared server-only helpers belong in src/server, separate from frontend code.