This application provides the new client-side code and frontend to the Blood Safety Information System (BSIS).
If you are considering forking this code and making any changes, please make sure that you read the Disclaimer below to ensure you are aware of the risks associated with this.
-
No warranties of any kind whatsoever are made as to the results that You will obtain from relying upon the covered code (or any information or content obtained by way of the covered code), including but not limited to compliance with privacy laws or regulations or laboratory and clinical care industry standards and protocols. Use of the covered code is not a substitute for appropriately-trained and registered professional blood service and healthcare providers, standard practice, quality assurance guidelines or professional judgment. Any decision with regard to the appropriateness of treatment, or the validity or reliability of information or content made available by the covered code, is the sole responsibility of the appropriately-trained and registered professional blood service personnel and health care providers.
-
Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted by the license, be liable to You for any indirect, special, incidental, consequential damages of any character including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other damages or losses of any nature whatsoever (direct or otherwise) on account of or associated with the use or inability to use the covered content (including, without limitation, the use of information or content made available by the covered code, all documentation associated therewith, and the failure of the covered code to comply with privacy laws and regulations or clinical care industry standards and protocols), even if such party shall have been informed of the possibility of such damages.
If you are planning to contribute in any way to the source code, please first read the Contributors Agreement.
It is being developed with the following technology stack:
- Single page web application
- Responsive web design
- AngularJS
- Twitter Bootstrap
- The Yeoman development workflow:
The application makes use of node.js tools - node.js and it's package manager (npm) should be installed.
Clone the repository and run npm install
.
It is then recommended to run npm update
, especially if there are npm WARN unmet dependency
warnings when running npm install
.
To start up a development instance of the webapp, run grunt serve
(or npm start
).
The code was scaffolded using angular-seed, as well as generator angular to add grunt support.
We use ESLint to check that our code adheres to Javascript best practises and coding style guidelines. Please configure lint to run before you commit. To do that, edit the following file in your local bsis-frontend Git respository: .git/hooks/pre-commit
#!/bin/bash
npm run lint
Use the supplied Git commit message template to ensure that commit messages conform to the project standards. The first line of the commit message should contain a JIRA ticket reference and a short description of the commit (50 characters max). The following lines (72 characters max) should describe why the change is being made, what the problem was, and may contain external references if necessary.
In your BSIS Git repository folder, run the following command:
git config commit.template .git.template
This will set the git commit template for the local git repository only. If you'd like to set the template for all your Git repositories, then run the following command:
git config --global commit.template .git.template
To make use of the application in production, run grunt build
, which compiles the code into the dist
folder. The contents of this folder can be copied to the default root folder (e.g. /var/www/html
) of a web server, such as Apache, and run in production.
On initial clone of the repo, when running npm install
and using OS X, the following error may appear:
...
NodeJS error “EMFILE, too many open files”
...
This is caused by the code opening too many files at once. By default, OS X has a limit of 256 simultaneously opened files. To resolve this, run the following command in a terminal to increase the file limit:
$ ulimit -n 1024
Running grunt serve
displays error message
-bash: grunt: command not found`.
Grunt should be installed globally using the following command:
$ sudo npm install -g grunt-cli
app/ --> main application files
css/ --> css files
fonts/ --> fonts and glyphs
images/ --> image files
index.html --> app layout file (the main html template file of the app)
scripts/ --> javascript files
app.js --> application config and routing
controllers/ --> application controllers
services/ --> custom angular services
util/ --> custom angular util
views/ --> angular views (partial html templates)
infrastructure/ --> Puppet development and deployment scripts
test/ --> test config and source files
bower.json --> Bower metadata and dependencies file
Gruntfile.js --> Grunt file used to configure tasks and build info
package.json --> npm metatada and dependencies file
README.md --> github repository readme file