Skip to content

ritza-co/bryntum-gantt-react-appwrite-rest-api-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Bryntum Gantt Node.js REST API Appwrite Function

Appwrite collections required

A database with two collections for Bryntum Gantt tasks and dependencies. The tasks collection needs to have attributes that match the Bryntum Gantt Task Model fields, which represent a Bryntum Gantt task. The dependencies collection needs to have attributes that match the Bryntum Gantt Dependency Model fields, which represent a Bryntum Gantt dependency.

🔒 Environment Variables required

Set the following environmental variables on the function page in your Appwrite console:

  • PROJECT_ID
  • DATABASE_ID
  • TASKS_COLLECTION_ID
  • DEPENDENCIES_COLLECTION_ID

Authentication

Authenticated requests to this Appwrite function require a JSON Web Token, created using Appwrite JWT authentication, in the request's "authorization" header. This authentication makes sure that only logged in users can view or change data. The client side Bryntum Gantt needs to set up Appwrite authentication so that when a user logs in, a session is created using the Appwrite client SDK. The JWT can be created using the session and added to the "authorization" header when making requests to this function.

🧰 Usage

GET

Returns tasks and dependencies data. The returned response uses the load response structure expected by a Bryntum Gantt Crud Manager load request.

POST

Handles POST requests from Bryntum Gantt Crud Manager sync requests. It includes changes for all the linked data stores in a single request, which has a specific sync request structure. The response has a specific sync response structure that sends the new id of a record created in Appwrite if a record is created. This makes sure that the client side Bryntum Gantt has the correct id for the record.

⚙️ Configuration

Setting Value
Runtime Node (18.0)
Entrypoint src/main.js
Build Commands npm install
Permissions any
Timeout (Seconds) 15

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published