Cyborg as a Framework

Milan Herda

2025-03

Framework

Framework - User expectations

  • It will provide me with an installer
  • I will have a working website after the installation
  • I can configure it
  • I can choose my set of additional libraries (plugins)
  • I can rewrite the initial website code
  • I am able to do upgrades of the framework and of the plugins
    • I may be forced to do some rewrites during the upgrade (when upgrading to new major versions and possibly some minor versions)
  • I have an option not to do upgrades

Cyborg Framework needs to provide

  • Philosophy
  • Set of core libraries
  • Set of additional libraries (DS, plugins)
  • Skeleton for default application
  • Installer
  • Ways to configure the application
  • Ways to override parts of the application
  • Semantic versioning for its parts

Mindset

We no longer develop

an application

We are now developing

a set of tools and libraries

Usage & Development Examples

Four points of view & four types of teams

  • 📰 Job Board Teams

  • 🤖 Cyborg Team

  • 🎨 Design System Team

  • 🧩 Feature Teams

📰 Job Board Team

📰 Job Board Team: Installation

  • Every Job Board has its own Git repository
  • Initial creation is done via @almacareer/create-cyborg command
    • Creates new default Job Board
    • Plugin selection
  • Configuration & possible overrides & overwrites
  • Push to the repository

📰 Job Board Team: Local Development

  • clone of the Job Board repository installed locally
  • customization done via
    • configuration (yaml files)
    • environment variables
    • code modification of their copy of installed application
    • custom plugins

📰 Job Board Team: Release

Release = Deployment to production

  • Independently of Cyborg, Design System or Feature Component teams

📰 Job Board Team: Upgrades

  • Needs to update all Cyborg packages (core, DS, plugins...)
  • Team should do upgrades regularly
  • Upgrades are done the same way as of any other NPM packages
    • Read Changelogs for every library and plugin
    • Follow the advices
    • Apply codemods if able and were provided

📰 Job Board Team: Requests for Features

Job Board team needs some new features in core libraries, Design System libraries or plugins

  • asks other team to implement it
  • creates a PR in a repository of another team

📰 Job Board Team: Responsibilities

  • Works in its own repository
    • Every Job Board has its own Git repository
  • Responsible for:
    • specific Job Board
    • selection of enabled plugins
    • customization
    • which version of Cyborg and libs to use

🤖 Cyborg Team

🤖 Cyborg Team

🤖 Cyborg Team: Setup

  • clone of platform-frontends monorepo installed locally
  • apps/jobportal works both
    • as a testing application
    • and as a skeleton for new Job Boards
  • possible another testing installation inside repository, but outside of monorepo workspace

🤖 Cyborg Team: Local Development

  • working inside monorepo
  • possible testing inside ad-hoc installation(s) created by @almacareer/create-cyborg command

🤖 Cyborg Team: Release

Release = Publishing of a new version of core NPM packages

  • using conventional commits to determine next version number
  • generated CHANGELOG for each release
  • all core packages versioned by the same number*
  • publishing done manually on a regular basis (once per week/sprint)*

* May be subject to change, but we want to try this approach

🤖 Cyborg Team: Upgrades

  • Needs to upgrade all packages developed outside of monorepo
  • Team should do upgrades regularly and often (each sprint)

🤖 Cyborg Team: Requests for Features

Cyborg Team should not need to ask other teams for new features

Some possible exceptions:

  • Code Quality Tools
  • Spirit / Job Board Design System

Procedure:

  • ask other team
  • create PR and ask for merge

🤖 Cyborg Team: Responsibilities

  • Works in platform-frontends monorepo
  • Responsible for:
    • framework philosophy & documentation
    • core framework libraries (configuration, routing, DI...)
    • support framework libraries (translations)
    • installation command
    • default (initial) Job Board skeleton
    • codemods and tutorials for easy upgrades

🎨 Design System Team

🎨 Design System Team: Setup

  • clone of spirit-design-system monorepo installed locally
  • clone of platform-frontends monorepo installed locally
  • apps/jobportal works both
    • as a testing application
    • and as a skeleton for new Job Boards

🎨 Design System Team: Local Development

  • working inside Spirit and Cyborg monorepos
  • possible testing inside ad-hoc installation(s) created by @almacareer/create-cyborg command

🎨 Design System Team: Release

Release = Publishing of a new version of DS and UI NPM packages

  • using their own versioning strategy, tooling and regularity in Spirit repository
  • versioning strategy and regularity in Cyborg repository is a subject of further discussions

🎨 Design System Team: Upgrades

Team should not need to update Cyborg packages:

  • they work in monorepos
  • plugins from feature teams will be upgraded by Cyborg team

🎨 Design System Team: Requests for Features

Procedure:

  • ask Cyborg team
  • or create PR and ask for merge

🎨 Design System Team: Responsibilities

  • Works in spirit-design-system and platform-frontends monorepos
  • Responsible for:
    • Design System philosophy & documentation
    • UI components tailored for Job Boards
    • generic UI components

🧩 Feature Team

🧩 Feature Team: Setup

  • works in their own Git repository
  • some changes temporarily made inside Cyborg repository (Next.js routes)
  • concrete setup (single repo, monorepo, multiple repos) is a decision of each Feature Team (approved by Architects)
  • Cyborg and DS packages are installed via NPM

🧩 Feature Team: Local Development

  • working inside their own repo(s)
  • probably beneficial to have their own installation of Cyborg (similar to Job Board Team)
    • default Job Board (prace.cz in the beginning)
    • without any changes to initially generated code to allow easy upgrades

🧩 Feature Team: Release

Release = Publishing of a new version of plugin package(s)

  • using their own versioning strategy, tooling and regularity in their repository

🧩 Feature Team: Upgrades

  • Team should upgrade their dependencies on Cyborg packages regularly (per sprint).
    • at least after each new major version

🧩 Feature Team: Requests for Features

Procedure:

  • ask Cyborg team or Design System Team
  • or create PR and ask for merge (Next.js routes)

🧩 Feature Team: Responsibilities

  • works inside their own repository(ies)
  • and platform-frontends (temporarily)
  • responsibilities:
    • developing functionally-specific plugins or libraries for Cyborg
    • UI components for this functionality
    • published as NPM package to private registry

Mind Shift

1. We are now developing a set of tools and libraries

2. We do not control which of our libraries and their versions will be used*

* Except Job Board Teams

3. We do not push code to production*

* Except Job Board Teams

4. We do not control when, how and which version of our code gets into production

* Except Job Board Teams

Cyborg as a Framework

By Milan Herda

Cyborg as a Framework

  • 78