> For the complete documentation index, see [llms.txt](https://sygnal.gitbook.io/sygnal-webflow-components/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sygnal.gitbook.io/sygnal-webflow-components/cc/technical-notes/sygnals-code-component-dev-approach.md).

# Sygnal's Code Component Dev Approach

## Goals

* Rapid prototyping&#x20;
* Methodology for R\&D and proof-of-concept on more complex component design patterns&#x20;
* Maximum styling support&#x20;
  * Leveraging the Designer UX as much as possible &#x20;
* Minimize the risk of production impact to users
  * Supporting tight CI/CD
  * Unit testing&#x20;
  * Integration testing&#x20;
  * Separate DEV, TEST, PROD environments&#x20;
    * User-accessible TEST for community validation on new features&#x20;
* Separate DEV, TEST, PROD environments&#x20;

### Development Approach ( v1 )

The components I'm most interested in push the design boundaries of Webflow's setup a bit, so I'm two-phasing it using two separate Code Component projects - a *prototyping lib* and a *production library*.&#x20;

#### Phase 1 - prototyping ( `sygnal-prototype` lib )&#x20;

The prototype component is built in a separate lib specifically for prototyping.&#x20;

{% hint style="success" %}
As a separate library, it can be deployed to any project without impacting the production lib deployments. &#x20;
{% endhint %}

The prototype lib contains a number of features to aid development, including various "test" components that model specific solution-approaches to specific needs like slot-processing, state sharing, and  attribute configurations.&#x20;

These can be used both as a reference for the dev team, and for any AI coding assistants like Claude code that the team might utilize.&#x20;

In this library;&#x20;

* Functional prototype tested locally using Vite, and framed in App.tsx. &#x20;
* If the component has shared state like Sygnal's Audio player ( playing one pauses others ), that framework can also be built and tested locally.&#x20;
* As a separate library, it can be deployed to any project without impacting the production lib deployments. &#x20;

#### Phase 2 - testing&#x20;

Once it's feature complete, I deploy the lib into Sygnal's main Webflow workspace as the `sygnal-prototype` lib. This keeps it discrete.&#x20;

Integration testing is then performed;&#x20;

* Designer experience testing&#x20;
  * Component functionality on the canvas&#x20;
  * Slot functionality&#x20;
    * Slotted collection list processing&#x20;
  * Property presentation and ordering&#x20;
  * Styling concerns&#x20;
  * Preview mode&#x20;
* Published site testing&#x20;
  * Functional testing
    * Richtext processing&#x20;
  * HTML/CSS review &#x20;

This process requires a lot of recurring deployments, but that's quite fast with the smaller prototype lib, from an SSD.

#### Production Release&#x20;

Once fully complete, the code is manually copied over to the appropriate production library, e.g. `sygnal-layout`, `sygnal-forms`, `sygnal-maps` , etc.&#x20;

From here it needs to be deployed to;

* Sygnal's workspace&#x20;
* Client workspaces&#x20;
* The community as a whole&#x20;

{% hint style="warning" %}
**2025-09-23 - CLIENT WORKSPACE DEPLOYMENTS ( UNTESTED )** \
Current plan is to maintain multiple .env files to swap the API\_TOKEN with a script, and then deploy.&#x20;

**Ideally this would be handled with an --env or --config param on the CLI deploy command.**&#x20;
{% endhint %}

{% hint style="danger" %}
**2025-09-23 - PUBLIC DEPLOYMENTS ( UNTESTED )**\
Current plan is to make the lib public as a repo, with a detailed guide on how to git clone, install npm, and deploy to your own workspace.&#x20;
{% endhint %}

## Development Approach ( v2 )

{% hint style="warning" %}
**UNDER DEVELOPMENT**\
The v1 approach is not particularly friendly to ongoing development processes, since it requires manually copying code from the prototype lib to the production lib.&#x20;
{% endhint %}

To mitigate that, we're shaping a more CI/CD-friendly v2 process.&#x20;

* Single Code Components project&#x20;
* Github repo&#x20;
* `dev` branch, which is used for development, and pushed to a special DEV workspace for testing&#x20;
* PR to `main` branch, which contains the production code.  Here, Git actions or other mechanics can be used to;
  * Automatically install the new production updates to workspaces.&#x20;
  * Notify the user community of updates that they can selectively pull.&#x20;

Hypothetically, this would look something like;&#x20;

```
npx webflow library share --no-input --config webflow-prod.json
```

{% hint style="info" %}
**TEST WORKSPACE PROBLEM** \
According to rhe release docs&#x20;
{% endhint %}

{% hint style="info" %}
**PRO TIP**\
Consider using a separate test workspace for test deployments.  This ensures that you can fully use the same full component instance and name from a DEV branch of your repo and update it anytime.&#x20;
{% endhint %}

* API\_KEY change&#x20;
* ? Lib name&#x20;
* Ideally the ability to use a single multi-workspace API-KEY, while specifying the exact workspace ID you're deploying into ( this is Cloudflare Wrangler approach )&#x20;

{% hint style="success" %}
**MARKETPLACE LIBS** \
This same CI/CD mechanic would ideally inform Marketplace lib updates as well.&#x20;
{% endhint %}

<img src="/files/XPpKEwlDI88g5uAPlld6" alt="" class="gitbook-drawing">

## Future

{% hint style="danger" %}
As any WordPress dev knows, component marketplaces are a double-edged sword.  We want to engineer a more bulletproof solution that mitigates;&#x20;

* Shipment of breaking changes&#x20;

* Users unable to revert to a working version&#x20;

* Malware risks&#x20;

* Abandoned components&#x20;

* Breaking platform dependencies&#x20;
  {% endhint %}

* Unified repo with free v. paid versions of a component.  to support DEV, TEST, and PROD, with separate branches or feature flags&#x20;

### Webflow Features&#x20;

Ideally the ability to use a single multi-workspace API-KEY, while specifying the exact workspace ID you're deploying into ( this is Cloudflare Wrangler approach )&#x20;

Marketplace support for Code Component libs + Hybrid libs. Hybrid libs have the same name, and code components are a facet. &#x20;

Use cases;

* Map ( CC ) + Pins ( NC ) makes&#x20;
* Slider ( CC ) + Slides ( NC )&#x20;

Build feature flags, or runtime feature flags that support both free and paid libs, Ideally within the marketplace.  You install Sygnal Maps, and you get a bunch of free stuff.  If you upgrade to PRO, features, capabilities, and any usage tie-ins ( LLMs, etc ) expand.&#x20;

This supports;

* Free trial setups&#x20;
* Free basic plans + Pro advanced plans&#x20;
* Possibly plan tiering&#x20;

Ideally this would be managed internally by Webflow using library-facing feature flags.&#x20;

Use cases;&#x20;

* I have a chatbot, I want;&#x20;
  * Free plan of 10 convos / day&#x20;
  * Paid plans starting at 100 convos / day&#x20;
* I have a map library;&#x20;
  * The image map, and Google map are free&#x20;
  * The interactive Globe is pro &#x20;
* I have a mutlistep form library;&#x20;
  * The basic MSF and all basic forms components are free, limited to a 3 step process.&#x20;
  * Pro unlocks;
    * Up to 100 steps&#x20;
    * Advanced validations&#x20;
    * Advanced forms components like range sliders&#x20;

### PROD

* PR to PROD&#x20;
* Google Action to deploy to prod?&#x20;

```
npx webflow library share --no-input --config webflow-prod.json
```

{% hint style="warning" %}
Also need API key control for deploying to client workspaces.&#x20;
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sygnal.gitbook.io/sygnal-webflow-components/cc/technical-notes/sygnals-code-component-dev-approach.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
