Skip to content

Strapi Schema/Data Import #267

@fvanderflier

Description

@fvanderflier

Currently we have some implementation of importing a schema for Strapi. This should be revisited and re-done though, by creating our own schema. This way, we can kill three birds with one stone:

  1. Ease Content-Type management frontend code by returning the whole schema instead of taking information from different api endpoints.
  2. Allow AI features, like prompting for whole api creation that will be built on top of our schema.
  3. Better control for translation of different Strapi schema versions - instead of handling code generation from different Strapi schema versions, we can create translate these versions into our own schema, and thus manage a bit less complex code instead of the code generation.

For Data import:

  • At this moment we need to define the strategy.
    • pgdump can be good enough but we need to check the way Strapi stores and uses the DBMS and probably adapt our models.
    • Another option would be to connect to the Strapi instance and do it via REST API. For this we would need to authenticate Dappi server to Strapi via API Key. Even though more complex, this can open UI features like nice progress indicator, check points (continue from after fail or restart), knowing what tables we are importing at the moment etc.
    • Third, a combination of both. We can read the schema and go to the database of the instance directly via .NET code. This can be done in a transaction which would guarantee no partial imports and even checkpoints, and also allow for progress visibility to the user.

Acceptance Criteria

  • Schema is defined and used by the frontend.
  • Handling of different strapi schema versions can be skipped, as for supporting of PogoDoc we can support only v4.
  • After translating the schema from Strapi, we need to show the user what will be created in Dappi, so it can be confirmed that we can proceed.
  • TODO: Choose strategy for Data import

Notes:

  • UI and backend for Strapi schema import is done as a POC @manevdushko can provide details.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions