Enterprise Application

Lab Testing Management System

A full-scale laboratory information management system (LIMS) built for Colas. Handles test data, equipment tracking, compliance reporting, multi-lab operations, and real-time system monitoring—replacing a legacy system that had become unmaintainable.

Role Solo Developer
Company Colas
Stack Django + MSSQL
Compliance NATA Certified
Status Production (V2 in progress)
Colas Lab Management System Dashboard

The Challenge

The existing laboratory management system—a legacy C# application—had become a critical liability. The original developer had left, taking institutional knowledge with them. Worse, source files were missing and licensing issues meant the IT team couldn't update, patch, or extend the software.

Why a Rebuild Was Necessary

The business needed a complete rebuild: a web-based system accessible from tablets on-site, with proper audit logging for NATA compliance, and architecture that could grow with the organization's needs.

The Solution

I designed and built a comprehensive laboratory information management system from scratch using Django. The system handles everything from test data entry and equipment tracking to compliance reporting and real-time system monitoring. The interface features a clean dark theme optimized for long lab sessions and includes lab-switching capabilities for multi-site operations.

System Architecture
HTML/CSS/JS
Multi-form Pages
Dashboards
Django Views
Auth & Access Control
CSRF Protection
Complex Calculations
LibreOffice Integration
PDF Generation
MSSQL Database
Multi-Lab / Multi-State
Full Audit Log

Key Interface Views

Dashboard Home View

Personalized dashboard with task management and lab switching

Equipment Registry

Equipment registry with calibration tracking and scheduling

Key Features

Equipment Registry & Calibration

Complete equipment lifecycle management with categorized inventory, calibration scheduling, and maintenance tracking. Equipment can be filtered by type (Balances, Hotplates, Marshall equipment, etc.) with automatic reminders for calibration due dates.

Test Management & Reporting

Complete test workflow from sample registration through to report generation. The system handles complex calculations on test results for materials like asphalt, aggregate, binder, and filler.

Multi-Lab Architecture

Single MSSQL database serving multiple laboratories across different states (Yatala, Brisbane, and others). Users can seamlessly switch between labs with a dropdown, maintaining their authentication across locations.

Security & Compliance

Built with security as a priority: XSS protection, authentication, and granular access control. Complete audit logging meets NATA requirements for traceability.

User Experience Features

The interface was designed with real laboratory workflows in mind:

Integrated Communication Tools

Task Management System

Lab managers create tasks for technicians with categories for General work, Calibration schedules, and Training requirements. Tasks show "NEXT DUE" dates and can be marked complete, creating an accountability trail.

Technical Implementation

Backend

Django Python MSSQL LibreOffice

Frontend

Vanilla JavaScript HTML5 CSS3 Dark Theme

Security

XSS Protection CSRF Tokens Role-Based Access

Compliance

NATA Requirements Full Audit Trail Revision History

Custom login view with comprehensive error handling: This example shows how the system provides specific user feedback (wrong password vs. non-existent account), logs security events with IP addresses, and gracefully handles database failures—all critical for a production enterprise application.

authentication/views.py - Custom Login View
class CustomLoginView(LoginView):
          """
            Custom login view with enhanced error handling and logging.
            """
          template_name = "authentication/login.html"
          success_url = reverse_lazy("main:home")
          form_class = loginForm

          def form_valid(self, form):
          """Security check complete. Log the user in."""
          try:
          user = form.get_user()
          set_user_context(user)
          LOGGER.info(
          "User login successful - Username: %s, IP: %s",
          user.username,
          self.get_client_ip()
          )
          return super().form_valid(form)

          except DatabaseError as e:
          LOGGER.error(
          "Database error during login: %s",
          str(e),
          exc_info=True
          )
          form = self.get_form_class()(
          data=self.request.POST,
          request=self.request,
          custom_error_message="Login service
            temporarily unavailable."
          )
          return self.form_invalid(form)

          def form_invalid(self, form):
          """Handle failed login with specific error messages."""
          username = form.data.get('username', 'N/A')

          if form.non_field_errors():
          try:
          ColabsUser.objects.get(email=username)
          # User exists but password is wrong
          custom_error_message = "Incorrect
            password. Please try again."
          LOGGER.warning(
          "Failed login - Valid user, wrong password - IP: %s",
          self.get_client_ip()
          )
          except ColabsUser.DoesNotExist:
          # User doesn't exist
          custom_error_message = "No account
            found with this email."
          LOGGER.warning(
          "Failed login - Invalid username - IP: %s",
          self.get_client_ip()
          )

          # Re-instantiate form with custom error
          form = self.get_form_class()(
          data=self.request.POST,
          request=self.request,
          custom_error_message=custom_error_message
          )
          form.is_valid()

          return super().form_invalid(form)

          def get_client_ip(self):
          """Get client IP address, accounting for proxies."""
          x_forwarded_for = self.request.META.get('HTTP_X_FORWARDED_FOR')
          if x_forwarded_for:
          ip = x_forwarded_for.split(',')[0].strip()
          else:
          ip = self.request.META.get('REMOTE_ADDR', 'Unknown')
          return ip

Challenges & Solutions

Tight Timeline, Single Developer

The project had aggressive deadlines with just one developer (me). I made pragmatic decisions: vanilla JavaScript for V1 rather than a framework, prioritizing core functionality over polish. The architecture was designed to allow a React migration in V2 without a full rewrite.

Complex Multi-Form Pages

Laboratory workflows often require entering data across multiple related forms on a single page. I built a system for managing form state and validation across these complex interfaces without the benefit of a frontend framework.

Equipment Calibration Scheduling

Laboratories must track equipment calibration on varying schedules (quarterly, annual, or custom). The system automatically calculates next due dates, sends reminders, and maintains a complete calibration history for compliance audits.

Impact

100%
Legacy system replaced
Multi
Labs & states supported
NATA
Compliance achieved

The system successfully replaced the unmaintainable legacy application, giving the organization a modern, extensible platform. NATA compliance requirements are met through comprehensive audit logging, and the architecture supports future growth. The equipment registry alone has saved countless hours of manual tracking and spreadsheet management.

Version 2 Roadmap

V2 is currently in development, addressing limitations from the tight V1 timeline:

Note: This is an internal enterprise application built for Colas. While screenshots of the interface are shown, specific implementation details, proprietary calculations, and source code remain confidential per NDA requirements.

Interested in working together?

I'm open to discussing enterprise application development and complex system design.

Get In Touch