Skip to content

Instantly share code, notes, and snippets.

View jnbdz's full-sized avatar
👨‍💻
None stop

JN Σ jnbdz

👨‍💻
None stop
View GitHub Profile
variable "aws_region" {
description = "AWS region to deploy into"
type = string
default = "us-east-1"
}
variable "project_name" {
description = "Used as a prefix for all resource names"
type = string
}
locals {
prefix = "${var.project_name}-${var.environment}"
}
# ──────────────────────────────────────────────
# ECS Task Execution Role
# Used by the ECS control plane to pull images
# and write logs — NOT your application code.
# ──────────────────────────────────────────────
resource "aws_iam_role" "ecs_execution" {
# ──────────────────────────────────────────────
# CloudWatch Log Groups
# ──────────────────────────────────────────────
resource "aws_cloudwatch_log_group" "app" {
name = "/ecs/${local.prefix}/app"
retention_in_days = var.log_retention_days
}
resource "aws_cloudwatch_log_group" "sfn" {
name = "/aws/states/${local.prefix}-state-machine"
# ──────────────────────────────────────────────
# Step Functions State Machine
#
# Uses .sync:2 integration so Step Functions
# waits for each ECS task to finish before
# moving to the next state — no polling needed.
#
# Each step overrides the container command to
# run a different Python file. All share the
# same task definition and Docker image.
FROM python:3.12-slim
WORKDIR /app
# System deps needed by some Python packages
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry (pinned for reproducibility)
View Descriptor Protocol (VDP)¶
Status: Working Draft Version: 0.1.0
Abstract¶
The View Descriptor Protocol (VDP) defines a standard mechanism for associating API data responses with the templates that should render them. A view descriptor is a JSON structure that identifies a root template by URL and declares how sub-templates compose into named slots, forming a recursive template tree. View descriptors can be transported via HTTP headers (for constrained formats like OData4) or inline in the response body (for flexible formats like HAL+JSON). The protocol is framework-agnostic — templates can be HTML/Qute, SwiftUI views, Compose layouts, or any other rendering format.
1. Problem Statement¶
REST APIs return structured data (JSON, XML) that carries no presentation information. The client must independently decide how to render this data — typically by hardcoding template choices into client logic. This creates tight coupling between API consumers and their rendering layer.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://vdp.dev/schemas/vdp.v0-1.schema.json",
"title": "View Descriptor Protocol (VDP) v0.1",
"description": "Schema for VDP view descriptor documents. Validates standalone ViewDescriptor and MultiViewDescriptor payloads. Definitions in $defs can be referenced by other schemas for inline body transport (_view / _views).",
"oneOf": [
{ "$ref": "#/$defs/ViewDescriptor" },
{ "$ref": "#/$defs/MultiViewDescriptor" }
],

View Descriptor Protocol (VDP)

Status: Working Draft Version: 0.1.0

Abstract

The View Descriptor Protocol (VDP) defines a standard mechanism for associating API data responses with the templates that should render them. A view descriptor is a JSON structure that identifies a root template by URL and declares how sub-templates compose into named slots, forming a recursive template tree. View descriptors can be transported via HTTP headers (for constrained formats like OData4) or inline in the response body (for flexible formats like HAL+JSON). The protocol is framework-agnostic — templates can be HTML/Qute, SwiftUI views, Compose layouts, or any other rendering format.

1. Problem Statement

[Desktop Entry]
Name=dwm
Comment=Dynamic Window Manager
Exec=/usr/local/bin/dwm
Type=Application
X-GDM-SessionRegisters=true
---
name: Pre-Build Workflow
on:
push:
branches:
- master
- develop
jobs:
tests:
runs-on: ${{ matrix.os }}