Step 2 - Understand the project
Check out the folder structure
Open up the lightyear-integrations
project with your IDE and familiarize yourself with the key files in the directory structure.
Understand the project structure
Main entry point: src/index.ts
This is the main entry point for the project. It defines the integration and its configuration.
Task management collection: src/taskManagement/index.ts
A collection serves as a canonical representation of data that needs to be synchronized across multiple applications.
At its core, a collection defines one or more models—essentially, the structures that represent the various types of information within the collection. These models can include schemas that enforce data integrity every time new information is written, ensuring consistency and accuracy throughout the system.
Additionally, collections support the use of matching rules. These rules are instrumental in merging data from different systems when appropriate. For example, when a contact appears in several systems, an email address can be used as a matching criterion to unify and deduplicate records.
TodoApp integration: src/todoApp/index.ts
This is the entry point for the TodoApp integration
It defines the custom app and the sync integration.
Task model connector: src/todoApp/TaskModel.ts
A model connector is a TypeScript class that synchronizes data between an app and a specific model within a collection. Its purpose is to handle the reading and writing of data for a particular data model within a sync integration.
TodoApp sync connector: src/todoApp/TodoApp.ts
A sync connector is a TypeScript class that defines the method of data exchange between your integration and an external application.