[RFC] Solidground development environment (wiki)

This is a wiki post for collecting notes on the RFC, that anyone can edit.


Considerations

  • Find proper split wrt front-end / back-end code vs. component-oriented development.

Monorepo folder layout

We may start by mapping tool suite and living documentation directly to top-level folders…

/docs
/floorplanner
/groundwork
/taskweave
/weave-cli
/weave-sdk

This is not a good option, for various reasons:

  • Docs in root are easily findable, but living docs are part of the component they belong to.
  • Does Taskweave engine need to be root? It is always hosted somehow.
  • Floorplanner is a just another SX solution and will consist of multiple Service components.
    • Solutions and components should be treated equally whether Solidground or creator owned.
    • Solutions are designed using Workspaces and Projects. How does Floorplanner map to that?
  • Weave CLI and SDK can be aggregated under one top folder.

Elaborating the breakdown to:

/components
  /living-docs
  /workspaces
  ...
/groundwork
  /localhub
  /serverhub
  /taskweave
/solutions
  /design-hub
  /floorplanner
  ...
/weave
  /cli
  /sdk

This design is better in a number of ways:

  • components: To contain a growing list of service components, often reusable, evolving separately, and each representing a discrete bounded context that exists in one or more solutions. The living-docs service component is the framework for building and compiling integrated collaborative documentation facilities. The docs content itself exists in individual components and solutions.
  • groundwork: To contain anything that is core to Solidground MOS. It contains localhub that allows solutions to be hosted within Tauri, serverhub for headless deployment of wasmcloud, and taskweave library/framework for process automation of these hubs. Additional common components may be added to this folder.
  • solutions: To contain a growing list of creator solutions, including Floorplanner itself. The subfolders map directly to the solution blueprint, and will mostly contain config files, build and test scripts as well as docs content created during the Social experience design process. Solidground comes with two solutions, namely Floorplanner Designer and the Solidground Design Hub.
  • weave: Both the command-line interface, and the artifacts and templates that are manipulated by the CLI (or by Floorplanner UI) are together, clearly branded as “Weave”: Core developer tools.

Some open issues are:

  • Component layout (see below).
  • Related. How are front/back-end projects tied into this hierarchy?
    • They may come separate, or bundled in one component.
    • Components may contain multiple (internal) crates/packages. Unless undesirable?
  • Related. Same for living documentation.
    • Ideally bundled with components, but MVP can have docs in one single place.
  • Vendored dependencies (see below). Where do they live?
    • Given that groundwork literally is the foundation, it should be groundwork/vendors only.

Development environment

Moldable development on Solidground MOS involves the ability to evolve solutions while they are in production. The development environment is part of the same social network as the solutions it creates.

Solidground SX offers creators a local development environment. Objective is to bring along the Solidground project itself to be part of the creator’s set up, and make it really easy to contribute upstream. Based on FOSS Development Recommendations wiki and discussions in Guild Alpha chatroom, we have following preferences:

  • In preparation of having fully reproducible builds we want to support Nix package manager.
  • However, for a gentle intro to Nix and good choice for a MVP we start with Devenv.
    • Complete package to get started with reproducible developer environments.
    • Consists entirely of Nix scripts, so has minimum lock-in.
  • We will consider using Direnv to auto-switch developer environments when entering subdirs.
    • Enables use of nix-shell (based on Bash), manages all shell configuration.
    • With polyglot monorepo sub-projects can be great for ease-of-use and overall DX.
    • Might install with Starship to configure beautiful tailored prompts.
  • We will support launching container-based development environments.
  • When it comes to container runtime we favor Podman and not Docker.
    • Our starting point is standards compliance, in this case Open Containers.
    • Podman is community-driven, non-corporate (more small-tech) FOSS project.
    • Ease-of-install, better security (rootless, no deamon, user profiles).
  • Consider using agenix to manage/deploy secrets in Nix environment (uses age encryption).
  • Vendor deps via .nix files that exist in subdirs of vendors (seen in monorepo of monorepos).
    • This way the monorepo size isn’t increased, with Nix dependencies cached on the machine.

With the above, the Getting Started / Installation instructions get quite involved. Could we still have:

git clone solidground.git
cd solidground
./weave start

And let weave go through first-time install guidance on the command line at a clean machine?

Service component folder layout

For service components it is not yet decided how they are bundled. The assumption is that a combination of both front-end (Typescript React app) and back-end artifacts (Rust compiled to WebAssembly) are compressed in an archive using a particular format (TBD).

:point_right:  Service component layout must be separate RFC to tackle after more foundations are laid.

1 Like