rm sampl json schema for being technical and provisional
This commit is contained in:
parent
edecc2bbde
commit
5ce5233063
1 changed files with 1 additions and 154 deletions
155
architecture.md
155
architecture.md
|
@ -225,7 +225,7 @@ The process of migrating one's applications to a different host encompasses:
|
||||||
|
|
||||||
### Data model
|
### Data model
|
||||||
|
|
||||||
Whereas the bulk of our configuration logic is covered in the [configuration schema](#sample-configuration-schema), our reference front-end application does in fact store data.
|
Whereas the bulk of our configuration logic is covered in the configuration schema, our reference front-end application does in fact store data.
|
||||||
The design for its data model to support the desired functionality is as follows, using the crow's foot notation to denote cardinality:
|
The design for its data model to support the desired functionality is as follows, using the crow's foot notation to denote cardinality:
|
||||||
|
|
||||||
<img src="https://git.fediversity.eu/Fediversity/meta/raw/branch/main/architecture-docs/panel-data-model.svg" alt="" style="max-width:600px;"/>
|
<img src="https://git.fediversity.eu/Fediversity/meta/raw/branch/main/architecture-docs/panel-data-model.svg" alt="" style="max-width:600px;"/>
|
||||||
|
@ -236,159 +236,6 @@ Whereas the core abstraction in Fediversity is a NixOS configuration module, a m
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Sample configuration schema
|
|
||||||
|
|
||||||
Whereas Nix(OS) option modules use Nix to specify types, in order to communicate the expected schema to other tools such as web applications, we use [JSON Schema](https://json-schema.org/) as an intermediate format, building upon [earlier work converting between such schemas by Nix collective Clan](https://clan.lol/blog/json-schema-converter/).
|
|
||||||
An example of such a schema might looks as follows:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": []
|
|
||||||
},
|
|
||||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
|
||||||
"domain": {
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"domain"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"default": "fediversity.net",
|
|
||||||
"description": "Apex domain under which the services will be deployed.\n",
|
|
||||||
"enum": [
|
|
||||||
"fediversity.net"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"enable": {
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"enable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"default": false,
|
|
||||||
"description": "Whether to enable Fediversity configuration.",
|
|
||||||
"examples": [
|
|
||||||
true
|
|
||||||
],
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"initialUser": {
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"initialUser"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"default": null,
|
|
||||||
"description": "Some services require an initial user to access them.\nThis option sets the credentials for such an initial user.\n",
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"initialUser"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
|
||||||
"displayName": {
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"initialUser",
|
|
||||||
"displayName"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"description": "Display name of the user",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"initialUser",
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"description": "User's email address",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"initialUser",
|
|
||||||
"password"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"description": "Password for login",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"initialUser",
|
|
||||||
"username"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"description": "Username for login",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"displayName",
|
|
||||||
"email",
|
|
||||||
"password",
|
|
||||||
"username"
|
|
||||||
],
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"forgejo": {
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"forgejo"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"default": null,
|
|
||||||
"description": "Configuration for the Forgejo service\n",
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"forgejo"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
|
||||||
"enable": {
|
|
||||||
"$exportedModuleInfo": {
|
|
||||||
"path": [
|
|
||||||
"forgejo",
|
|
||||||
"enable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"default": false,
|
|
||||||
"description": "Whether to enable Forgejo.",
|
|
||||||
"examples": [
|
|
||||||
true
|
|
||||||
],
|
|
||||||
"type": "boolean"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "object"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Break-down of project milestones
|
## Break-down of project milestones
|
||||||
|
|
||||||
Whereas details of the implementation may need to be decided as the technical challenges involved become clear, we can already give a higher-level planning of relevant milestones and some of their salient features:
|
Whereas details of the implementation may need to be decided as the technical challenges involved become clear, we can already give a higher-level planning of relevant milestones and some of their salient features:
|
||||||
|
|
Loading…
Add table
Reference in a new issue