https://github.com/cloudmrhub/camrie-app

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
Last synced: 10 months ago · JSON representation

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
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

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

  1. Overview
  2. Architecture
  3. Setup Instructions
  4. Templates Workflow
  5. APIs & Routes
  6. Services
  7. License
  8. Versions

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 execution
    • user-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

  1. Clone the repository: bash git clone https://github.com/cloudmrhub/camrie-app.git cd camrie-app/backend

  2. Configure AWS CLI with your profile: bash aws configure --profile nyu

  3. Build 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 Authorization header)

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 (muscle Docker) & 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 version
  • v1: Backend-only infrastructure
  • v1.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

GitHub Events

Total
  • Member event: 2
  • Push event: 26
  • Create event: 2
Last Year
  • Member event: 2
  • Push event: 26
  • Create event: 2

Dependencies

backend/calculate/src/muscle/Dockerfile docker
  • public.ecr.aws/lambda/python 3.10 build
backend/calculate/src/muscle/requirements.txt pypi
  • boto3 *
  • jsonpickle *
  • numpy *
  • requests *
requirements.txt pypi
  • boto3 *
  • botocore >=1.31,<1.32
  • h5py *
  • numpy *
  • pandas *
backend/frontend/downloadRequestFunction/package.json npm
  • aws-sdk ^2.749.0 development
  • axios ^1.5.1
  • ssl-root-cas ^1.3.1
  • uuid ^9.0.1
backend/frontend/getSignedURL/package.json npm
  • aws-sdk ^2.749.0 development
  • axios ^1.5.1
  • ssl-root-cas ^1.3.1
  • uuid ^9.0.1
backend/frontend/uploadFinalize/package.json npm
  • aws-sdk ^2.749.0 development
  • axios ^1.5.1
  • ssl-root-cas ^1.3.1
  • uuid ^9.0.1
backend/frontend/uploadInit/package.json npm
  • aws-sdk ^2.749.0 development
  • axios ^1.5.1
  • ssl-root-cas ^1.3.1
  • uuid ^9.0.1
backend/APIs/queue-job-python/requirements.txt pypi
  • requests *
backend/APIs/user-authorizer-python/requirements.txt pypi
  • requests *
  • urllib3 <2.0
backend/ark/requirements.txt pypi
  • requests *
backend/calculate/src/vertebra/requirements.txt pypi
backend/frontend/data-access-python/requirements.txt pypi
  • requests *
  • urllib3 <2.0
backend/frontend/delete-job-python/requirements.txt pypi
  • requests *
backend/frontend/getZip/requirements.txt pypi
  • requests *