LIMS (Laboratory Information Management System) is a software solution designed to manage, track, and automate various laboratory processes and data.
It helps laboratories handle everything from sample registration and test tracking to data storage, report generation, and quality control.
- Sample Management – Track samples throughout their lifecycle.
- Test & Result Tracking – Manage experiments, results, and approvals.
- User & Role Management – Ensure secure access control.
- Inventory Management – Monitor lab supplies and equipment.
- Automated Reporting – Generate and export lab reports easily.
- Audit Trails – Maintain full traceability and compliance with lab standards.
This is the backend service for the E-LAB project, built with Nest.js and TypeScript, and utilizing Docker for containerization and Prisma for database management.
- Node.js LTS (At least 20+)
- Docker
- Docker Compose
- Prisma CLI
-
Clone the repository:
git clone https://github.com/Quantori-Academy/elab-be.git
-
Navigate to the project folder:
cd elab-be -
Install the dependencies:
npm install
-
Set up the environment variables:
Create a
.envfile based on.env.exampleand provide the necessary configurations (database, ports, etc.). You can use your own values for local container with your own DB, or ask Azat for creds of DEV DB.
-
Using Docker (Recommended):
Use Docker to run the application in a containerized environment:
docker-compose up --build
-
Running Locally:
Alternatively you can run the application locally:
npm run start:dev
Don't forget to run Docker container with DB.
If you have issues with Docker you should run DB locally and populate
.envfile with corresponding values.
-
Unit Tests:
npm run test
The E-LAB backend follows a layered architecture for scalability and maintainability:
-
Prisma Layer: Manages database schemas, migrations, and interactions using Prisma ORM.
-
Modules Layer: Each module contains components related to specific features or functionalities.
2.1 Controller: Handles HTTP requests, processes them, and returns responses.
2.2 Service: Contains business logic, coordinates between controllers and the data layer.
2.3 DTOs and Validators: Ensure data integrity across layers.
2.4 Interfaces: Define the shape of data and objects used throughout the application.
-
Common Layer: Contains shared configs, decorators, guards, dtos, interfaces, pipes, services, and reusable components accessible across different modules.
- Modular Architecture: Organize code into feature-based modules.
- Dependency Injection: Use DI for managing services.
- Validation: Implement pipes and DTOs for data validation.
- Exception Handling: Use global filters for error management.
- Security: Protect routes with authentication and secure headers.
- Testing: Write unit using Jest.
Use the following Git flow for the development
https://nvie.com/posts/a-successful-git-branching-model/
In a nutshell, when you would like to start your work do the following:
- Create feature branch
- Complete your work
- Push feature branch (you can squash it if you would like to) and open PR to
develop - When PR is approved by at least mentor and 2 students, merge it to
develop