# System Architecture

## Overview

![iMicrobe Architecture Diagram](https://2533512947-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LM8xv-VWl84e_JoDuL_%2F-LSG8aRckixnYM4wSQIJ%2F-LSG94pzR0Y0o_Y6OLN0%2FiMicrobe%20Architecture%20Diagram.png?alt=media\&token=a65b996f-a0ed-4efc-b1d8-cd6df946fd25)

iMicrobe is composed of a frontend (client-side) and backend (server-side).  The frontend is written in Elm, a purely functional programming language that emphasizes a simple framework for creating robust websites and web apps. Web frameworks such as Elm allow for a clear division of responsibility, where the server provides a simple RESTful API to the data or functionality, and the client handles rendering and the user interface.  The client-side also interacts with the CyVerse federated cyberinfrastructure through the Agave API to access XSEDE compute resources at Texas Advanced Computing Center (TACC) including Stampede2 that provides scientists access to over 18 petaflops of compute power. Importantly, iMicrobe can plug-in to any compute resource or data framework using this integrated architecture to collect and aggregate data from multiple locations or scale compute resources. Because Elm promotes best practices by requiring strict data types, type-errors can be avoided in data integration, making it possible for multiple developers to rapidly and simultaneously refactor code across resources. iMicrobe uses Elm to develop a robust-reusable code-base that can be coupled with shared resources in the community.  The backend, server-side API written in Node.js includes databases (MySQL and MongoDB) for rapidly indexing data to fuel user-searchers.

This infrastructure makes it possible for users, armed only with a web-browser, to explore highly connected ‘omics data using complex queries. Moreover, they can apply these services to their own data, and access community developed and driven tools and compute resources. This modern framework can be employed by outside developers to create front end applications for alternate data visualizations and integration through the iMicrobe API.

The iMicrobe platform is built using free, open-source software including:

* [Elm](https://elm-lang.org/) / Javascript
* Node.js
* Python
* Rust
* MySQL
* MongoDB
* [Singularity](https://www.sylabs.io/)
* [D3](https://d3js.org/)

iMicrobe is a [Powered by CyVerse](https://www.cyverse.org/powered-by-cyverse) project and relies on the following CyVerse resources:

* OAuth2 authentication
* [Data Store](https://www.cyverse.org/data-store)
* [Agave API](https://agaveapi.co/)
* [TACC Stampede2](https://www.tacc.utexas.edu/systems/stampede2)

## Source code

iMicrobe is a free, open source project. &#x20;

Source code is available on GitHub:

* Frontend:  [https://github.com/hurwitzlab/elm-imicrobe-spa](https://github.com/hurwitzlab/elm-imicrobe-spa)
* Backend:  [https://github.com/hurwitzlab/node-imicrobe](https://github.com/hurwitzlab/node-imicrobe)
