rollthecloudinc / hedge

Award winning climate aware database trimming cloud carbon and costs.
22 stars 2 forks source link

Think about were to write panel pages #161

Open ng-druid opened 4 months ago

ng-druid commented 4 months ago

rollthecloudinc/spearhead-canva-objects - private repo w/ pages site mapped to /public


The contract system currently only supports a single depth. It takes the first path part after shapeshifter and looks for a contract named the same in the contracts directory at the root of the repo. That isn't going to work here unless we name the contracts using the team_design.

repo root ie. spearhead-canva-objects

although panel page ids are currently generated a guid at random. Is it worth it to implement a solution to change the name?

Submit to /teamId-designId - given one form per design - right

The team-design must exist before submissions accepted.

What about media. Media currently only writes to media/*. We just need to rename with guid. Although we would really like to support paths like with entities.

How are contract schemas created from merely a panel page form. The structure can be immitated as converting entries to json. However, we also need to support things like validation and conditions (rules).


We can also go in a different direction and implement paths for contracts.

{
    "id": "person.schema",
    "path": "/ads/*/*",
    "schema": {
        "$id": "https://example.com/person.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
            "age": {
                "description": "Age in years which must be equal to or greater than zero.",
                "minimum": 0,
                "type": "integer"
            },
            "firstName": {
                "description": "The person's first name.",
                "type": "string"
            },
            "lastName": {
                "description": "The person's last name.",
                "type": "string"
            }
        },
        "title": "Person",
        "type": "object"
    },
    "userId": "b7a9bac5-5fef-4aa6-bf12-d536c156e453"
}

what about pages support in a design?