https://github.com/cloudmrhub/camrie-app
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.5%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: cloudmrhub
- License: mit
- Language: Python
- Default Branch: main
- Size: 537 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
readme.md
CAMRIE Backend
This repository contains the backend services and infrastructure templates for CAMRIE (Cloud-Accessible MRI Emulator), a cloud-based simulator that enables remote execution of MRI simulations using a web-based interface.
Table of Contents
Overview
CAMRIE is a web-based MRI simulator built for rapid and accessible evaluation of new MRI technologies.
It integrates both a cloud-native backend and a React frontend, enabling simulations from any device.
Simulations are executed remotely via AWS Lambda functions and stored centrally for further analysis and sharing.
Architecture
The backend is organized into modular stacks using AWS SAM and CloudFormation. The key components are:
- Fields: Upload and manage magnetic field configurations
- Sequences: Upload and manage pulse sequence configurations
- Calculate: Run simulations (e.g., vertebra, muscle) via Lambda containers
- ARK: Core infrastructure templates
- APIs:
queue-job-python: Handles job queuing and executionuser-authorizer-python: Manages user authentication and access control
- Frontend: Interfaces with backend to allow interactive simulation setup and result visualization
- Amplify: Manages deployment of the frontend
Project Structure:
project-root/
├── fields/
│ └── template.yaml
├── sequences/
│ └── template.yaml
├── ark/
│ └── template.yaml
├── calculate/
│ ├── template.yaml
│ ├── src/
│ │ ├── muscle/
│ │ │ └── Dockerfile # For RunJobFunction
│ │ └── vertebra/
│ │ └── task.py # For DownloadDataFunction
├── APIs/
│ ├── template.yaml
│ ├── queue-job-python/
│ └── user-authorizer-python/
├── frontend/
│ └── template.yaml
├── amplify/
│ └── template.yaml
└── template.yaml # Root template
Setup Instructions
Prerequisites
- Python: 3.8+
- Docker: Required for Lambda container builds
- AWS CLI: Configure your AWS credentials
- AWS SAM CLI: For building and deploying the infrastructure
- jq: For JSON parsing (used in helper scripts)
Installation
Clone the repository:
bash git clone https://github.com/cloudmrhub/camrie-app.git cd camrie-app/backendConfigure AWS CLI with your profile:
bash aws configure --profile nyuBuild and deploy with SAM:
bash sam build --use-container --profile nyu sam deploy \ --stack-name camrie-app \ --profile nyu \ --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND \ --resolve-image-repos
Templates Workflow
Each directory under backend/ is a standalone SAM application. The root template.yaml composes them via AWS::Serverless::Application:
- fields/ → field uploads & DynamoDB
- sequences/ → sequence uploads & DynamoDB
- ark/ → result‐notification, bucket lifecycle, UpdateJobFunction
- calculate/ → Step Functions + Lambdas (DownloadData, RunJob)
- APIs/ → API Gateway + Lambdas (QueueJob, UserAuthorizer)
- frontend/ → upload/download UI APIs
- amplify/ → React GUI deployment
Use sam build and sam deploy to wire parameters (bucket names, ARNs, endpoints) between them.
APIs & Routes
Control API (APIs/template.yaml)
- POST /pipeline → QueueJobFunction (enqueue a new simulation)
- DELETE /pipeline → DeleteJobFunction (cancel a job)
- secured by UserAuthorizerFunction (JWT in
Authorizationheader)
Exports:
• ${StackName}-QueueJobApi
• ${StackName}-ApiId
• ${StackName}-UserAuthorizerFunctionARN
Frontend API (frontend/template.yaml)
Routes for data management & results:
- GET /readdata → DataReadFunction
- GET /deletedata → DeleteFileFunction
- POST /updatedata → UpdateFileFunction
- POST /uploads → UploadRequestFunction
- POST /uploadinitiate → UploadInitiateFunction
- POST /uploadresultsinitiate → UploadResultsInitiateFunction
- POST /uploadfinalize → UploadFinalizeFunction
- POST /uploadresultsfinalize → UploadResultsFinalizeFunction
- GET /downloads → DownloadRequestFunction
- POST /unzip → GetZipFunction
Exports:
• ${StackName}-DataReadApi
• ${StackName}-DeleteFileApi
• ${StackName}-UpdateFileApi
• ${StackName}-UploadRequestApi
• ${StackName}-UploadInitiateApi
• ${StackName}-UploadResultsInitiateApi
• ${StackName}-UploadFinalizeApi
• ${StackName}-UploadResultsFinalizeApi
• ${StackName}-DownloadRequestApi
• ${StackName}-GetZipApi
• ${StackName}-FrontendAPI
Services
- S3 buckets & DynamoDB tables for fields & sequences
- Step Functions for workflow orchestration (
calculate/template.yaml) - Lambda containers for compute (
muscleDocker) & data prep (vertebra/task.py) - Notification & UpdateJobFunction in
ark/template.yaml - API Gateway + UsagePlan (
test/usageplan/template.yaml) - React frontend deployed via Amplify (
amplify/template.yaml)
License
This project is licensed under the MIT License.
Versions
dev: Nightly development versionv1: Backend-only infrastructurev1.1: Full backend + frontend deployed with Amplify
Dr. Eros Montin, PhD
46&2 just ahead of me!
Owner
- Name: Cloud MR
- Login: cloudmrhub
- Kind: organization
- Email: support@cloudmrhub.com
- Website: www.cloudmrhub.com
- Repositories: 1
- Profile: https://github.com/cloudmrhub
GitHub Events
Total
- Member event: 2
- Push event: 26
- Create event: 2
Last Year
- Member event: 2
- Push event: 26
- Create event: 2
Dependencies
- public.ecr.aws/lambda/python 3.10 build
- boto3 *
- jsonpickle *
- numpy *
- requests *
- boto3 *
- botocore >=1.31,<1.32
- h5py *
- numpy *
- pandas *
- aws-sdk ^2.749.0 development
- axios ^1.5.1
- ssl-root-cas ^1.3.1
- uuid ^9.0.1
- aws-sdk ^2.749.0 development
- axios ^1.5.1
- ssl-root-cas ^1.3.1
- uuid ^9.0.1
- aws-sdk ^2.749.0 development
- axios ^1.5.1
- ssl-root-cas ^1.3.1
- uuid ^9.0.1
- aws-sdk ^2.749.0 development
- axios ^1.5.1
- ssl-root-cas ^1.3.1
- uuid ^9.0.1
- requests *
- requests *
- urllib3 <2.0
- requests *
- requests *
- urllib3 <2.0
- requests *
- requests *