A TypeScript development scaffold for full-stack Web applications. The repository combines reusable server, browser, and mobile starters with GitHub Actions for testing, deployment, requirement intake, and AI-assisted implementation.
| Path | Purpose |
|---|---|
server/ |
Node.js REST API scaffold |
browser/ |
Next.js web application scaffold |
mobile/ |
Taro mobile application scaffold |
.github/workflows/ |
CI, deployment, submodule updates, and issue automation |
script/ |
Shared TypeScript automation used by workflows |
documents/ |
Requirement Markdown and its generated tasks.yml |
The three application folders start as Git submodules. Requirement automation converts selected submodules to ordinary files in a review pull request, so feature work can evolve the relevant scaffold locally.
flowchart LR
Issue[📝 Documentation issue] --> Intake[📎 Textify attachments]
Intake --> Markdown[📄 Save content.md]
Markdown --> Split[🧩 Generate tasks.yml]
Split --> Vendor[📦 Localize selected scaffolds]
Vendor --> Review[🔍 One review PR]
Review --> Closed{Requirement completed?}
Closed -->|Yes| Children[🎫 Create child issues]
Children --> Agent{Selected agent}
Agent -->|Copilot| Assign[🤖 Assign Copilot]
Agent -->|Other CLI| Implement[🛠️ Implement and open a closing PR]
Parent[📌 Parent issue completed] --> ChildrenIssue[🎫 Start eligible child issues]
ChildrenIssue --> Agent
- A new or reopened
documentationissue selects one or more scopes and an AI agent. - One workflow job converts attachments to Markdown, stores
documents/{issue-title}-{issue-number}/content.mdwith issue metadata and the requirement form's Markdown body, and streams end-to-end user-story tasks into the adjacenttasks.yml. Task descriptions cover the applicable backend, browser, mobile, and AI skill work. - The same job initializes and localizes selected scaffold submodules, removes their nested pnpm lockfiles and root hidden directories, runs
pnpm -r i --no-frozen-lockfilefrom the repository root, and opens one review PR containing the documents and code changes. A complete plan closes the requirement when merged; an incomplete plan is preserved for review and must be completed and set topendingbefore closing. Workspace installs allow the root lockfile to change because unlocalized submodules may be absent. - Closing the documentation issue as completed creates each task as a child issue, labels it with the selected scope and agent, records the child number in
tasks.yml, and links prerequisite tasks using GitHub'sblocked byrelationships.dependsOnholds an array of earlier task indices; older single-index and null values remain supported. - A new or reopened non-documentation issue is delegated to Copilot or the selected coding CLI only when all blocking issues are completed. The parent-child relationship organizes tasks under the documentation issue and does not itself block delegation. Completing an issue rechecks the open issues it blocks.
- Non-Copilot implementations are proposed in pull requests referencing the corresponding issues.
The issue-creation workflow listens both for issues closed as completed and for changes to
documents/**/tasks.yml. It checks that each requirement is completed in either case, so requirements closed as not planned or duplicate are skipped, regardless of whether the review PR merges before or after closure.
The workflows use three tokens for different purposes. Store PATs as repository Actions secrets; do not create a secret for the automatically generated GITHUB_TOKEN. Update existing PAT secrets to the names below in Repository Actions secrets.
- Application: Automatically issued for each Actions run. Used by workflow steps and as a fallback by
ghand Copilot CLI when their higher-priority token variables are unset. - Permissions: No PAT scopes. Grant only the permissions needed in each workflow's
permissions:block:- Issue and PR automation:
issues: write,contents: write, andpull-requests: write. - Copilot requests:
copilot-requests: write.
- Issue and PR automation:
- Manual settings: In Repository Actions settings, choose Read and write permissions if required. Enable Allow GitHub Actions to create and approve pull requests when a workflow creates PRs with this token. No token secret is needed.
- Organization policy: For organization-billed Copilot CLI requests, an organization owner must enable the Copilot CLI policy. See Copilot CLI in Actions.
-
Application: Classic PAT exposed through the official
ghenvironment variable. It takes precedence overGITHUB_TOKENand is used for issue operations and events that must trigger automation. -
Permissions: For current workflow usage, select the classic scopes:
repo: repository read/write access.workflow: dispatch workflows.project: Project read/write access, if managing Projects; useread:projectfor read-only access.
Classic scopes are broad and do not provide per-repository read/write controls.
-
Manual setup: Create a classic PAT, then save it as the
GH_TOKENrepository secret.
- Application: Fine-grained PAT exposed through Copilot CLI's official Copilot-specific environment variable. It takes precedence over
GH_TOKENandGITHUB_TOKENfor Copilot CLI authentication; when unset, the CLI falls back to those variables. - Permissions: Create a fine-grained PAT owned by your personal account and grant Account permissions → Copilot Requests: Read. This permission authorizes Copilot requests; it is not a repository write permission.
- Manual setup: Create a Copilot fine-grained PAT, then save it as the
COPILOT_GITHUB_TOKENrepository secret.
For organization-owned repositories, the organization must allow Copilot CLI usage billed to the organization. The fine-grained PAT is optional when Actions GITHUB_TOKEN is enabled for Copilot requests. See Copilot CLI authentication and fine-grained PAT setup.
Configure the provider secret for each non-Copilot agent used by the issue form:
| Agent | Repository secret | Description |
|---|---|---|
| OpenAI Codex | OPENAI_API_KEY |
|
| Gemini CLI | GEMINI_API_KEY |
|
| Claude Code | ANTHROPIC_API_KEY |
|
| Qoder CLI | QODER_PERSONAL_ACCESS_TOKEN |
|
| Kimi CLI | MOONSHOT_API_KEY |
|
| Kilo CLI | KILO_CONFIG_CONTENT |
JSON config with model and provider credentials; see Kilo CLI docs |
Use Node.js 22+ and PNPM 11+:
pnpm install
pnpm testGitHub Actions jobs that run pnpm allow dependency install scripts automatically, including scripts added by future transitive dependencies. Local installations continue to use the allowBuilds approvals in pnpm-workspace.yaml.
Automated pull request commits skip Git hooks; local Git hooks remain enabled.
The test suite uses the Node.js test runner, Jest expect, Jest mock, and Playwright. Chromium is installed by the test lifecycle. Browser tests expect the browser scaffold to be running at http://localhost:3000.
Creating a server-v* or browser-v* tag deploys the corresponding Docker container. Browser branch pushes trigger Vercel previews, with the main branch deploying to production. Mobile changes on the main branch build and upload a WeChat mini-program development version; the mini-program must still be reviewed and published on the WeChat platform. Vercel and mobile deployments can also be started manually.
For container deployment, configure HOST, USER, and SSH_KEY. Set SSH_HOST_FINGERPRINT to verify the server's SSH host key; without it, the SSH actions do not verify the host key. Server runtime configuration uses APP_SECRET; browser runtime configuration uses ENV_FILE. Without HOST, the workflows build images but skip remote deployment.
After deployment, all stopped containers and unused images on the host are pruned, including those from other projects.