Skip to main content

Project Scaffolding (SAMO Init)

The SAMO Init wizard scaffolds a complete SAMO project from GitLab template repositories, customized with your project settings. It generates the full directory structure, configuration files, and per-environment deploy configs in a single step.

Prerequisites

Before using SAMO Init, ensure:

  1. GitLab token is configured in VS Code settings (samo-rdt.gitlabToken) with read_repository scope. To obtain the token, contact the RDT team or email simon.misak@asseco-ce.com.
  2. Git is installed and accessible from the terminal
  3. A workspace folder is open in VS Code

Launching the Wizard

Click Create SAMO Init Project in the RDT Activity Bar panel.

Screenshot needed

The "Create SAMO Init Project" button in the RDT panel

This opens a webview form in a new editor tab.

The SAMO Init Form

The form is divided into three sections:

Screenshot needed

The complete SAMO Init form with all fields visible

Project Identity

FieldDescriptionExample
Primary ColorHex color for the project UI theme#1976D2
Project IDUnique project identifier (kebab-case)farm-management
Security App MethodUppercase ID for security authorization rulesFARM_MANAGEMENT
Server NameTarget server hostnamesamo-dev.local

Screenshot needed

The Project Identity section of the form

Primary Color

The primary color is also used to generate a lighter variant (50% lighter) automatically. Both colors are substituted into the project template files for UI theming.

Service Versions

FieldDescriptionExample
LIDS VersionSemver version for the LIDS service3.2.1
LIDS PortPort number for the LIDS service8080
Gateway VersionSemver version for the SAMO Gateway2.1.0
Gateway PortPort number for the Gateway8081
Dynamic App VersionVersion for the Dynamic App service1.5.0

Screenshot needed

The Service Versions section

Database Configuration

FieldDescriptionExample
DB ProviderDatabase typepostgresql or oracle
DB DriverDriver class or type identifierpostgresql
DB URLJDBC connection stringjdbc:postgresql://localhost:5432/samo
DB UserDatabase login usernamesamo_admin
DB PasswordDatabase login password (masked input)********

Screenshot needed

The Database Configuration section

warning

Database credentials are written into template configuration files. Make sure your environment-specific property files are handled securely and not exposed in public repositories.

Form Caching

Your form inputs are automatically cached between dialog sessions. If you close the form and reopen it later, your previous values will be restored.

  • Cache persists within the VS Code session (stored in global state)
  • Click the Clear button to reset all fields and clear the cache

GIF needed

Form caching — close the dialog, reopen it, fields are preserved

What Happens on Submit

When you click Submit, the wizard performs the following steps:

Template Substitution

The wizard replaces 13 placeholder tokens across all template files:

PlaceholderReplaced With
${samo_primary_color}Your chosen primary color
${samo_primary_color_light}Auto-generated lighter variant
${basic.project_id}Project ID
${sec_app_method}Security app method
${basic.server_name}Server name
${lids_version}LIDS version
${lids_port}LIDS port
${gtw_version}Gateway version
${gtw_port}Gateway port
${da_version}Dynamic App version
${db_provider}Database provider
${db_driver}Database driver
${db_url}Database URL
${db_user}Database user
${db_password}Database password

Directory names containing ${basic.project_id} or ${basic.server_name} are also renamed to their actual values.

Generated Project Structure

After the wizard completes, your workspace will contain a folder named after your Project ID. Inside are two top-level directories cloned from the GitLab template repositories:

<project-id>/
├── configuration/ # From samo-init-configuration template
│ └── packages/
│ └── ... # SAMO configuration packages
└── project/ # From samo-init-project template
├── ... # Model and project files
└── environments/
└── <env>/ # One or more environments from the template
├── rdt.json # Deploy config (auto-generated by RDT)
├── *.properties # Environment property files
└── ...

The exact contents of configuration/ and project/ are determined by the template repositories. The environment names (e.g., default, dev, staging) depend on what the template ships.

Automatic rdt.json Generation

For every environment directory in the generated project, the wizard creates an rdt.json file if one doesn't already exist. This file contains the default deployment configuration derived from your VS Code settings.

See Per-Environment Config (rdt.json) for details on this file.

Error Handling

ErrorCauseSolution
"No workspace folder open"VS Code has no folder openOpen a folder before running SAMO Init
Git clone failureInvalid GitLab token or network issueCheck samo-rdt.gitlabToken in settings, verify network access to GitLab
"Token not configured"GitLab token setting is emptyAdd your token in VS Code settings
File operation failurePermission issues or disk fullCheck file system permissions and available disk space

Errors are reported in VS Code notification messages and captured by Sentry telemetry (if enabled).