Workspace Service Component
Purpose
Own the framework-specific adapter behind the single public bootstrap-xcode-workspace --operation add-component --component-kind service entrypoint. A service is a SwiftPM executable under Services/; it does not become a standalone repository and does not require converting the product later.
Contract
- Require an existing canonical root workspace with
project.ymlandServices/services-shared.yml. - Generate Hummingbird with
hb initor Vapor withvapor new; preserve framework-owned Swift package and application structure. - Remove generated local Compose files and nested Git metadata. Preserve a Dockerfile only as GitHub Actions cloud-build input; never build it locally.
- Add the package to
Services/services-shared.ymlso the root XcodeGen project and workspace expose it. - Install a native local dependency check that discovers the repository's one installed PostgreSQL formula or uses its explicit
SERVICE_POSTGRES_FORMULAoverride, then requires it to be running throughbrew services. Missing or ambiguous prerequisites block with explicit install/start guidance; the workflow never installs them or starts a container fallback. - Install GitHub Actions as the only Linux artifact, live-test deployment, and production deployment surface. Deployment jobs use protected GitHub environments and repository-owned deploy scripts.
- Validate with native
swift buildandswift testunless skipped.
Guards
- Do not create a standalone server repository.
- Do not add Docker Compose, Colima, Lima, Docker Desktop, QEMU, Apple container machines, or Linux VMs to local development.
- Do not build Linux archives or OCI images on the Mac.
- Do not retain the retired standalone Hummingbird/Vapor bootstrap or guidance-sync paths as wrappers.
- Use Soto as the default AWS SDK when service code needs AWS; use the official AWS SDK for Swift only for an explicit capability or compatibility requirement.