Skip to content

PC Prep Kit is a web application aimed at educating Peace Corps Volunteers and increasing awareness about Malaria and its prevention techniques.

Notifications You must be signed in to change notification settings

lunayach/PC-Prep-Kit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PC-Prep-Kit

What does this project do?

PC Prep Kit is a web application aimed at helping the peace corps volunteers with awareness about Malaria and its prevention techniques. The application uses various interactive activities to make the process effective. The App focuses on causes, prevention and medication of Malaria.

Why is the project useful?

PC Prep kit helps spread awareness about Malaria. According to WHO[1], In 2015 there were around 212 million cases of malaria and 429,000 deaths, 90% of which is from Africa. It is established that early diagnosis and prompt treatment of malaria prevents deaths. Taking simple preventive measures can also help in preventing malaria to a large extent. The Peace Corps Volunteers who travel to the countries effected with malaria can use the information proved in the application and learn about symptoms, medications and their side effects and preventive measure which help keep them safe.

Technologies used

The project uses

  • Node.js, Express framework (JavaScript)
  • Angular 4 (SCSS, TypeScript, HTML)
  • Mocha, Supertest, Should.js (Backend Testing)
  • Jasmine, Karma (Angular Testing)
  • MySQL + Sequalize ORM
  • ESLint and TSLint (Linting tools)

How can users get started with contributing to the project?

Anyone can find an issue in the application, the issue is not limited to bugs but also includes UI enhancements, efficient codes, improved structure or updating depreciated functions.

The following procedure must be followed in order to solve an issue.

  • Check if the issue has already been reported, if not report the issue on Github.
  • Assign the issue to yourself, if you want to solve it.
  • You can open an issue and tag it as free if you do not wish to solve it.
  • The issues marked free are open for you to solve, assign the issue to yourself before beginning the work on it.
  • Before you make a Pull request, make sure that there are no linting errors with the files you modified.

Getting Started

Fork the Repository

On GitHub, navigate to the PC-Prep-Kit Repository. In the top-right corner of the page, click Fork.

Clone the Repository

Now, navigate to the forked repository in your profile. In the top-right corner of the page, you will find a green button with the text "Clone or download". Click on it. Copy the link that appears in the popup.

Now, go to your terminal (if you are using a Linux platform) or git bash (if you are using a Windows platform) and execute this command

git clone URL

Replace URL with the copied url

or you can just,

Go to your terminal and execute this command

$ git clone https://github.com/YOUR_USERNAME/PC-Prep-Kit

Replace YOUR_USERNAME with your Github username.

Installation

Install all dependencies in package.json file. This can be done by navigating to the cloned PC-Prep-Kit directory in the command prompt/terminal/console and running the following command:

$ cd PC-Prep-Kit
$ npm install

Edit the settings.js file inside the config folder with your custom API keys and database setup information.

Create a new tab in your terminal/command line and in there log in to your local MySQL account and follow the steps below:

CREATE DATABASE pcprepkit;

or if you are using a tool like phpMyAdmin to manage your database, you can setup it up there too.

Setting up api.ai for doctor chat module

  • Signup on api.ai with the same google project used for gmail login.
  • Create a new agent.
  • On the sidebar, click on the settings icon adjacent to the agent name.
  • Open Export and Import tab and select import from zip.
  • upload the malariaDoctor.zip file available in the repo.
  • get the client key from the console and replace it in settings.js file

Once the database and the settings.json file is setup, run the following command from the project directory.

$ npm start

Then create a new terminal or command line tab and go to the project directory and run

$ ng build --watch

to setup the Angular developmental server.

After the build completes, you can navigate to http://localhost:3000/ in your browser to check out the application.

And, that's it, you are DONE. You have successfully setup the project.

The app will automatically reload if you change any of the source files.

Testing

Backend Testing

Backend Testing uses mocha, supertest and should.js, these packages are installed automatically from the package.json file and will be available after all the packages are installed by running npm install.
The test file is available in test/test.js.
To contribute to the backend testing for PC Prep Kit, you can search for APIs for which the test cases have not been written, or validity of current tests due to any API changes.

Angular (Frontend) Testing

Frontend Testing uses Karma and Jasmine, these packages are installed automatically from the package.json file and will be available after all the packages are installed by running npm install. The test files are available in the src/tests/ folder.

Steps to run the tests: Run ng test to execute the unit tests via Karma.

To contribute to the frontend testing for PC Prep Kit, you can look for files for which the test cases have not been written, or fix test cases that fail.

Running TSLint and ESLint

Run ng lint in your terminal to identify all linting errors with Angular files.

You can also run tslint PATH_TO_YOUR_typescript_FILE to check for linting errors of individual files.

Run eslint *.js; eslint **/*.js in your terminal to identify all linting errors with Node files.

You can also run eslint PATH_TO_YOUR_nodejs_FILE to check for linting errors of individual files.

Need more help?

Help on using Git

To get more help on the angular-cli use ng --help or go check out the Angular-CLI README.

Run npm install --save PACKAGE_NAME to install packages locally and add it to package.json file.

Or

Run npm install -g PACKAGE_NAME to install packages globally and use it across all node projects.

Replace PACKAGE_NAME with the actual name of the package.

Still having trouble installing npm packages. You can learn more about it here.

Get help on Sequelize here.

Where can users get help with the project?

Users can post their questions on the Slack Channel group pc-prep-kit or use the Mailing List .

[1] WHO - 10 facts about malaria

About

PC Prep Kit is a web application aimed at educating Peace Corps Volunteers and increasing awareness about Malaria and its prevention techniques.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 53.3%
  • JavaScript 20.4%
  • HTML 19.8%
  • CSS 6.5%