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.
RoleSolo Developer
CompanyColas
StackDjango + MSSQL
ComplianceNATA Certified
StatusProduction (V2 in progress)
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
Missing source code and documentation from departed developer
Licensing issues blocking any modifications to the C# application
No ability to integrate with modern third-party systems
Desktop-only—technicians needed iPad access in the field
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
Personalized dashboard with task management and lab switching
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.
Comprehensive equipment database with serial numbers and manufacturers
Calibration scheduling with quarterly, annual, or custom frequencies
Equipment manuals and documentation storage
Full calibration history and audit trail
Import/Export capabilities for bulk equipment updates
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-form pages for complex test data entry workflows
Automated calculations with formula validation
Non-conformance system to flag and track test issues
Excel template population and PDF report generation
Full revision history for audit compliance
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.
Single database, multiple lab tenants
State and lab-level access permissions
Personalized greetings showing current lab location
Cross-lab data visibility for managers
Lab-specific configuration and templates
Security & Compliance
Built with security as a priority: XSS protection, authentication, and granular
access control. Complete audit logging meets NATA requirements for traceability.
Cross-site scripting (XSS) protection
Role-based authentication and access control
Complete audit trail for all data changes
NATA compliance-ready logging
Dark mode UI reduces eye strain during long sessions
User Experience Features
The interface was designed with real laboratory workflows in mind:
Integrated Communication Tools
Bug Reports:
Users can submit bugs directly from the interface—no need for separate
ticketing systems
Workflow Improvements:
Technicians suggest process improvements through a built-in form
Improvement Reports:
Track suggestions and their implementation status
Login Announcements:
IT posts system messages visible on the home screen for
maintenance windows or updates
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
DjangoPythonMSSQLLibreOffice
Frontend
Vanilla JavaScriptHTML5CSS3Dark Theme
Security
XSS ProtectionCSRF TokensRole-Based Access
Compliance
NATA RequirementsFull Audit TrailRevision 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
classCustomLoginView(LoginView):
"""
Custom login view with enhanced error handling and logging.
"""template_name = "authentication/login.html"success_url = reverse_lazy("main:home")
form_class = loginForm
defform_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()
)
returnsuper().form_valid(form)
exceptDatabaseErroras 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."
)
returnself.form_invalid(form)
defform_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 wrongcustom_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 existcustom_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 errorform = self.get_form_class()(
data=self.request.POST,
request=self.request,
custom_error_message=custom_error_message
)
form.is_valid()
returnsuper().form_invalid(form)
defget_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:
React frontend:
Moving from vanilla JS to React for better state management and
component reuse
Responsive design:
Currently optimized for 1920×1080; V2 will be fully responsive
for iPad use in the field
Third-party integrations:
API layer for connecting to external laboratory systems
Enhanced reporting:
More flexible report templates and chart generation
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.