Skip to content

Backend

The backend layer handles all communication with external systems and exposes utilities consumed by the services layer.

ModuleResponsibility
config.pyLoads and exposes application configuration
database.pyPostgreSQL connection pool and query helpers
fetch_experiment_ids.pyLightweight query for available experiment IDs
generic.pyShared utility functions (transformation, formatting)
logger_config.pyCentralised setup_logger() factory
ml.pyFeature preparation and input validation for ML models
model_handler.pyDispatches inference requests to the correct model
model_io.pySerialises and deserialises model artefacts from disk
prediction_db.pyPersists sensor readings and prediction results
websocket.pyWebSocket client with paginated batch fetching