Skip to content

File Structure

johnenrick edited this page Apr 28, 2017 · 1 revision

File Structure

  • Project File Structure
    • api
    • src // contains the source code of the application
      • assets // controllers the assets that are made or imported
        • img
        • js // contains js files
        • min // contains js files that are minified. This folder is also ignored in eslint
        • style
      • components
      • helpers // contains functions that has specific purpose
      • modules // contains the module files
      • router contains file related to routers
      • services contains files for services

api

The api contains the laravel application that provides API for the application

src

Contains the front end source code

assets

Contains code that are imported and accessible globally such as libraries, jQuery 3rd paprty plugins, style theme

min

Contains js files that are minified. This folder is also ignored in eslint due to minification

style

Style contains css,scss file that can be used anywhere in the module. Styles that are specific to a module such as spacing must be placed in <style scoped></style>

components

Contains component that can be used in any module. It can be viewed as a plugin that are created by the developer but not imported from other projects.
Note: italized "component" refers to the vue js component

helpers

Contains functions that has specific purpose that can use in components or modules

modules

Contains the components for modules.
Note: italized "component" refers to the vue js component

##router Contains routing related codes such as importing the helpers and services. It also contains the router for page navigation.
Router can be divided into three parts,

  • index.js - contains the Router and importing of npm packages such as jquery and bootstrap
  • module_routes - contains the route object for the router
  • helpers.js - import all the helper from helpers

services

Contains code that has specific function in the application. Unlike helper, services can run on its own without being called by a component or module

Clone this wiki locally