Skip to content

Commit

Permalink
Add controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelzahn committed Jul 24, 2024
1 parent 2d75e76 commit 5ff9585
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 83 deletions.
167 changes: 84 additions & 83 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,146 +1,147 @@
import { defineConfig } from 'vitepress'
import { defineConfig } from "vitepress";

const projectSidebar = {
text: "Project", items: [
text: "Project",
items: [
{
text: 'Goal',
link: '/project/goal'
text: "Goal",
link: "project/goal",
},
{
text: 'Audience',
link: '/project/audience'
}
]
text: "Audience",
link: "project/audience",
},
],
};

const loamaSidebar = {
text: 'Loama',
text: "Loama",
items: [
{
text: 'Design',
link: '/loama/design.md'
text: "Design",
link: "deliverables/loama/design.md",
},
{
text: 'Development',
link: '/loama/development'
text: "Development",
link: "deliverables/loama/development",
},
{
text: 'Current Limitations',
link: '/loama/limitations'
text: "Current Limitations",
link: "deliverables/loama/limitations",
},
{
text: 'Feedback & Future suggestions',
link: '/loama/feedback'
}
]
text: "Feedback & Future suggestions",
link: "deliverables/loama/feedback",
},
],
};

const mockAppSidebar = {
text: 'Mock Apps',
text: "Mock Apps",
items: [
{
text: 'Mockbook',
link: '/toco/mockbook/index'

text: "Mockbook",
link: "deliverables/toco/mockbook/index",
},
{
text: 'Doctorapp',
link: '/toco/doctorapp/index',
}
]
}
text: "Doctorapp",
link: "deliverables/toco/doctorapp/index",
},
],
};

const deliverablesSidebar = {
text: "Deliverables",
items: [
loamaSidebar,
mockAppSidebar,
{ text: "Controller", link: "deliverables/controller" },
],
};

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: "/doco/",
title: "Loama",
description: "The documentation & handover website of the LOAMA project",
themeConfig: {
logo: '/loama-logo.svg',
logo: "/loama-logo.svg",
socialLinks: [
{ icon: 'github', link: 'https://github.com/osoc24' },
{ icon: 'linkedin', link: 'https://www.linkedin.com/company/open-summer-of-code/posts/?feedView=all' },
{ icon: "github", link: "https://github.com/osoc24" },
{
icon: "linkedin",
link: "https://www.linkedin.com/company/open-summer-of-code/posts/?feedView=all",
},
],
search: {
provider: 'local'
provider: "local",
},
nav: [
{ text: 'Home', link: '/' },
{ text: "Home", link: "/" },
{
text: 'Project', items: [
{ text: 'Why?', link: "/project/goal" },
{ text: 'For whom?', link: "/project/audience" },
]
text: "Project",
items: [
{ text: "Why?", link: "/project/goal" },
{ text: "For whom?", link: "/project/audience" },
],
},
{
text: 'Loama', items: [
{ text: 'Design', link: '/loama/design.md' },
{ text: 'Development', link: '/loama/development' },
{ text: "Feedback", link: "/loama/feedback" }
]
text: "Deliverables",
items: [
{
text: "Loama",
items: [
{ text: "Design", link: "/deliverables/loama/design.md" },
{ text: "Development", link: "/deliverables/loama/development" },
{ text: "Feedback", link: "/deliverables/loama/feedback" },
],
},
{
text: "Mock Apps",
items: [
{ text: "MockBook", link: "/deliverables/toco/mockbook/index" },
{ text: "Docterapp", link: "/deliverables/toco/doctorapp/index" },
],
},
{
text: "Controller",
link: "/deliverables/controller",
},
],
},
{
text: "Mock Apps", items: [
{ text: "MockBook", link: "/toco/mockbook/index" },
{ text: "Docterapp", link: "/toco/doctorapp/index" }
]
}
],

sidebar: {
"/": [
{ text: "Home", link: "/" },
{
text: "Lexicon",
link: "/lexicon"
link: "/lexicon",
},
{
...projectSidebar,
collapsed: true
},
{
...loamaSidebar,
collapsed: true
collapsed: true,
},
{
...mockAppSidebar,
collapsed: true
...deliverablesSidebar,
collapsed: true,
},
{ text: "Team", link: "/team" },
],
'/project': [
"/project": [
projectSidebar,
{
...loamaSidebar,
collapsed: true
...deliverablesSidebar,
collapsed: true,
},
{
...mockAppSidebar,
collapsed: true
}
],
'/loama': [
"/deliverables": [
{
...projectSidebar,
collapsed: true
collapsed: true,
},
loamaSidebar,
{
...mockAppSidebar,
collapsed: true
}
deliverablesSidebar,
],
'/toco': [
{
...projectSidebar,
collapsed: true
},
{
...loamaSidebar,
collapsed: true
},
mockAppSidebar
]
},
}
})
},
});
11 changes: 11 additions & 0 deletions deliverables/controller.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Controller

The intent of this library is to provide a wrapper around the [@inrupt/solid-client](https://docs.inrupt.com/developer-tools/api/javascript/solid-client/) library, such that more of the intricate Solid details are abstracted away. Furthermore, because this library lives outside of LOAMA it's easy to swap this controller out with another one that doesn't make use of [@inrupt/solid-client](https://docs.inrupt.com/developer-tools/api/javascript/solid-client/) under the hood.

Internally the controller uses a JSON file called `index`, which is stored in the root of the pod, to maintain an overview of the currently managed connections inside of LOAMA. It is entirely possible, though, that the ACL files contain permissions which aren't reflected inside the `index.json`. This is not an issue, as over time and after repeated usage the `index.json` will synchronize naturally.

To have the distinction between this permission is destined to manage an agent/ group and this permission is for the general public a nullable `UserType` object is used. Wherein a null signifies that it's for the public access.

## Deviations from `solid-client`

The controller merges the `ControlRead` and `ControlWrite` into `Control`. Furthermore, the `AccessModes` is mapped to a `Permission[]`. As the `AccessModes` is an object where the key is the permission and the value is a boolean indicating if it should be removed or given. In the `Permission[]` this is interpreted as: If it's there it's given, otherwise not.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5ff9585

Please sign in to comment.