Wiki source code of Architecture

Last modified by Manuel Leduc on 2024/04/24 10:55

Show last authors
1 {{toc start="2"/}}
2
3 == Architecture Summary ==
4
5 Cristal is a generic wiki UI that is able to connect to various back-ends (e.g., a [[XWiki>>xwiki:Main.WebHome]] instance, or a local folder).
6
7 The UI adapt itself to the capabilities of the backend. For instance, when using a local folder back-end, the //login// action is proposed as it is not required in such context.
8
9 The protocol to communicate between with a back-end is not formalized, but Cristal provide APIs to be implemented by back-end connectors.
10
11 == Design Proposal ==
12
13 * [[Main Design page>>design:Proposal.Cristal.WebHome]]
14 * [[Individual proposals>>design:Main.WebHome||anchor="|t=proposal&p=1&l=15&s=doc.date&d=desc&product=Cristal"]]
15
16 == Architectural Proposal to make ==
17
18 * Architecture must be offline-compliant
19 ** Important to justify javascript/typescript as the main coding language of Cristal
20 * Represent documents internally using JSON-LD
21 ** Javascript allows storing JSON-LD in memory directly
22 ** Decide if using JSON-LD internally in memory is a performant format or if we need another structure (like some class). We could imagine using JSON-LD only for external access to XWiki page data.
23 ** See https://jira.xwiki.org/browse/CRISTAL-37
24 * Use Markdown as the default syntax for documents
25 ** See https://jira.xwiki.org/browse/CRISTAL-39
26 * Should we support syntaxes other than Markdown in Cristal (client side)?
27 ** See https://jira.xwiki.org/browse/CRISTAL-41
28 * Decide if we implement the concept of XDOM client-side or not
29 ** If don't implement XDOM client-side, it's hard to implement a powerful client-side macro feature
30 ** No jira issue created yet
31 * Propose a Capability API
32 * Propose a UI Extension mechanism (e.g. for comments, ability for an extension to decide how to display them - and for the XWiki adapter, which can be a set of extensions)
33 * Decide of the versioning mechanism between backend-specific clientside code in Cristal and backend versions
34 * Propose using a Design System (forum proposal sent but not solved yet)
35 * Propose Component-based development.
36 ** Current discussion: https://forum.xwiki.org/t/choice-of-javascript-dependency-injection-library/13303
37 ** Remaining work:
38 *** Agree on using Inversify
39 *** Our own API vs Inversify
40 *** How to implement namespaces
41 *** Document the API with examples on cristal.xwiki.org
42 * Propose a functional test framework: playwright - https://jira.xwiki.org/browse/CRISTAL-11
43 * Propose a solution in the build for testing accessibility - https://jira.xwiki.org/browse/CRISTAL-12
44 * Propose the concept of backend adapter and the fact that a backend adapter is a set of local Extensions
45 ** Propose that cristal backend adapters have the concept of supported backend versions (posibly feature by feature), so that the adapter knows the way to call the backend depending in its version. If the backend doesn't provide an api to get its version, provide a config setting to manually set it in Cristal.
46 * Propose a configuration API
47 * Propose that when developing a feature/module, the best practice is to review the following aspects: architecture, performance, security, configurability, accessibility, internationalization, realtime/usability, logging/manageability (JMX), extensibility
48 ** Idea 1: propose a design template (for design.xwiki.org) and the owner of the feature must prove that he has thought of all the aspects
49 ** Idea 2: link it to the idea of ADR
50 * Agree that backends shouldn't provide their own front end resources to Cristal (but they could provide Cristal-specific resources)
51 * Discuss protection of local data in Cristal (e.g. you connect to an XWiki backend with an auth, then go offline, how do you protect local data?)
52 * Propose a simple way to develop and deploy Cristal extensions
53 * Propose "Do not show features if the user does not have the right on that feature" as a design best practice (https://jira.xwiki.org/browse/CRISTAL-122)
54 * Decide if we use a [[SPA architecture (Single Page Application)>>https://vuejs.org/guide/extras/ways-of-using-vue#single-page-application-spa]] and [[SFC>>https://vuejs.org/guide/scaling-up/sfc.html]], and Composition API or Options API
55 * Should we think about using https://blockprotocol.org/ ?
56
57 == Architectural Decision Records ==
58
59 All the items below have been agreed on the dev forum. We use an [[ADR system>>https://adr.github.io/]] to record them. To add a new ADR, go the [[ADR Application>>ADR.WebHome]] and create a new page of type "ADR".
60
61 {{display reference="ADR.WebHome"/}}
62
63 TODO: Move the following as ADR records:
64
65 * Vue 3 as the front-end framework
66 * The Vue Components will be published as Web Components
67 * It is possible to use Web Components as part of the Vue templates
68 * Dependency injection framework selected: Inversify
69 * Build tool: pnpm
70 * Cristal must be extensible and based on Extensions
71 ** Ability to add or remove all features by installing or uninstalling Extensions
France 2030 Logo

This project is being financed by the French State as part of the France 2030 program

Ce projet est financé par l’État Français dans le cadre de France 2030

  • Powered by XWiki 18.4.6 - node1. Hosted and managed by XWiki SAS

Get Connected