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:
- GitLab token is configured in VS Code settings (
samo-rdt.gitlabToken) withread_repositoryscope. To obtain the token, contact the RDT team or email simon.misak@asseco-ce.com. - Git is installed and accessible from the terminal
- 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
| Field | Description | Example |
|---|---|---|
| Primary Color | Hex color for the project UI theme | #1976D2 |
| Project ID | Unique project identifier (kebab-case) | farm-management |
| Security App Method | Uppercase ID for security authorization rules | FARM_MANAGEMENT |
| Server Name | Target server hostname | samo-dev.local |
Screenshot needed
The Project Identity section of the form
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
| Field | Description | Example |
|---|---|---|
| LIDS Version | Semver version for the LIDS service | 3.2.1 |
| LIDS Port | Port number for the LIDS service | 8080 |
| Gateway Version | Semver version for the SAMO Gateway | 2.1.0 |
| Gateway Port | Port number for the Gateway | 8081 |
| Dynamic App Version | Version for the Dynamic App service | 1.5.0 |
Screenshot needed
The Service Versions section
Database Configuration
| Field | Description | Example |
|---|---|---|
| DB Provider | Database type | postgresql or oracle |
| DB Driver | Driver class or type identifier | postgresql |
| DB URL | JDBC connection string | jdbc:postgresql://localhost:5432/samo |
| DB User | Database login username | samo_admin |
| DB Password | Database login password (masked input) | ******** |
Screenshot needed
The Database Configuration section
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:
| Placeholder | Replaced 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
| Error | Cause | Solution |
|---|---|---|
| "No workspace folder open" | VS Code has no folder open | Open a folder before running SAMO Init |
| Git clone failure | Invalid GitLab token or network issue | Check samo-rdt.gitlabToken in settings, verify network access to GitLab |
| "Token not configured" | GitLab token setting is empty | Add your token in VS Code settings |
| File operation failure | Permission issues or disk full | Check file system permissions and available disk space |
Errors are reported in VS Code notification messages and captured by Sentry telemetry (if enabled).