React Native Project Structure for Scalable Apps

📁 React Native Project Structure for Scalable Applications

Written by
Written by

Parth V.

Post Date
Post Date

June 6, 2025

shares

If you’re building a React Native app and want a clean and scalable file structure, this post is your go-to guide. This setup is especially useful for teams and even solo developers who want to keep their codebase organized.

Main Folder: All source code should reside under the src folder.

📂 src

This is the main folder that contains all application code.

📁 assets

Used to store all static resources.

Subfolders:

📁 services

Responsible for handling all API communications.

index.ts

📁 api

Handles all API call definitions categorized by HTTP method.

📌 This keeps your HTTP logic separate and reusable across the app.

📁 components

Contains global reusable components.

Common Examples:

🧠 Use atomic design principles if your app grows (Atoms, Molecules, Organisms) — I’ve explained this concept in detail at the end of the blog for better understanding.

📁 config

Centralized configuration files.

Files:

index.ts

Re-exports everything inside the config folder for easier imports.

assets.ts

Exports all static asset paths:

export const IMAGES = {
  logo: require('../assets/images/logo.png'),
};

 

📁 hooks

Contains all custom reusable hooks.

Example Hooks:

📁 locales

Contains translation files for multi-language support.

Example:

You can use libraries like i18next or react-i18next for integration.

📁 routes

Handles all navigation logic using React Navigation.

Files:

📁 screens

Stores all the app screens grouped by domain.

├── screens
│ ├── auth
│ │ └── Login
│ │ ├── index.tsx // UI component
│ │ └── styles.ts // StyleSheet
│ │ └── index.test.tsx // (optional) – Unit tests
│ └── tabs
│ └── Home
│ │ ├── index.tsx // UI component
│ │ └── styles.ts // StyleSheet
│ │ └── index.test.tsx // (optional) – Unit testsauth/

Optional Files per Screen:

📁 store

Manages global state using Redux.

Files:

Subfolders:

📁 types

Contains all TypeScript types/interfaces.

Example Files:

💡 Keep types separate to avoid clutter in UI or service layers.

📁 utils

Contains utility/helper functions used across the app.

Common Files:

📄 enum.ts

Contains all enums used in the app.

export enum UserRole {
  ADMIN = 'admin',
  USER = 'user',
}

📄 constants.ts

Global constants used throughout the app. Examples:

export const API_BASE_URL = 'https://api.example.com';
export const OTP_TIMER = 30;

📸 Full Directory Structure (Visual)

src
├── assets
│ ├── animations
│ ├── fonts
│ ├── images
│ ├── videos
│ └── docs

├── components
│ ├── CustomButton.tsx
│ ├── CustomText.tsx
│ └── ...

├── config
│ ├── assets.ts
│ ├── colors.ts
│ ├── fonts.ts
│ └── index.ts

├── hooks
│ ├── useTimer.ts
│ ├── useNotifications.ts
│ └── ...

├── locales
│ ├── en.json
│ └── fr.json

├── routes
│ ├── RootNavigator.tsx
│ ├── TabNavigator.tsx
│ └── NavigationService.ts

├── screens
│ ├── auth
│ │ └── Login
│ │ ├── index.tsx
│ │ └── styles.ts
│ └── tabs
│ └── Home
│ ├── index.tsx
│ └── styles.ts

├── services
│ ├── index.ts
│ └── api
│ ├── getRequests.ts
│ ├── postRequests.ts
│ ├── putRequests.ts
│ └── deleteRequests.ts

├── store
│ ├── store.ts
│ ├── reducers
│ └── actions

├── types
│ ├── UserInterface.ts
│ └── ...

├── utils
│ ├── Analytics.ts
│ ├── CommonUtils.ts
│ ├── constants.ts
│ ├── enum.ts
│ └── ...

└── App.tsx

🏁 Final Thoughts

This structure:

 

✅ Keeps code modular
✅ Promotes reusability
✅ Is team-friendly and scalable
✅ Easy for junior developers to understand and contribute

❓ What does “Use atomic design principles” mean?

 

 

“Use atomic design principles if your app grows (Atoms, Molecules, Organisms)”,

 

…it means:
👉 As your app gets larger, organize your components into levels of complexity — from smallest to biggest — so that they are reusable and maintainable.

🧪 1. Atoms

 

🔸 Examples:

⚛️ 2. Molecules

🔸 Examples:

🧬 3. Organisms

🔸 Examples:

📄 4. Templates & Pages (Optional for large teams)

✅ Why use it?

📁 Example File Structure with Atomic Design

components/
├── atoms/
│ ├── CustomText.tsx
│ ├── CustomButton.tsx

├── molecules/
│ ├── SearchBar.tsx
│ ├── FormRow.tsx

├── organisms/
│ ├── UserProfileCard.tsx
│ ├── ProductListItem.tsx