Soya Next
  • Introduction
  • Packages
    • soya-next
    • soya-next-cli
    • soya-next-scripts
    • soya-next-server
  • Getting Started
    • Setup
    • Directory Structure
    • Creating an App
    • Build the App for Production
  • User Guide
    • Analyzing Dependencies
    • Configure Redux Store
    • Custom Babel Configuration
    • Custom Document
    • Custom Marlint Configuration
    • Custom Routing
    • Typescript Configuration
    • Universal Environment Configuration
  • Migration Guide
    • 0.4.x to 0.5.x
  • API Reference
    • applyReducers([reducers])
    • createPage([...connectArgs])(Page, [reducers])
    • createRouter(app, [options])
    • withLocale
    • LocaleLink
  • Examples
    • Apollo
    • Authentication
    • CSS Modules
    • CSS Modules with SCSS
    • Custom Routes
    • Internationalization
    • Internationalization with Redux
    • Redirection
    • TodoMVC
  • License
Powered by GitBook
On this page
  • Basic
  • Redux
  • Rails-style
  • Domain-style (per domain or feature)
  1. Getting Started

Directory Structure

PreviousSetupNextCreating an App

Last updated 7 years ago

The following are directory structures that you can follow to start creating React application in Soya Next. The directory structures are not limited to these listed here, so choose whatever that meet your needs.

Basic

  ·
  ├─ components
  │  └─ Layout
  │     ├─ Layout.js
  │     ├─ Layout.module.css
  │     └─ logo.svg
  ├─ config
  │  └─ default.json
  ├─ pages
  │  └─ index.js
  ├─ static
  │  └─ favicon.ico
  ├─ services
  ├─ styles
  │  └─ global.css
  └─ package.json

With , you can organize your directory structure like the following:

  ·
  ├─ config
  │  └─ default.json
  ├─ pages
  │  └─ index.js
  ├─ src
  │  ├─ components
  │  │  └─ Layout
  │  │     ├─ Layout.js
  │  │     ├─ Layout.module.css
  │  │     └─ logo.svg
  │  ├─ services
  │  └─ styles
  │     └─ global.css
  ├─ static
  │  └─ favicon.ico
  └─ package.json

Redux

Rails-style

  ·
+ ├─ actions
  ├─ components
  │  └─ Layout
  │     ├─ Layout.js
  │     ├─ Layout.module.css
  │     └─ logo.svg
  ├─ config
  │  └─ default.json
+ ├─ constants
+ ├─ containers
  ├─ pages
  │  └─ index.js
+ ├─ reducers
  ├─ static
  │  └─ favicon.ico
  ├─ services
  ├─ styles
  │  └─ global.css
  └─ package.json

Domain-style (per domain or feature)

  ·
  ├─ actions
  ├─ components
  │  └─ Layout
  │     ├─ Layout.js
  │     ├─ Layout.module.css
  │     └─ logo.svg
  ├─ config
  │  └─ default.json
  ├─ constants
  ├─ containers
+ ├─ domains
+ │  └─ flight
+ │     ├─ actions
+ │     ├─ components
+ │     ├─ constants
+ │     ├─ containers
+ │     ├─ reducers
+ │     ├─ services
+ │     └─ styles
  ├─ pages
+ │  ├─ flight
+ │  │  └─ index.js
  │  └─ index.js
  ├─ reducers
  ├─ static
+ │  ├─ flight
+ │  │  └─ airline.svg
  │  └─ favicon.ico
  ├─ services
  ├─ styles
  │  └─ global.css
  └─ package.json
babel-plugin-module-resolver