Skip to content

Commit 75f69fc

Browse files
committed
chore: squash history — CLI toolkit for keystore, resources, and app configuration
Dart CLI tool (webtrit_phone_tools) providing commands for managing WebTrit Phone application lifecycle: - keystore-init / keystore-generate / keystore-commit / keystore-verify - resources-get — fetch assets, translations, theme variants from Configurator API - app-configure — generate local Flutter configuration (Firebase, flavors, dart-defines) - assetlinks-generate — generate Android assetlinks.json and Apple app-site-association Architecture follows the Orchestrator Pattern (Command → Context → Service → Processor → Runner). Includes lefthook hooks for format check, Conventional Commits, and branch name validation.
0 parents  commit 75f69fc

128 files changed

Lines changed: 5642 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.local.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(git -C /Users/serdun/Documents/work/webtrit/webtrit_phone_tools status)",
5+
"Bash(git -C /Users/serdun/Documents/work/webtrit/webtrit_phone_tools diff)",
6+
"Bash(git -C /Users/serdun/Documents/work/webtrit/webtrit_phone_tools log --oneline -5)",
7+
"Bash(git -C /Users/serdun/Documents/work/webtrit/webtrit_phone_tools add README.md .github/copilot-instructions.md .rules.md .rules/)",
8+
"Bash(git -C:*)",
9+
"Bash(dart compile:*)",
10+
"Bash(/tmp/webtrit_phone_tools_test:*)",
11+
"Bash(dart test:*)",
12+
"Bash(xargs ls -la)"
13+
]
14+
}
15+
}

.github/ISSUE_TEMPLATE/ config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: "fix: "
5+
labels: bug
6+
---
7+
8+
**Description**
9+
10+
A clear and concise description of what the bug is.
11+
12+
**Steps To Reproduce**
13+
14+
1. Go to '...'
15+
2. Click on '....'
16+
3. Scroll down to '....'
17+
4. See error
18+
19+
**Expected Behavior**
20+
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
25+
If applicable, add screenshots to help explain your problem.
26+
27+
**Additional Context**
28+
29+
Add any other context about the problem here.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Feature Request
3+
about: A new feature to be added to the project
4+
title: "feat: "
5+
labels: feature
6+
---
7+
8+
**Description**
9+
10+
Clearly describe what you are looking to add. The more context the better.
11+
12+
**Requirements**
13+
14+
- [ ] Checklist of requirements to be fulfilled
15+
16+
**Additional Context**
17+
18+
Add any other context or screenshots about the feature request go here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
Thanks for contributing!
3+
4+
Provide a description of your changes below and a general summary in the title
5+
6+
Please look at the following checklist to ensure that your PR can be accepted quickly:
7+
-->
8+
9+
## Description
10+
11+
<!--- Describe your changes in detail -->
12+
13+
## Type of Change
14+
15+
<!--- Put an `x` in all the boxes that apply: -->
16+
17+
- [ ] ✨ New feature (non-breaking change which adds functionality)
18+
- [ ] 🛠️ Bug fix (non-breaking change which fixes an issue)
19+
- [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
20+
- [ ] 🧹 Code refactor
21+
- [ ] ✅ Build configuration change
22+
- [ ] 📝 Documentation
23+
- [ ] 🗑️ Chore

.github/copilot-instructions.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# GitHub Copilot Workspace Instructions
2+
3+
You are a Senior Dart Engineer specializing in **CLI tooling**. Your goal is to
4+
deliver clean, production-ready code while strictly adhering to the project's standards.
5+
6+
## Rule Discovery & Context
7+
8+
Before planning or writing any code, you **MUST**:
9+
10+
1. Read **`AGENTS.md`** — complete architecture, coding standards, CLI patterns, and Orchestrator Pattern.
11+
2. Read **`CLAUDE.md`** — navigation guide and project-specific gotchas.
12+
3. Prioritize project-specific rules over your default coding style.
13+
14+
## Hard Constraints
15+
16+
- **NO CYRILLIC** — strictly prohibited in code, strings, logs, comments, and git metadata. English only.
17+
- **CALLBACKS** — must be single-expression. If logic exceeds one line, extract it into a private method.
18+
- **CLEAN CODE** — no conversational filler. Output only commit-ready code.
19+
- **NO `print()`** — all terminal output must go through the injected `Logger` instance from `mason_logger`.
20+
- **EXIT CODES**`run()` must return `ExitCode.success.code` or `ExitCode.software.code`. Never call `exit()` directly.
21+
22+
## Tech Stack
23+
24+
- **Language:** Dart (SDK `>=3.3.0 <4.0.0`)
25+
- **CLI framework:** `args` (`CommandRunner`, `Command`)
26+
- **Logging:** `mason_logger` (`Logger`)
27+
- **HTTP:** `http` package for simple GET; Dio (via local `data` package) for Configurator API
28+
- **Templates:** `mustache_template`
29+
- **Testing:** `test` + `mocktail`
30+
31+
## Architecture
32+
33+
- Simple commands: logic directly in `Command` subclass.
34+
- Complex commands: **Orchestrator Pattern**`Command``Context``Service``Processor``Runner`.
35+
- See **`AGENTS.md`** section 8 for full Orchestrator Pattern details.
36+
37+
## Git Standards & Workflow
38+
39+
### Branch Naming
40+
41+
**Pattern:** `^(feature|refactor|fix|chore|build|style|docs|release)/.+$`
42+
43+
- Allowed: `feature/add-new-command`, `fix/retry-on-timeout`, `chore/update-deps`.
44+
45+
### Commit Messages (Conventional Commits)
46+
47+
**Pattern:** `^(feat|fix|chore|refactor|test|docs|style|ci|perf|build|revert)(\(.+\))?: .+`
48+
49+
- Format: `<type>(<scope>): <description>` (scope is optional).
50+
- Examples: `feat(keystore): add verify command`, `refactor: extract retry logic`.
51+
52+
## Pre-Submission Checklist
53+
54+
1. Branch and commits match the patterns above.
55+
2. Multi-line callback logic is extracted to private methods.
56+
3. Imports are grouped and sorted as defined in `AGENTS.md` section 3.
57+
4. New commands and processors have corresponding test files.
58+
5. No `print()` — all output goes through `logger`.

.github/cspell.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"version": "0.2",
3+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
4+
"dictionaries": ["vgv_allowed", "vgv_forbidden"],
5+
"dictionaryDefinitions": [
6+
{
7+
"name": "vgv_allowed",
8+
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt",
9+
"description": "Allowed VGV Spellings"
10+
},
11+
{
12+
"name": "vgv_forbidden",
13+
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt",
14+
"description": "Forbidden VGV Spellings"
15+
}
16+
],
17+
"useGitignore": true,
18+
"words": [
19+
"webtrit",
20+
"WebTrit"
21+
]
22+
}

