2S Platform

Configuration that knows your business

Your data knows who the customer is. Your configuration knows how the software behaves. 2S connects them, so every application reads the right setup while it runs.

Start free Look around the exhibition

Open source (MIT). Hosted in the EU or on your own. For .NET, Rust, Node.js, Python, Go and Java.

Invoicing, for Northwind in production

0 deployments for 0 changes

What is written, where it is true

    What the running application reads

    Select a line to see where it comes from.

    A new customer. Why a deployment?

    Somebody buys a module. Not one line of logic changes. And still, somewhere, there is a list:

    It isn't the code's fault. Configuration is tied to deployments, and the business isn't.

    Configuration has been moving. This is the next step.

    1. In the code

      A change takes a new build.

    2. In the deployment

      A change takes a new deployment.

    3. In a configuration store

      A change takes no deployment. But your code decides whose value it is, and who inherits it.

    4. In your business model

      A change is just a change. The model knows whose it is.

    Describe it, configure it, connect it

    Describe your business

    Applications, customers, environments, and who uses what. Simple annotations, as many as you need.

    Configure where it is true

    A default on the application, a plan on the subscription, an exception on one customer. Each is written once, and inherited.

    Connect your data

    Keep an annotation's key in your data, or give the annotation your own id. Your application asks with the customer it already knows.

    You already know how it works

    You have used it for years. It is called object-oriented.

    A class with defaults
    rst.invoicing A responsibility: an application or a module
    Inheritance
    sbt.northwind usg.northwind.invoicing cnt.northwind.production The customer, the plan and the environment add what is different
    An instance
    exe.northwind.invoicing.production This module, for this customer, in this environment
    An override
    Only the exception, on the most specific level
    A type
    A schema that every configuration is checked against

    The result is one complete object, ready to bind to a type of yours.

    A few lines in your application

    One application reads one document. An application for many customers says how to find the current one.

    // one application
    builder.AddStoryteller();
    
    // many customers in one application
    builder.Services.AddCurrentSubject(http => http.User.FindFirstValue("customer_id"));
    
    public sealed class InvoiceService(ISubjectOptions<InvoicingOptions> options)
    {
        // options.Value belongs to the customer of this request
    }
    
    // the list in the worker is gone
    await foreach (var change in subscriptions.WatchAsync(stoppingToken))
    {
        // a customer subscribed, changed or left
    }
    // one application
    let settings: InvoicingOptions = storyteller.load().await?;
    
    // many customers in one application
    let invoicing: InvoicingOptions = storyteller.subject(&customer_id).get("invoicing").await?;
    
    // follow the customers of a module
    let mut changes = storyteller.subscriptions("invoicing");
    while let Some(change) = changes.try_next().await? {
        // a customer subscribed, changed or left
    }
    // one application
    const settings = await storyteller.load<InvoicingOptions>()
    
    // many customers in one application
    const invoicing = await storyteller.for(customerId).get<InvoicingOptions>('invoicing')
    
    // follow the customers of a module
    for await (const change of storyteller.subscriptions('invoicing')) {
      // a customer subscribed, changed or left
    }
    # one application
    settings = storyteller.load(InvoicingOptions)
    
    # many customers in one application
    invoicing = storyteller.subject(customer_id).get("invoicing", InvoicingOptions)
    
    # follow the customers of a module
    async for change in storyteller.subscriptions("invoicing"):
        ...  # a customer subscribed, changed or left
    // one application
    settings, err := storyteller.Load[InvoicingOptions](ctx)
    
    // many customers in one application
    invoicing, err := storyteller.Get[InvoicingOptions](ctx, storyteller.Subject(customerID), "invoicing")
    
    // follow the customers of a module
    for change := range storyteller.Subscriptions(ctx, "invoicing") {
        // a customer subscribed, changed or left
    }
    # application.properties: one application
    spring.config.import=storyteller:
    
    // typed, and refreshed while it runs
    @ConfigurationProperties("invoicing")
    record InvoicingOptions(String currency, int retries) {}
    
    // many customers in one application
    InvoicingOptions options = storyteller.subject(customerId).get("invoicing", InvoicingOptions.class);

    Also in your pipeline. A GitHub Action, sform and the formats env, yaml and properties bring the same configuration into builds and deployments, for tools that read files.

    - uses: akobr/mono.me/src/Platform/GitHubAction@v1
      with:
        key: exe.northwind.invoicing.production
        export-env: true

    Every value has an answer

    Why does Northwind retry five times? Because of one line, in one document, changed by one person, on one day. See it, compare it, take it back. For the rest, ask the model.

    A graph of two customers, two modules and how they relate

    Made for teams, and for their agents

    Your whole team can read the model, and so can an AI agent. It explains a value, suggests where a new one belongs, and proposes the change. By default it never sees your secrets.

    From the setup to what happened

    Logs and traces carry the customer, the module and the configuration they ran with. From an error to the value behind it in one step.

    ERROR Invoice 10482 was not sent
      2s.key      exe.northwind.invoicing.production
      2s.version  14

    Start with one application

    1. Day 0

      One responsibility is one application. Its configuration lives in 2S, and changes without a deployment.

    2. Next

      Add a customer who is different.

    3. Later

      Plans, environments, jobs, the whole picture. Nothing has to be modeled before you need it.

    Keep what you have

    2S replaces the bridge you built by hand, not what stands on either side of it.

    Your database
    Your business data stays there. 2S connects to it by a key or by your own id.
    Your vault
    Key Vault, HashiCorp Vault, Doppler or Infisical, as a value store of your project.
    Your pipeline
    It deploys code, when code changes.
    Your feature flags
    For releases and experiments.

    What is your configuration keyed by?

    It's for you

    if two or more applications share the same customers, and customers are no longer all alike.

    Not yet

    if you have one application with a few settings. A table is fine. Come back with the second one.

    Describing is free

    You pay for live configurations: the ones your applications really use, each counted once a month. Features you turn on, such as hardware keys or single sign-on, have their own price. Everything you need to stay secure is included.

    Start free Read the docs

    Yours, whatever happens

    Open source under MIT. Export everything, also as a Git repository. Hosted in the EU, or on your own.