Configuration

Project Configuration

The Opencell BioHotel Lims uses a number of different data sources.

To start the project locally, first install the vercel cli as detailed above.

Data is stored in cloud firestore, create a project and generate a set of credentials which are needed for the following environment variables.

  • FIREBASE_PROJECT_ID=
  • FIREBASE_AUTH_DOMAIN=
  • FIREBASE_API_KEY=
  • FIREBASE_PRIVATE_KEY=
  • FIREBASE_CLIENT_EMAIL=
  • REACT_APP_FIREBASE_PROJECT_ID=
  • REACT_APP_FIREBASE_AUTH_DOMAIN=
  • REACT_APP_FIREBASE_API_KEY=

This will allow firebase to connect to your app.

The firestore database requires records in some of the following formats:

  • Users

    • email
    • role (set as empty or admin to enable admin view)
    • workflows (collection created by application)
      • createdAt
      • elements (JSON encoded string of the workflow graph)
      • id (autogenerated)
      • name
    • runs (collection created by application)
      • createdAt
      • id
      • owner (owning user ID)
      • status (string such as created)
      • workflow (id of workflow used for the run)
  • Cells (collection of cells)

    • blockIdentifier (unique readable name)
    • blockType (input, output, default determines cell join logic)
    • consumables (array)
      • merchandiseGid (shopify item variant id gid://shopify/Product/6679469129795)
      • minQuantity
    • cost: (number)
    • createdAt
    • id
    • owner (creating user)
    • primary (primary text)
    • secondary (secondary text)
    • secondaryDesc (description)
    • steptime (time for cell to run, number)
    • instances (collection)
      • labID (id of lab of cell)
      • reference (cell name or identifier)
      • availability (collection, different types booking or closure allows a continuous period of booking or recurring periods of bookings)
        • if BOOKING TYPE
          • createdAt
          • updatedAt
          • startDate
          • endDate
          • recordType == booking
        • IF CLOSURE TYPE
          • createdAt
          • updatedAt
          • startDate
          • endDate
          • recordType == closure
          • runningDays : string encoded bitmask of length 7 01111111
          • runningHours: string encoded bitmask of length 24 000001111111000000101110
          • runID
          • userID
  • Labs

    • createdAt
    • id (same as document ID)
    • name (string)
    • owner (creating user document ID)
  • Sensors

    • cellInstanceID
    • createdAt
    • id (same as document ID)
    • labID (ID of linked Lab by name)
    • owner (owning user document ID)
    • sensorID: name of Sensor e.g onewiresensor2 same as registered in IOT core
    • sensorType e.g tempprobe