Code Monkey home page Code Monkey logo

example's Introduction

Aidbox example

Project structure

  • app - Aidbox app
  • mobile - React Native iOS app

Mobile - Aidbox mobile example app

App - Aidbox extend app

  • Creates a patient upon registering a new user
  • A simple implementation of FHIR Argo-Scheduling

Deployment

  • Create a new box in https://aidbox.app or set up an Aidbox.Dev on your localhost

  • Prepare Aidbox

    • In Aidbox console open section Auth Clients
    • Click New button
    • Insert this code and click to Save button
      secret: my-super-secret
      first_party: true
      grant_types:
        - client_credentials
        - basic
      id: fullstack-app
      resourceType: Client
      
    • Open section Access Control
    • Click New button
    • Insert this code and click Save button
      link:
        - id: fullstack-app
          resourceType: Client
      engine: allow
      id: fullstack-app
      resourceType: AccessPolicy
      
  • Deploy

    • Insert all information
  • Go to Users console on Aidbox and create a new user as shown below:

name:
  formatted: Test User
  givenName: Test
  familyName: User
email: [email protected]
password: test
id: test
resourceType: User
  • Go to REST console and type in GET /Patient, a new patient should be created
  • Go back to Users console, select the created user and check if it's updated with a patient reference like:
data:
  patient: Patient/<patient_id>

Run locally

  • Clone the App directory to your local machine
git clone https://github.com/Aidbox/example/tree/master/app
  • Create a .env file from env-tpl
cp env-tpl .env
  • Set all variables in a similar fashion:
export APP_INIT_URL=http://localhost:8888  //your Aidbox server URL
export APP_CLIENT_ID=fullstack-app              
export APP_CLIENT_SECRET=my-super-secret
export APP_URL=http://localhost:3000
export APP_SECRET=123456789
export PORT=3000
  • You might need to run
source .env

additionally and/or give your full local IP instead of "localhost"

  • Run this command to start the app
npm start

example's People

Contributors

mike1pol avatar thezorkij avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.