This project is a digital twin system that integrates various components for simulation, data integration, and machine learning. It is built using FastAPI for the backend and a frontend dashboard.
backend/
.env
api/
rest/
v1/
auth/
jwt.py
core/
auth.py
config.py
data_integration/
collectors/
pipeline/
storage/
db/
crud.py
database.py
init_db.py
Dockerfile
main.py
middleware/
compliance.py
ml/
pipeline.py
modeling/
physiological/
models/
schemas/
security/
simulation/
digital-twin-system/
backend/
frontend/
docker-compose.yml
frontend/
.env
dashboard/
package.json
src/
report.md
requirements.txt
venv/
bin/
include/
lib/
lib64
pyvenv.cfg
The backend is built using FastAPI and includes various modules for handling authentication, data integration, machine learning, and simulation.
- Authentication: JWT-based authentication is implemented in
jwt.pyandauth.py. - Data Integration: Collects and processes data from various sources. Key files include:
collectorspipelinestorage
- Machine Learning: Handles ML model pipelines in
pipeline.py. - Modeling: Physiological models are implemented in
physiological. - Simulation: Simulation engine and endpoints are in
simulation. - Middleware: Compliance middleware for security headers and logging in
compliance.py.
-
Simulation: Run simulations for patients.
simulation.py
-
Data Integration: Collect and retrieve patient data.
data_integration.py
Configuration settings are managed in config.py.
Database initialization and CRUD operations are handled in:
init_db.pycrud.pydatabase.py
To run the backend, use Docker:
docker-compose up --buildAlternatively, you can run it locally:
cd backend
pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 8000 --reloadThe frontend is a dashboard built with modern web technologies.
To run the frontend, navigate to the frontend directory and use npm:
cd frontend
npm install
npm startActivate the virtual environment using the provided script:
source venv/bin/activateFor PowerShell:
.\venv\bin\Activate.ps1Check the health of the backend service:
curl http://localhost:8000/healthThis project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please see the CONTRIBUTING file for more information.
For any inquiries, please contact the project maintainers.
This README provides an overview of the project structure, key components, and instructions for running the backend and frontend services.