jvillagomez / mednickDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mednick DB

Application is to house all mednick lab files. Files are systematically stored according to their metadata, to allow for easy indexing. With researchers requiring access to the data within the files, scripts housed on server read/parse data and store it in DB. Files and data may be accessed through endpoints using the included angular client, or through any method allowing HTTP requests (i.e Python, MATLAB).

Endpoints allow for file uploads, querries, updates, deletions, and more. Users may also use endpoints to insert data without files, but data insertion is primarily done my python microservices. All file, data manipulations must be done through endpoints, to allow API to log all activity and avoid corruption.

Admins will be able to insert files directly into filesystem (i.e using FTP), outside of the API. A microservice periodically scans the filestem for these new files and automatically logs them in API.

  • Files are classified as two main types: Survey, Task.
  • A single survey file includes demographic, screening data for multiple study participants.
  • Each task file contains recorded data for a single participant.
  • Participant Survey Data and Participant Task Data will have a 1-to-1 relationship.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Project should be run using a 64-bit system.

Prerequisites

You must have the following installed, before you can run an instance of the project. This guide assumes you already have GIT installed on your computer.

Install Node.JS

https://nodejs.org/

Install Python 3

https://www.python.org/downloads

Installing

How to get a development env running. The following instructions can also be used for deployment on a production server. Deployment for a production server would require further configurations, prior to the steps below.

Create a local directory that will house the project.

md "c:\source\Path\To\Project\Folder"

Initailize an empty local repo

git init

Clone the latest commit on GitHub

git clone "https://github.com/MednickLab/mednickDB.git"

Set server folder as CWD

cd "ProjectRoot\server"

Install Node project dependencies using NPM

npm install

Set client folder as CWD

cd "..\client"

Install Angular.JS client dependencies using NPM (Optional)

npm install

Install grunt task manager globally (Optional)

npm install -g grunt-cli

Run Node.JS server

cd "..\server"
npm start

Run Angular.JS client (Optional)

cd "..\client"
grunt serve

You're application is now running on localhost! For information regarding use and supported API calls, please see the documentation at https://mednicklab.github.io/mednickDB/.

Testing our server endpoints

Explain how to run the automated tests for this system

Using Postman App

Download the Postman tool at https://www.getpostman.com/.
See details docs on sending requests using Postman at https://www.getpostman.com/docs/postman/launching_postman/sending_the_first_request.

Using Curl

Currently, no authentication is required. Exmaple call (your may have a different port number)

curl http://localhost:8000/getStudies

Should return a json object with seevral study names.

Deployment

Deployment docs will be provided for Ubuntu Server 16.04 LTS.

Built With

Frameworks:

  • Node.js - JavaScript runtime, using an event-driven, non-blocking I/O model.
  • Angular - AngularJS is a front-end framework for dynamic web apps.
  • Express.js - The de facto standard server framework for Node.js.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Stack Overflow
  • No seriously, Stack Overflow

About


Languages

Language:JavaScript 66.4%Language:HTML 21.7%Language:Python 8.7%Language:CSS 3.2%