Skip to content

Instantly share code, notes, and snippets.

@iraycd
Created August 25, 2015 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iraycd/d2dcc2b84ee2ebb27c00 to your computer and use it in GitHub Desktop.
Save iraycd/d2dcc2b84ee2ebb27c00 to your computer and use it in GitHub Desktop.

Directory Architectural Layout for React.js

.
├── /build/                     # Compiled output
├── /docs/                      # Documentation
├── /node_modules/              # 3rd-party libraries and utilities
├── /src/                       # The source code of the application
│   ├── /api/                   # REST API / Relay endpoints
│   ├── /actions/               # Action creators that allow to trigger a dispatch to stores
│   ├── /components/            # React components
│   ├── /constants/             # Constants (action types etc.)
│   ├── /content/               # Static content (plain HTML or Jade)
│   ├── /core/                  # Core components (Flux dispatcher, base classes, utilities)
│   ├── /decorators/            # Higher-order React components
│   ├── /public/                # Static files which are copied into the /build/public folder
│   ├── /stores/                # Stores contain the application state and logic
│   ├── /templates/             # HTML templates for server-side rendering, emails etc.
│   ├── /utils/                 # Utility classes and functions
│   ├── /app.js                 # Client-side startup script
├── /tools/                     # Build automation scripts and utilities
│   ├── /lib/                   # Library for utility snippets
│   ├── /build.js               # Builds the project from source to output (build) folder
│   ├── /bundle.js              # Bundles the web resources into package(s) through Webpack
│   ├── /clean.js               # Cleans up the output (build) folder
│   ├── /config.js              # Webpack configuration for both client side bundles
│   ├── /start.js               # Launches the development web server with "live reload" functionality
│   └── /(deploy.js)            # Deploys your web application
│── package.json                # The list of 3rd party libraries and utilities
└── preprocessor.js             # ES6 transpiler settings for Jest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment