Skip to content

Commit

Permalink
Merge pull request #10 from icure/update_template_to_cardinal
Browse files Browse the repository at this point in the history
update readme and template json
  • Loading branch information
aduchate authored Oct 8, 2024
2 parents 492bdb8 + 856ed5d commit 833806c
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 57 deletions.
43 changes: 23 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
<p>
<a href="https://docs.icure.com">
<img alt="icure-your-data-platform-for-medtech-and-ehr" src="https://icure.com/assets/icons/logo.svg">
</a>
<h1>iCure EHR-Lite React JS Template</h1>
![Cardinal logo](./template/src/assets/logo_for_readme.svg)

Start working on your e-health React JS app with iCure in a few minutes, by using our dedicated React JS template:
```
yarn create react-app my-icure-ehr-app --template @icure/cra-template-icure-ehr-lite
```
<h1>CardinalSDK React JS Template</h1>

Start working on your e-health React JS app with Cardinal in a few minutes, by using our dedicated React JS template:

```
yarn create react-app my-health-tech-app --template @icure/cra-template-icure-ehr-lite
```

Once your app is created, rename the file `.env.default` to `.env`, complete the values it contains:
Once your app is created, rename the file `.env.default` to `.env`, complete the values it contains:
- **REACT_APP_EXTERNAL_SERVICES_SPEC_ID**,
- **REACT_APP_EMAIL_AUTHENTICATION_PROCESS_ID** and/or **REACT_APP_SMS_AUTHENTICATION_PROCESS_ID**,
- **REACT_APP_PARENT_ORGANISATION_ID**,
- **REACT_APP_FRIENDLY_CAPTCHA_SITE_KEY**

And start your React app by executing
And start your React app by executing

```
cd my-icure-medtech-app && yarn start
cd my-health-tech-app && yarn start
```


Check out our [Quick Start](https://docs.icure.com/sdks/quick-start/) in order to know what are those information and how to get them from our [Cockpit Portal](https://cockpit.icure.cloud/).
Check out our [Quick Start](https://docs.icure.com/how-to/index) in order to know what are those information and how to get them from our [Cockpit Portal](https://cockpit.icure.cloud/).

*WARNING: Without these information, you won't be able to complete an authentication*

Not familiar with `create-react-app` ? Have a look to their [repository](https://github.com/facebook/create-react-apphttps://github.com/facebook/create-react-app).
Not familiar with `create-react-app` ? Have a look to their [repository](https://github.com/facebook/create-react-apphttps://github.com/facebook/create-react-app).

Looking for React Native template instead ? Head [here](https://github.com/icure/icure-medical-device-react-native-boilerplate-app-template).

Expand All @@ -38,20 +36,25 @@ Make sure the following tools are installed on your machine:
- [Yarn Package manager](https://yarnpkg.com/getting-started/install)


## Which technologies are used ?
## Which technologies are used ?
- [ReactJS](https://react.dev/)
- [Redux Toolkit](https://redux-toolkit.js.org/), as a state container
- [localForage](https://github.com/localForage/localForage), as an asynchronous Javascript storage
- [FriendlyCaptcha](https://friendlycaptcha.com/), as a CAPTCHA solution

We chosed this set of technologies, because we consider them as the most efficient ones to work with.
We chosed this set of technologies, because we consider them as the most efficient ones to work with.
Nonetheless, you can of course work with the technologies of your choices and still integrate the iCure MedTech Typescript SDK in your React JS app.


## What includes this template ?
- The [iCure EHR-Lite Typescript SDK](https://github.com/icure/icure-typescript-sdks/tree/main/packages/ehr-lite) dependency;
- A first implementation of the [iCure authentication flow](https://docs.icure.com/sdks/how-to/how-to-authenticate-a-user/how-to-authenticate-a-user) (Both registration and login).
- The [Cardinal SDK](https://github.com/icure) dependency;
- A first implementation of the [authentication flow](https://docs.icure.com/how-to/initialize-the-sdk/), both registration and login.


## What's next ?
Check out our [Documentation](https://docs.icure.com/) and more particularly our [How To's](https://docs.icure.com/how-to/index), in order to start implementing new functionalities inside your React JS App !


## What's next ?
Check out our [EHR-Lite Documentation](https://docs.icure.com/sdks/quick-start/react-js-quick-start) and more particularly our [How To's](https://docs.icure.com/sdks/how-to/index), in order to start implementing new functionalities inside your React JS App !
## Contact us:
- [Cardinal website](https://cardinalsdk.com/en)
- [Help Centre](https://icure.atlassian.net/servicedesk/customer/user/login?destination=portals)
80 changes: 57 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,62 @@
{
"name": "@icure/cra-template-icure-ehr-lite",
"main": "template.json",
"version": "0.0.4",
"keywords": [
"icure",
"ehr",
"ehr-lite",
"medical",
"react"
],
"description": "The base template to create your iCure React JS App.",
"files": [
"template",
"template.json"
],
"repository": {
"type": "git",
"url": "https://github.com/icure/icure-ehr-lite-react-js-boilerplate-app-template"
"name": "doctor-app-manual",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "concurrently --kill-others \"less-watch-compiler --config less-watcher.config.json\" \"react-scripts start\"",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"license": "MIT",
"engines": {
"node": ">=16"
"eslintConfig": {
"extends": "react-app"
},
"bugs": {
"url": "https://github.com/icure/icure-ehr-lite-react-js-boilerplate-app-template/issues"
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"packageManager": "[email protected]",
"dependencies": {
"@icure/cardinal-sdk": "^1.0.0-RC.1",
"@reduxjs/toolkit": "^1.8.1",
"antd": "^5.14.1",
"friendly-challenge": "^0.9.8",
"localforage": "^1.10.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.1",
"react-router-dom": "^6.10.0",
"react-scripts": "5.0.1",
"redux-persist": "^6.0.0"
},
"devDependencies": {
"@types/react": "^18.2.30",
"@types/react-dom": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^5.19.0",
"@typescript-eslint/parser": "^5.19.0",
"concurrently": "^8.2.2",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react": "^1.1.7",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^3.13.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"less": "^4.1.2",
"less-watch-compiler": "^1.16.3",
"lint-staged": "^12.3.7",
"prettier": "^2.6.1",
"pretty-quick": "^3.1.3",
"typescript": "^4.9.5"
}
}
6 changes: 6 additions & 0 deletions template.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"package": {
"scripts": {
"start": "concurrently --kill-others \"less-watch-compiler --config less-watcher.config.json\" \"react-scripts start\"",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"dependencies": {
"@icure/cardinal-sdk": "^1.0.0-RC.1",
"@reduxjs/toolkit": "^1.8.1",
Expand Down
32 changes: 18 additions & 14 deletions template/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<p>
<a href="https://docs.icure.com">
<img alt="icure-your-data-platform-for-medtech-and-ehr" src="https://icure.com/assets/icons/logo.svg">
</a>
<h1>iCure EHR-Lite React JS Template</h1>
![Cardinal logo](./src/assets/logo_for_readme.svg)

<h1>CardinalSDK React JS Template</h1>

Start working on your e-health React JS app with Cardinal in a few minutes, by using our dedicated React JS template:

Start working on your e-health React JS app with iCure in a few minutes, by using our dedicated React JS template:
```
yarn create react-app my-icure-ehr-app --template @icure/cra-template-icure-ehr-lite
yarn create react-app my-health-tech-app --template @icure/cra-template-icure-ehr-lite
```


Once your app is created, rename the file `.env.default` to `.env`, complete the values it contains:
- **REACT_APP_EXTERNAL_SERVICES_SPEC_ID**,
- **REACT_APP_EMAIL_AUTHENTICATION_PROCESS_ID** and/or **REACT_APP_SMS_AUTHENTICATION_PROCESS_ID**,
- **REACT_APP_PARENT_ORGANISATION_ID**,
- **REACT_APP_FRIENDLY_CAPTCHA_SITE_KEY**

And start your React app by executing

```
cd my-icure-ehr-app && yarn start
cd my-health-tech-app && yarn start
```


Check out our [Quick Start](https://docs.icure.com/sdks/quick-start/) in order to know what are those information and how to get them from our [Cockpit Portal](https://cockpit.icure.cloud/).
Check out our [Quick Start](https://docs.icure.com/how-to/index) in order to know what are those information and how to get them from our [Cockpit Portal](https://cockpit.icure.cloud/).

*WARNING: Without these information, you won't be able to complete an authentication*

Expand All @@ -44,13 +43,18 @@ Make sure the following tools are installed on your machine:
- [FriendlyCaptcha](https://friendlycaptcha.com/), as a CAPTCHA solution

We chosed this set of technologies, because we consider them as the most efficient ones to work with.
Nonetheless, you can of course work with the technologies of your choices and still integrate the iCure EhrLite Typescript SDK in your React JS app.
Nonetheless, you can of course work with the technologies of your choices and still integrate the iCure MedTech Typescript SDK in your React JS app.


## What includes this template ?
- The [iCure EHR-Lite Typescript SDK](https://github.com/icure/icure-typescript-sdks/tree/main/packages/ehr-lite) dependency;
- A first implementation of the [iCure authentication flow](https://docs.icure.com/sdks/how-to/how-to-authenticate-a-user/how-to-authenticate-a-user) (Both registration and login).
- The [Cardinal SDK](https://github.com/icure) dependency;
- A first implementation of the [authentication flow](https://docs.icure.com/how-to/initialize-the-sdk/), both registration and login.


## What's next ?
Check out our [EHR-Lite Documentation](https://docs.icure.com/sdks/quick-start/react-js-quick-start) and more particularly our [How To's](https://docs.icure.com/sdks/how-to/index), in order to start implementing new functionalities inside your React JS App !
Check out our [Documentation](https://docs.icure.com/) and more particularly our [How To's](https://docs.icure.com/how-to/index), in order to start implementing new functionalities inside your React JS App !


## Contact us:
- [Cardinal website](https://cardinalsdk.com/en)
- [Help Centre](https://icure.atlassian.net/servicedesk/customer/user/login?destination=portals)
34 changes: 34 additions & 0 deletions template/gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.env

.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

12 changes: 12 additions & 0 deletions template/src/assets/logo_for_readme.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 833806c

Please sign in to comment.