Copyright (C) 2023 Michigan State University
This package is part of CIAS 3.0.
CIAS 3.0 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
CIAS 3.0 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with CIAS 3.0. If not, see https://www.gnu.org/licenses/gpl-3.0.html.
CIAS 3.0 platform source code is divided into two separate repositories:
- Frontend package - current
- Backend package
CIAS stands for Computerized Intervention Authoring System. CIAS gives you the ability to create and manage multi-session interventions without writing a single line of code. With this robust platform, you can develop and deliver interventions, collect data, and collaborate with colleagues all in one place.
The CIAS platform has a variety of features to support a broad range of interventions and approaches, including:
- Variety of question types to choose from
- An animated narrator to act as a guide
- The ability to speak out loud using high-quality text to speech
- Optional quick exit feature for participant safety
- Automatic translation into over 100 languages
- Tailored reports for participants and clinicians
- Custom and tailored SMS messaging
- Branching and Randomization
- Synchronous natural language reflections and summaries
- Scheduled session sending
- Custom charts for data visualisation
- HIPAA and WCAG 2.0 compliant
- Timeline Followback Method Assessment (TLFB)
- Secure Live chat connecting participants with a peer, CHW, BHC, etc.
- Integrations with 3rd party systems:
- CAT-MHTM
- Epic on FIHR (forthcoming)
For more information about CIAS 3.0 features please see https://www.cias.app.
Our goal is for cost to never be a barrier. This code is available to anyone at no cost. Further, Michigan State University currently provides an instance of CIAS 3.0 that is available at low or no cost for non-commercial use by researchers at universities or non-profit research institutions. Immediate access is always provided without charge and without paperwork, and CIAS remains free for unfunded projects. (edited)
*A small annual fee will be requested for funded projects.
For more information, or to request access to the MSU instance of CIAS, please see https://www.cias.app/ or contact CIAS@msu.edu
This is a frontend package only. For CIAS to work, you need the backend package too. You can find it on GitHub here. Follow the instructions there to set up the backend project first.
Node.js
(v14 or later)*- compatible
npm
version (v6 or later)*
*we suggest using node.js version management utility, for instance nvm
- Clone or download the repository
- Go into the root directory of the project
- Copy the contents of
.env.example
to.env
(create this file) - (Optional) Adjust environmental variables in that exists in
.env
- (Optional) Run
npm install
to install all required dependencies => run only the first time or when dependencies change - Run
npm start
to run the project. When you see a command "webpack built ..." the project is ready - Open http://localhost:4200 (by default) in the internet browser
- If you have the backend project set up too, you can start using CIAS 3.0. If you seeded the database while setting up the backend project, you can now log in to one of the accounts that has been automatically created. Please see documentation of the backend project for more information
- Open Cypress dashboard
npm run cy:open
- Run Cypress tests
npm run cy:test
To name colors in the source code, please do not use custom, made-up names and let's use some kind of color name detector. There are many detectors, so to have uniform results let's use that one: COLOR NAME DETECTOR as it shows not only the name, but also the group/hue of a color (useful when there are similar colors).
To render HTML elements use interweave
library. See DOCS. It safely renders HTML
elements (tries to protect against XSS).
A tool for creation of responsive html templates. It handles gotchas of most modern and known email clients.
Take a look at official documentation.
3 examples can be found in mjml/examples
directory. Each of them introduce new features, so they should be checked in
this order : MjBasicComponent
, MjImageText
, MjLayout
.
For more complex examples, have a look at standard MJML components code such as mj-carousel.
A step-by-step tutorial is available here .
- Go into
mjml
directory npm install
inside- Add your components inside
components
folder - Components have to be added in
.mjmlconfig
- Use your own component in
templates/*.mjml
npm run build
to build, ornpm start
if you want to watch recompile on change you make (to your component or totemplates/*.mjml
)- The result will be outputted in
html/*.html
- Generated htmls are in
mjml/html
directory
- no-button
- with-button
- with-button-and-other-information
- with-button-and-description
- with-button-and-other-information-and-description
For easier maintaining and searching for proper sections and variables, there are tags in .html
files:
LOGO START
andLOGO END
HEADER START
andHEADER END
MAIN-TEXT START
andMAIN-TEXT END
BUTTON START
andBUTTON END
FOOTER START
andFOOTER END
OTHER INFORMATION START
andOTHER INFORMATION END
DESCRIPTION START
andDESCRIPTION END
no-button
:{HEADER_TEXT}
,{MAIN_TEXT}
,{FOOTER_TEXT}
,with-button
:{HEADER_TEXT}
,{MAIN_TEXT}
,{BUTTON_TEXT}
,{BUTTON_URL}
,{FOOTER_TEXT}
,with-button-and-other-information
:{HEADER_TEXT}
,{MAIN_TEXT}
,{BUTTON_TEXT}
, **{BUTTON_URL}
**,{FOOTER_TEXT}
,{DESCRIPTION}
,with-button-and-description
:{HEADER_TEXT}
,{MAIN_TEXT}
,{BUTTON_TEXT}
,{BUTTON_URL}
, * *{FOOTER_TEXT}
**,{OTHER_INFORMATION}
,with-button-and-other-information-and-description
:{HEADER_TEXT}
,{MAIN_TEXT}
,{BUTTON_TEXT}
, * *{BUTTON_URL}
**,{FOOTER_TEXT}
,{DESCRIPTION}
,{OTHER_INFORMATION}
,
In all templates there is a common {LOGO_URL}
variable.
You will need to add proper html tags with styles to style inline text within email variables. For example, MAIN_TEXT variable can be:
You have been invited to <span style='color: #c866ea;'>Screening Test</span>.
To add a new line inside a text block (eg. MAIN_TEXT), please add a double break, for example:
You have been invited to <span style='color: #c866ea;'>Screening Test</span>.<br /><br />Click below to start the session.
There is template.html
with all the sections etc. and sample_template.html
file to show example of a report.
Michał Grzelak |
Piotr Sokoliński |
Michał Śnieć |
Jakub Zygmunt |
Sebastian Flejszman |
Bartosz Kępka |
Klara Jędrzejewska |
Maciej Górski |