How bihealth/digestiflow-server works
Main Components
• Web Application Server:
• Django project (including manage.py, the settings in config/settings, and the main URL routing in config/urls.py and config/wsgi.py).
• That each app has its own models, views, forms, templates, APIs (with subdirectories named “api”) and administrative interfaces.
• REST API Layer:
• That the same Django application exposes REST API endpoints (located in the api directories of each app) that handle external communications and integrate with the Digestiflow CLI and Demux projects.
• Database:
• Central database component (typically a SQL database such as PostgreSQL) that holds flow cell, library, and user data.
• Background Processing:
• Celery worker setup, indicated by the config/celery.py file and task modules (e.g., tasks in fileboxes and flowcells).
• That the Celery system processes asynchronous tasks (such as notifications, demultiplexing triggers, or email delivery using templates from the mails folders).
• Static Assets & Frontend Resources:
• That an Nginx (or similar) reverse proxy (configured in docker/config/nginx) is used in the Docker deployment for serving static files and forwarding requests to the Django application.
• External Integration Points:
• Connectivity to external tools:
• Digestiflow CLI: which extracts metadata and automatically registers new flowcells.
• Digestiflow Demux: which uses sample sheets from the server to run the demultiplexing process.
Component Interactions
• Web Clients (Browsers):
• Users interact with the web UI served by the Django application.
• Bi-directional data flow between the web client and the REST API when performing operations like creating or updating flow cell records.
• API Communication:
• Background Services:
• Data Persistence:
Architectural Patterns and Design Principles
• Modularity via Django Apps:
• That functionality is divided into distinct apps (barcodes, fileboxes, flowcells, sequencers) for separation of concerns.
• Use of Standard MVC/MVT:
• How models, views, and templates form the basis of the web UI and REST API responses.
• Asynchronous Processing:
• Presence of Celery for background task handling.
• RESTful API Design:
• Specify that the API layer is used both for external client interactions (Digestiflow CLI and Demux) and internal integrations.
Relevant Technologies and Frameworks
• Python and Django Framework:
• Django project structure including settings, URLs, and the management commands.
• Celery:
• Docker:
• That Docker (including the provided Dockerfile, docker-entrypoint, and Nginx configurations) is used for deployment.
• Frontend Resources:
• Mention static files management (CSS, JavaScript, and templates) as part of the UI layer.
• Testing and Continuous Integration:
• Existence of tests in various apps and CI configuration files (.travis.yml, .gitlab-ci.yml).
Detail the Essential Architectural Elements
• Precisely show how the different Django apps (barcodes, fileboxes, flowcells, sequencers) are integrated under a single project.
• Layered design: presentation layer (templates/static files), application layer (Django views and API), service layer (Celery, CLI interactions), and the persistence layer (database).
• Where external scripts (e.g., management commands and shell scripts in the utility directory) fit into the deployment or operational lifecycle.