Wiki source code of Architecture

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

Hide last authors
Manuel Leduc 21.2 1 {{toc start="2"/}}
Manuel Leduc 19.1 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
Manuel Leduc 20.1 11 == Design Proposal ==
Manuel Leduc 3.1 12
Manuel Leduc 20.1 13 * [[Main Design page>>design:Proposal.Cristal.WebHome]]
Manuel Leduc 21.1 14 * [[Individual proposals>>design:Main.WebHome||anchor="|t=proposal&p=1&l=15&s=doc.date&d=desc&product=Cristal"]]
Manuel Leduc 3.1 15
Vincent Massol 18.1 16 == Architectural Proposal to make ==
Vincent Massol 4.1 17
Vincent Massol 11.17 18 * Architecture must be offline-compliant
19 ** Important to justify javascript/typescript as the main coding language of Cristal
Vincent Massol 4.1 20 * Represent documents internally using JSON-LD
21 ** Javascript allows storing JSON-LD in memory directly
Vincent Massol 11.21 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.
Vincent Massol 9.1 23 ** See https://jira.xwiki.org/browse/CRISTAL-37
Vincent Massol 6.1 24 * Use Markdown as the default syntax for documents
Vincent Massol 9.1 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
Vincent Massol 8.1 28 * Decide if we implement the concept of XDOM client-side or not
Vincent Massol 11.1 29 ** If don't implement XDOM client-side, it's hard to implement a powerful client-side macro feature
Vincent Massol 9.1 30 ** No jira issue created yet
Vincent Massol 11.2 31 * Propose a Capability API
Vincent Massol 11.3 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)
Vincent Massol 11.5 33 * Decide of the versioning mechanism between backend-specific clientside code in Cristal and backend versions
Vincent Massol 11.7 34 * Propose using a Design System (forum proposal sent but not solved yet)
Vincent Massol 14.3 35 * Propose Component-based development.
Manuel Leduc 14.2 36 ** Current discussion: https://forum.xwiki.org/t/choice-of-javascript-dependency-injection-library/13303
Vincent Massol 14.3 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
Vincent Massol 11.15 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
Vincent Massol 11.18 44 * Propose the concept of backend adapter and the fact that a backend adapter is a set of local Extensions
Vincent Massol 11.23 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.
Vincent Massol 11.19 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
Vincent Massol 11.20 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
Vincent Massol 11.22 50 * Agree that backends shouldn't provide their own front end resources to Cristal (but they could provide Cristal-specific resources)
Vincent Massol 11.24 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?)
Vincent Massol 11.25 52 * Propose a simple way to develop and deploy Cristal extensions
Vincent Massol 13.1 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)
Vincent Massol 17.4 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
Vincent Massol 18.1 55 * Should we think about using https://blockprotocol.org/ ?
Vincent Massol 4.1 56
Vincent Massol 16.1 57 == Architectural Decision Records ==
Vincent Massol 4.1 58
Vincent Massol 17.1 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".
Vincent Massol 5.1 60
Vincent Massol 15.1 61 {{display reference="ADR.WebHome"/}}
Vincent Massol 11.8 62
Vincent Massol 15.1 63 TODO: Move the following as ADR records:
64
Vincent Massol 11.10 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
Vincent Massol 11.8 68 * Dependency injection framework selected: Inversify
Vincent Massol 11.11 69 * Build tool: pnpm
Vincent Massol 11.18 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