This repository contains the scaffold template for the Bluelink CLI. It provides a generic, cloud-agnostic starting point for Bluelink projects using Celerity resources.
The scaffold template demonstrates:
- Basic Bluelink blueprint structure (YAML and JSONC formats)
- Celerity's cloud-agnostic resources (API, Handler, Datastore)
- Automatic resource linking via labels
- demonstration only: Celerity SDK capabilities (automatic configuration, cloud-agnostic clients)
- Deployment configuration patterns
- Sample handler code for educational purposes
├── README.md # This file (for maintainers)
├── README.md.tmpl # Template for generated project README
├── LICENSE # Apache 2.0 License
├── .gitignore # Python/IDE/Bluelink ignores
├── bluelink.deploy.jsonc.tmpl # Deployment configuration template
├── project.blueprint.yaml.tmpl # Blueprint in YAML format (template)
├── project.blueprint.jsonc.tmpl # Blueprint in JSONC format (template)
├── requirements.txt # Python dependencies (demo)
└── handlers/ # Sample handler code (demo)
├── __init__.py
└── resources/
├── __init__.py
└── update_resource.py
The Bluelink CLI replaces these Go template variables during project initialization:
| Variable | Description | Example |
|---|---|---|
{{.ProjectName}} |
User-provided project name | my-api |
{{.NormalisedProjectName}} |
Normalized version (lowercase, hyphens) | my-api |
{{.BlueprintFormat}} |
Selected format (yaml or jsonc) | yaml |
-
.tmplextension: Files with Go template syntax that need processingREADME.md.tmpl→README.mdproject.blueprint.yaml.tmpl→project.blueprint.yamlbluelink.deploy.jsonc.tmpl→bluelink.deploy.jsonc
-
No
.tmplextension: Files copied as-ishandlers/**/*.pyrequirements.txt.gitignore
- Demonstrates structure without dictating application details
- Uses example resources (API, handler, datastore) that users will replace
- Keeps it simple enough to understand, comprehensive enough to learn from
- Uses
celerity/*resource types (notaws/*,gcp/*) - Showcases cloud-agnostic patterns
- Demonstrates automatic linking and SDK capabilities
- Separates this from provider-specific templates (e.g.,
aws-simple)
- Includes Python handler code to demonstrate Celerity SDK usage
- Clearly marked as "demonstration only" with warnings
- Shows best practices (commented SDK usage) without being production-ready
- Users can delete handlers if they only need blueprint examples
- Provides both YAML and JSONC blueprint formats
- CLI selects one based on user preference
- Both are kept in sync with identical structure
- Update both blueprint formats: Make identical changes to
.yaml.tmpland.jsonc.tmpl - Add explanatory comments: Help users understand what each section does
- Update README.md.tmpl: Document new features in the generated project README
- Test with CLI: Run
bluelink init --template scaffoldto verify template processing
When updating blueprints, ensure:
- YAML and JSONC have identical structure
- Comments are adapted to format (# vs //)
- Both files reference the same resources and variables
- Template variables are used consistently
Before committing changes:
-
Test template generation:
bluelink init --template scaffold --project-name test-project cd test-project -
Verify template variables were replaced:
# Should see "test-project", not "{{.ProjectName}}" cat README.md -
Validate blueprint syntax:
bluelink validate --blueprint-file project.blueprint.yaml
-
Test both formats:
bluelink init --template scaffold --blueprint-format yaml --project-name test-yaml bluelink init --template scaffold --blueprint-format jsonc --project-name test-jsonc
When contributing to this template:
- Open an issue describing the proposed change
- Discuss whether it belongs in
scaffoldor a more specific template - Update all relevant files (both blueprint formats, README, handler code)
- Test thoroughly with the Bluelink CLI
- Submit a PR with clear description of changes
- Use conventional commit messages
- Template Issues: Bluelink GitHub Issues
- Celerity Questions: Celerity GitHub Issues
- Documentation: Bluelink Docs
Apache License 2.0 - See LICENSE file for details.