.github/dependabot.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
enable-beta-ecosystems: true
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
- package-ecosystem: "pub"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: webtrit_build_phone_tools
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
platform:
7+
description: 'Target platform for build'
8+
required: true
9+
default: 'windows' # or 'windows', 'linux', 'macos'
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
platform: linux
20+
output: webtrit_phone_tools
21+
- os: macos-latest
22+
platform: macos
23+
output: webtrit_phone_tools
24+
- os: windows-latest
25+
platform: windows
26+
output: webtrit_phone_tools.exe
27+
28+
steps:
29+
- name: Checkout source code
30+
uses: actions/checkout@v3
31+
32+
- name: Setup Dart SDK
33+
uses: dart-lang/setup-dart@v1
34+
with:
35+
sdk: "stable"
36+
37+
- name: Install dependencies
38+
run: dart pub get
39+
40+
- name: Build executable
41+
run: |
42+
if [ "${{ matrix.platform }}" == "windows" ]; then
43+
dart compile exe bin/webtrit_phone_tools.dart -o build/${{ matrix.output }}
44+
elif [ "${{ matrix.platform }}" == "linux" ]; then
45+
dart compile exe bin/webtrit_phone_tools.dart -o build/${{ matrix.output }}
46+
elif [ "${{ matrix.platform }}" == "macos" ]; then
47+
dart compile exe bin/webtrit_phone_tools.dart -o build/${{ matrix.output }}
48+
else
49+
echo "Unsupported platform"
50+
exit 1
51+
fi
52+
53+
- name: Upload build artifact
54+
uses: actions/upload-artifact@v3
55+
with:
56+
name: dart-cli-build-${{ matrix.platform }}
57+
path: build/${{ matrix.output }}
58+
59+
- name: Provide download link
60+
run: |
61+
echo "Download the build artifact at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts"
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: webtrit_phone_tools
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
paths:
10+
- ".github/workflows/webtrit_phone_tools.yaml"
11+
- "bin/**"
12+
- "lib/**"
13+
- "test/**"
14+
- "pubspec.yaml"
15+
push:
16+
branches:
17+
- main
18+
paths:
19+
- ".github/workflows/webtrit_phone_tools.yaml"
20+
- "bin/**"
21+
- "lib/**"
22+
- "test/**"
23+
- "pubspec.yaml"
24+
25+
jobs:
26+
semantic-pull-request:
27+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
28+
29+
build:
30+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
31+
with:
32+
format_line_length: 120
33+
min_coverage: 0
34+
35+
spell-check:
36+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
37+
with:
38+
includes: |
39+
**/*.md
40+
!brick/**/*.md
41+
.*/**/*.md
42+
modified_files_only: false
43+
44+
verify-version:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: 📚 Git Checkout
48+
uses: actions/checkout@v2
49+
50+
- name: 🎯 Setup Dart
51+
uses: dart-lang/setup-dart@v1
52+
with:
53+
sdk: "stable"
54+
55+
- name: 📦 Install Dependencies
56+
run: |
57+
dart pub get
58+
59+
- name: 🔎 Verify version
60+
run: dart run test --run-skipped -t version-verify

0 commit comments

Comments
 (0)