
When working on multiple mobile projects using both Flutter and React Native, one of the biggest challenges is maintaining clean, scalable, and consistent folder structures. Over the past few years, Iβve refined a project structure that works well across both platforms β making it easier to onboard new devs, scale features, and manage codebases long-term.
In this post, Iβll walk you through how I organize my cross-platform apps, what patterns I follow, and tips to keep things modular whether youβre using Dart or JavaScript/TypeScript.
π§± Why Project Structure Matters
A well-structured codebase:
- π§ Reduces cognitive load
- π¦ Encourages separation of concerns
- π Makes scaling features easier
- π§ͺ Simplifies testing
- π₯ Makes collaboration smooth
π· Flutter Project Structure (Feature-First)
Hereβs a simplified structure I use for most Flutter apps:
lib/
βββ core/ # Shared base utilities (theme, constants, env)
β βββ utils/
β βββ services/
β βββ widgets/
βββ features/ # Grouped by feature
β βββ auth/
β β βββ data/
β β βββ domain/
β β βββ presentation/
β βββ home/
β βββ ...
βββ app/ # Routing, DI, App entry
β βββ router.dart
β βββ app.dart
main.dart
β Tips:
- Each
feature/
has its own models, logic, and UI - Use
core/
only for global, truly shared logic app/
handles GoRouter, GetIt, and entry setup- Separate presentation, domain, and data layers for clean architecture
π£ React Native Project Structure (Feature-First with Hooks)
src/
βββ assets/ # Fonts, images, icons
βββ components/ # Shared UI components
βββ features/ # Feature modules
β βββ auth/
β β βββ screens/
β β βββ hooks/
β β βββ services/
β β βββ types.ts
β βββ home/
βββ navigation/ # React Navigation config
βββ context/ # App-wide context providers
βββ utils/ # Reusable helper functions
βββ config/ # env, constants, themes
App.tsx
β Tips:
- Each
feature/
folder has its own hooks, services, and views - Avoid bloated context β use Zustand, or
useReducer
inside hooks - Centralize navigation in
/navigation
- Shared logic like
formatDate
,apiClient
, etc. live in/utils
π What They Have in Common
Principle | Flutter | React Native |
---|---|---|
Feature-first | lib/features/ | src/features/ |
Global utils/constants | lib/core/ | src/utils/ |
Routing config | lib/app/router.dart | src/navigation/ |
Scoped UI components | lib/core/widgets/ | src/components/ |
Modular business logic | data/domain layers | hooks/services per feature |
π Pro Tips for Cross-Platform Consistency
- Use naming conventions across both platforms (
auth
,home
,profile
, etc.) - Match your
features/
structure between Dart and JS - Define a shared folder structure standard in your team docs
- Use mono-repo tools like Nx (for RN + web) or Melos (for Flutter) if your projects grow
- Set up aliases/import paths to avoid deep relative imports
π Conclusion
Whether youβre building in Flutter or React Native, a feature-first structure will keep your project modular, testable, and easier to grow. Iβve used this layout across client projects, startup MVPs, and multi-dev teams β and itβs held up every time.