The RadGrad repository has the following top-level directories:
Of these, the only directory with a complex substructure is app/. Let's look at that one:
The radgrad2/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:
The imports/ directory contains five subdirectories:
Let's look at each in turn.
The api/ subdirectory provides the code for the RadGrad "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.
The redux/ subdirectory contains code to manage the Redux state. It contains four subdirectories:
The startup/ subdirectory contains code that needs to be loaded immediately upon system startup. It contains three 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.
The /typings directory has Typescript type files
*.d.ts for the different packages we are using. The most important file is
radgrad.d.ts. This file defines the types for RadGrad2.
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 are subdirectories. In many cases, the subdirectories reflect a division based on role. So, for example, there is a subdirectory called "advisor/" in each of the components, layouts, and pages/ directories.
custom/ in RadGrad2
In RadGrad2, we ignore any directories and files named
custom that appear in the project. Being in the
.gitignore means that any file or directory matching that pattern can not be committed to the repository unless explicitly told otherwise. Thus, any files to be automatically kept out of the repository should be placed in a
custom/ directory anywhere in the project.