Skip to content

mrfarstad/pu-sleep-analysis

Repository files navigation

Sleep analysis

Group 16 - TDT4140; sleep analysis

About

In the subject Software Development TDT4140, is the task to create an infrastructure for Smart Life and Health. We have created an application to analyze sleep. Sleep Analysis is an application for gathering data concerning health, with a focus on sleep, but also including information on walking and heart rate. We want to examine the correlation between these health aspects, and how sleep can be improved.

This project consists of three main parts: The API, the client application and a data exporter. The API is based on GraphQL, an API-level query language. It is implemented using graphql-java together with jetty://. The client application is written in java, utilizing JavaFX. The data exporter is written in golang

To store persistent data we use MongoDB. For development purposes it is possible to use it via a simple docker container. We currently use (and provide docs with) docker-compose to do this as easy as possible.

Getting started

Services

The list of required services, and their setup can be found inside the docker-compose.yml-file. This is currently only mongodb, used for storage.

$ docker-compose up -d

Build project

Using the command line, the project can be built using maven:

$ mvn -f tdt4140-gr1816/pom.xml install

To build the docker image for production, use the following command (see Dockerfile for more information)

$ docker build -t gruppe16/gruppe16 .

Run API

$ mvn -f tdt4140-gr1816/app.api/pom.xml jetty:run

When the API is running, open http://localhost:8080 to open the API explorer. The API explorer allows the user to discover what the API provides, and works like simple sandbox for testing. This makes the API more or less self explanatory.

When running in production, we recommend to use docker. An example setup can be found inside the production-example folder.

Build and run UI

$ mvn -f tdt4140-gr1816/app.ui/pom.xml clean compile assembly:single
$ cd tdt4140-gr1816/app.ui
$ java -jar target/tdt4140-gr1816.app.ui-0.0.1-SNAPSHOT-jar-with-dependencies.jar

Code formatting

We use google-java-format to format the source code. There is a custom plugin for eclipse here

To format the code, run the following command:

$ mvn fmt:format

To verify the code formatting and other metrics, we use maven:

$ mvn verify

Data exporter

More information about the data exporter can be found insde the fitbit-exporter folder.

Dependencies

Roles

  • Scrum master: Ole Kristian Vingdal
  • Developer & QA Lead: Martin Rebne Farstad
  • Developer: Anders Ottersland Granås
  • Developer: Sondre Grav Skjåstad
  • Developer: Ingeborg Sætersdal Sollid
  • Developer: Odin Ugedal
  • Developer: Mathias Wahl

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published