Battle-tested, scalable folder structures for React applications using feature-based architecture. This repository provides comprehensive templates and examples for organizing React projects across different frameworks.
This repository contains:
- Production-ready folder structures for React frameworks
- Complete code examples with TypeScript support
- Best practices and implementation guides
- Path alias configurations and setup instructions
Framework | Status | Description |
---|---|---|
React Native Expo | β Available | Mobile apps with Expo Router and file-based routing |
Next.js App Router | π§ Coming Soon | Full-stack web applications with App Router |
Vite + React | π§ Coming Soon | Fast development with Vite bundler |
Create React App | π§ Coming Soon | Traditional React single-page applications |
React Native CLI | π§ Coming Soon | Native development without Expo |
Remix | π§ Coming Soon | Full-stack with server-side rendering |
All templates follow the same proven feature-based structure:
src/
βββ app/ # File-based routing (screens/pages)
βββ features/ # Feature modules (auth, chat, orders, etc.)
β βββ auth/
β β βββ components/
β β βββ hooks/
β β βββ services/
β β βββ types.ts
βββ components/ # Shared UI components
βββ assets/ # Static files (images, fonts, icons)
βββ constants/ # App-wide constants
βββ lib/ # Third-party integrations
βββ store/ # Global state management
βββ hooks/ # Global custom hooks
βββ utils/ # Helper functions
βββ types/ # TypeScript type definitions
βββ service/ # Background services
βββ config/ # App configuration
- Browse templates in the full documentation
- Choose your framework from the available templates
- Copy the folder structure to your project
- Follow the setup guide for your specific framework
- π Scalable - Add features without restructuring existing code
- π§Ή Maintainable - Related code stays co-located and organized
- π₯ Team-friendly - Clear ownership boundaries reduce conflicts
- β‘ Efficient - Better code splitting and faster development
Want to contribute or run the documentation locally?
- Ruby 2.7+ with DevKit
- Bundler gem
- Git
# Clone the repository
git clone https://github.com/ahmad2point0/react-app-folder-structure.git
cd react-app-folder-structure
# Install dependencies
bundle install
# Start the documentation server
bundle exec jekyll serve
# Visit http://localhost:4000
Windows users: Use setup.bat
for automated setup, or see SETUP.md for detailed instructions.
We welcome contributions! Help us expand this collection:
- π Add new framework templates
- π§ Improve existing structures
- π Enhance documentation
- π Fix bugs and issues
- Fork this repository
- Create a feature branch (
git checkout -b add-nextjs-template
) - Make your changes following our patterns
- Test locally with Jekyll
- Submit a pull request
See our Contributing Guide for detailed instructions.
MIT License - feel free to use these structures in your projects!
- π Full Documentation - Complete guides and examples
- π Issues - Report bugs or request features
- π¬ Discussions - Ask questions and share ideas
π Start building better React applications with proven folder structures!