Your first product

Create a product from a Software Product Line, configure its features, and launch it in the browser.


Table of contents

  1. Prerequisites
  2. Step 1 – Browse the SPL catalog
  3. Step 2 – Create the product
  4. Step 3 – Select the product
  5. Step 4 – Configure features
  6. Step 5 – Resolve features
  7. Step 6 – Derive and launch the product
  8. Step 7 – Seed the database
  9. Step 8 – Open the browser
  10. Step 9 – Stop the product
  11. What you learned
  12. Next

Prerequisites

You have completed Getting started and are inside the CLI container:

(detached) /workspace$

If not, enter the container now:

cd splent_cli
make cli

Step 1 – Browse the SPL catalog

splent spl:list

You will see at least one entry: sample_splent_spl.

An SPL (Software Product Line) is a reusable feature model that defines which features exist, which are mandatory, which are optional, and how they depend on each other. Think of it as a blueprint for an entire family of applications.


Step 2 – Create the product

splent product:create my_first_app

SPLENT generates a full project directory at /workspace/my_first_app/ containing:

  • pyproject.toml – project metadata and feature declarations
  • src/ – the Flask application factory (src/my_first_app/)
  • scripts/ – numbered startup scripts (install deps, migrate DB, run server)
  • docker/ – Dockerfiles and Compose files for dev and prod
  • entrypoints/ – shell entrypoints for dev and prod containers

Step 3 – Select the product

splent product:select my_first_app

The prompt changes to show the active product:

(my_first_app) /workspace$

From now on, every splent command targets this product.


Step 4 – Configure features

splent product:configure

An interactive selector shows every feature from the SPL. Mandatory features (auth, public) are pre-selected and cannot be removed. Toggle the optional ones you want:

  • redis – Redis cache backend
  • session_redis – server-side session storage with Redis (requires redis)
  • profile – user profile management
  • mail – email sending infrastructure
  • mailhog – local email testing server (dev only)
  • confirmemail – email verification (requires mail and auth)
  • reset – password reset (requires mail and auth)

For this tutorial, select auth, public, redis, session_redis, and profile.

Watch what happens: when you select profile, the configurator already knows it depends on auth. These constraints come from the UVL model in the SPL catalog. If you tried to select confirmemail without mail, the validator would reject it.

After confirming, SPLENT writes the selection to pyproject.toml and validates the configuration against the SPL constraints.


Step 5 – Resolve features

splent product:resolve

This creates the features/ symlink directory inside the product and links each feature to its location (workspace root for editable, .splent_cache/ for pinned). After this step, the product has all its dependencies resolved and ready for the build.


Step 6 – Derive and launch the product

splent product:derive --dev

This is the main build command. It performs several steps:

  1. Infrastructure check – validates Docker port and service declarations
  2. Dependency resolution – resolves feature order from UVL constraints
  3. Docker build – builds the web and database containers
  4. Feature installation – clones pinned features into .splent_cache/ and creates symlinks
  5. Database setup – creates the database schema and runs migrations in UVL order
  6. Server start – launches Flask with auto-reload enabled

The terminal prints the URL when the server is ready (typically http://localhost:5591).


Step 7 – Seed the database

splent db:seed -y

This populates the database with initial data (test users, sample content) provided by each feature’s seeders. Without this step, the database is empty and you cannot log in.


Step 8 – Open the browser

Navigate to the URL printed in the terminal. You will see the login page provided by splent_feature_auth. Log in with the seeded test user:

  • Email: user1@example.com
  • Password: 1234

The authentication system, public pages, session management, and profile editing are all working – composed from independent features.


Step 9 – Stop the product

splent product:down --dev

This stops all Docker containers for the product.


What you learned

Concept Summary
SPL A reusable feature model that defines features and their constraints
Product A concrete application derived from an SPL with a specific feature selection
Configure Interactive selection of features with automatic constraint propagation
Derive End-to-end build: infrastructure, dependencies, database, server

Next

Tutorial 2: Exploring your product – learn the inspection tools that show you exactly how your product is composed.


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es