Skip to content

Instantly share code, notes, and snippets.

@brauliodiez
Last active August 26, 2018 16:27
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 brauliodiez/cc880374712e32f11dc2c0589c2c9287 to your computer and use it in GitHub Desktop.
Save brauliodiez/cc880374712e32f11dc2c0589c2c9287 to your computer and use it in GitHub Desktop.
Pods proposal

Pods proposal

Draft Pods proposal for the Chat solution, topics to discuss:

  • Likely lobby and chat components should be in the same pods.
  • This would just to show how to isolate in pods (core will hold session-info reducer).

Option A)

├───common-app
│   ├───components
│   └───domain
├───common-lib
├───core
│   ├───actions
│   │       index.js
│   │
│   ├───api
│   │       index.js
│   │
│   ├───reducers
│   │       index.js
│   │
│   └───selectors
│           index.js
│
├───pods
│   ├───chat
│   │   │   index.tsx
│   │   │
│   │   ├───actions
│   │   │       index.js
│   │   │
│   │   ├───api
│   │   ├───components
│   │   │   │   chat.component.jsx
│   │   │   │   chat.mappers.js
│   │   │   │   chat.selector.js
│   │   │   │   chat.viewmodel.js
│   │   │   │   index.js
│   │   │   │
│   │   │   └───components
│   │   ├───reducers
│   │   │       index.js
│   │   │
│   │   └───selectors
│   │           index.js
│   │
│   └───lobby
│       │   index.tsx
│       │
│       ├───actions
│       │       index.js
│       │
│       ├───api
│       │       api.js
│       │       index.js
│       │       model.js
│       │
│       ├───components
│       │   │   index.js
│       │   │   lobby.component.jsx
│       │   │   lobby.mappers.js
│       │   │   lobby.selector.js
│       │   │   lobby.viewmodel.js
│       │   │
│       │   └───components
│       ├───reducers
│       │       index.js
│       │
│       └───selectors
│               index.js
│
└───scenes
    ├───chat
    │       index.jsx
    │
    └───home
            index.jsx

Option B) Real project (large project, chat and lobby would be on the same pod).

├───common-app
│   ├───components
│   └───domain
├───common-lib
├───core
│   ├───actions
│   │       index.js
│   │
│   ├───api
│   │       index.js
│   │
│   ├───reducers
│   │       index.js
│   │
│   └───selectors
│           index.js
│
├───pods
│   ├───chat
│   │   ├───chat
│   │   │   │   index.tsx
│   │   │   │
│   │   │   ├───actions
│   │   │   │       index.js
│   │   │   │
│   │   │   ├───api
│   │   │   ├───components
│   │   │   │   │   chat.component.jsx
│   │   │   │   │   chat.mappers.js
│   │   │   │   │   chat.selector.js
│   │   │   │   │   chat.viewmodel.js
│   │   │   │   │   index.js
│   │   │   │   │
│   │   │   │   └───components
│   │   │   ├───reducers
│   │   │   │       index.js
│   │   │   │
│   │   │   └───selectors
│   │   │           index.js
│   │   │
│   │   └───lobby
│   │       │   index.tsx
│   │       │
│   │       ├───actions
│   │       │       index.js
│   │       │
│   │       ├───api
│   │       ├───components
│   │       │   │   index.js
│   │       │   │   lobby.component.jsx
│   │       │   │   lobby.mappers.js
│   │       │   │   lobby.selector.js
│   │       │   │   lobby.viewmodel.js
│   │       │   │
│   │       │   └───components
│   │       ├───reducers
│   │       │       index.js
│   │       │
│   │       └───selectors
│   │               index.js
│   │
│   └───common
└───scenes
    ├───chat
    │       index.js
    │
    └───home
            index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment