Skip to content

File Structure

David Hu edited this page May 1, 2017 · 4 revisions

The current file structure for this project is as follows:

πŸ“ .github

  • here we keep the issue and pull request templates.

πŸ“ app

  • πŸ“ assets - here are all the cool pictures we use in the application.
  • πŸ“ stylesheets
    • πŸ“ base - a folder for the initial CSS set up, such as the reset file, and colors
    • πŸ“ component - a folder for everything else CSS
    • πŸ“ƒ main.css - what we import in the main index.html

πŸ“ docs

πŸ—„ src - where our main application lives.

  • πŸ“ common - this is where the common components, actions, etc, lives, so we don't have to rewrite code.
  • πŸ“ core - the main import files, like app.jsx, its subcomponents, root_reducer.js, etc.
  • πŸ“ helpers - some functions to be used across the applications to help and assist.
  • πŸ“ modules - all the big features, divided into their own folders.
    • πŸ“ player - let's walk through video player page as an example.
      • πŸ“ subcomponents
        • all the pieces that player uses to render properly.
      • πŸ“ƒ action.js - all the action constants, creators, and thunk actions used in redux
      • πŸ“ƒ `component.js' - the main React component for this module.
      • πŸ“ƒ index.js - the container file for this module. This file is imported into routes.
      • πŸ“ƒ reducer.js - the reducer for the player component.
    • πŸ“ Other modules

some git related files, such as .gitignore, CONTRIBUTING.md

πŸ“ƒ index.html - what Electron initially loads before React takes over.

πŸ“ƒ main.js - Electron uses this to detect how to make windows.

πŸ“ƒ package.json - So everyone knows what package we used.

πŸ“ƒ template.html - In case we accidentally remove index.html, and webpack uses this to create new index.html and inject the necessary JavaScript files.

πŸ“ƒ webpack.config.js - Set up webpack configuration. Webpack is magic, just not that magic.

πŸ“ƒ yarn.lock - So everyone has their dependencies straight.

Clone this wiki locally