Source Code Organization
Directory Overview
The HACC-Hui repository has the following top-level directories:
Of these, the only directory with a complex substructure is app/. Let's look at that one:
HACC-Hui/app/
The HACC-Hui/app/ directory layout is based on meteor-application-template, which implements a set of conventions for file and directory naming and structure that conforms to suggestions from the Meteor Guide chapter on Application Structure.
The most important organizational concept is that almost all of the application code is placed inside the imports/ directory, and the code inside the client/ and server/ directories are responsible for loading the code for the client and server sides, respectively.
Here are the top-level directories in the app/ directory:
Of these directories, the only directory with a complex substructure is imports/. Let's now look at that one:
HACC-Hui/app/imports
The imports/ directory contains four subdirectories:
Let's look at each in turn.
HACC-Hui/app/imports/api
The api/ subdirectory provides the code for the HACC-Hui "data model". This code is generally loaded on both the client and server sides of the application. See the Data Model section of this manual for detailed information on the data model. In this section, we will just briefly introduce the source organization.
HACC-Hui/app/imports/startup
The startup/ subdirectory contains code that needs to be loaded immediately upon system startup. It contains two subdirectories:
Note that naming this directory does not automatically make this code loaded, much less loaded "first". There are import statements in client/ and server/ that are responsible for loading this code.
HACC-Hui/app/imports/ui
The ui/ subdirectory contains all of the client-side code for implementing the user interface. We follow the recommended Meteor convention of using "layouts" to provide a standard organization for multiple pages, "pages" to indicate the contents of a page for which there is a URL, and "components" to indicate UI elements that are embedded within a page (and may exist on multiple pages).
So, the ui/ directory structure is:
Within each of these directories there are subdirectories. In many cases, the subdirectories reflect a division based on role. So, for example, there is a subdirectory called "developer/" in each of the components
, layouts
, and pages
directories.