robertkottelin / lims-rust

Laboratory Information Management System (LIMS) written in Rust for speed & saftey

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laboratory Information Management System (LIMS) written in Rusr with functionality to manage samples, analyses, instruments, and tests. The application includes several modules:

mod analysis; - This module handles operations related to the analysis entities, such as creating and retrieving them.

mod db; - This module is responsible for handling database connections and queries.

mod export; - This module is used for exporting data, possibly in different formats.

mod instruments; - This module handles operations related to instrument entities, such as adding and retrieving them.

mod inventory; - This module handles inventory management.

mod models; - This module defines the data models used in the application. It includes structs for entities such as Sample, Analysis, and Instrument.

mod qc; - This module handles quality control functions.

mod samples; - This module handles operations related to sample entities, such as adding and retrieving them.

mod tests; - This module deals with operations related to tests, like adding and retrieving tests.

mod users; - This module is used for managing user data, possibly including authentication and user roles.

The main function sets up logging, initializes the database, and starts an HTTP server. It defines routes for various operations such as getting a sample, adding a new sample, adding a new instrument, adding a new analysis, and adding a new test. Each route is associated with an asynchronous handler function that performs the required operation and responds to the HTTP request. The database connection is shared across all handler functions via Arc and Mutex, which allows safely sharing mutable state across multiple threads.

The handler functions make use of functions defined in the different modules to perform CRUD (Create, Read, Update, Delete) operations on the respective entities. The data for new entities is expected to be received as JSON in the body of a POST request.

Overall, this application demonstrates how Rust can be used to build a robust and efficient web application with a clear separation of concerns and strong type safety.

About

Laboratory Information Management System (LIMS) written in Rust for speed & saftey


Languages

Language:Rust 99.8%Language:Nix 0.2%