readiness

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 3 Imported by: 0

README

Event Media Readiness Checker

A dependency-free command-line tool that audits a wedding, party, or corporate event media plan before guests start uploading photos and videos.

It checks the operational details that are easy to miss in a design review: HTTPS destinations, privacy notices, removal contacts, moderation, live-display safety, retention, network testing, and fallback instructions.

Quick start

node ./bin/check-event-media.mjs ./examples/wedding.json

Use JSON output in CI or an event runbook pipeline:

node ./bin/check-event-media.mjs ./examples/wedding.json --json

The process exits with code 1 when the plan has blocking errors and 0 when it has only warnings or passes all checks.

Plan format

{
  "eventName": "Sam and Alex's wedding",
  "uploadUrl": "https://example.com/private-event",
  "shortUrl": "https://example.com/sam-alex",
  "privacyNotice": "Uploads go to the couple's private album.",
  "removalContact": "planner@example.com",
  "moderationMode": "approved_only",
  "liveDisplay": true,
  "retentionDays": 365,
  "uploadClosesAt": "2027-06-16T12:00:00Z",
  "networkTests": ["venue_wifi", "mobile_data"],
  "backupPlan": "Guests can save the short URL and upload for seven days.",
  "roles": ["organizer", "moderation", "export"]
}

Allowed moderation modes are approved_only, manual, and none. A live display without moderation is reported as a blocking issue.

Checks

  • Event and upload destination are defined.
  • Upload and short URLs use HTTPS.
  • Guest-facing privacy wording is present.
  • A removal contact is documented.
  • Retention is a positive, bounded number of days.
  • The upload closing time is valid.
  • Venue Wi-Fi and mobile-data paths were tested.
  • A fallback plan exists.
  • Moderation and export roles are assigned.
  • Live displays use a safe moderation mode.

Example output

Event media readiness: 95/100

Warnings:
  - roles: No explicit export owner is assigned.

Result: READY WITH WARNINGS

Why this exists

Event upload failures often sit between teams: the QR code is visually correct, the venue network works while empty, the privacy notice exists somewhere else, and no one owns the live-wall pause button. A machine-readable plan makes those assumptions reviewable before the event.

This checker is platform-neutral. For a concrete example of an app-free QR upload workflow with private albums and moderation, see Gathmo's event media flow.

Development

The validation rules are also available as a small Go package:

result := readiness.Validate(plan, time.Now())
if !result.Ready {
	log.Fatal(result.Errors)
}
npm test
npm run check
go test ./...

Node.js 20 or newer is recommended. The project has no runtime dependencies.

License

MIT

Documentation

Overview

Package readiness validates operational event-media plans.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Field   string `json:"field"`
	Message string `json:"message"`
}

Finding describes one validation error or warning.

type Plan

type Plan struct {
	EventName      string   `json:"eventName"`
	UploadURL      string   `json:"uploadUrl"`
	ShortURL       string   `json:"shortUrl"`
	PrivacyNotice  string   `json:"privacyNotice"`
	RemovalContact string   `json:"removalContact"`
	ModerationMode string   `json:"moderationMode"`
	LiveDisplay    bool     `json:"liveDisplay"`
	RetentionDays  int      `json:"retentionDays"`
	UploadClosesAt string   `json:"uploadClosesAt"`
	NetworkTests   []string `json:"networkTests"`
	BackupPlan     string   `json:"backupPlan"`
	Roles          []string `json:"roles"`
}

Plan records the guest upload, moderation, privacy, and fallback decisions for an event.

type Result

type Result struct {
	Score    int       `json:"score"`
	Errors   []Finding `json:"errors"`
	Warnings []Finding `json:"warnings"`
	Ready    bool      `json:"ready"`
}

Result is the scored validation outcome.

func Validate

func Validate(plan Plan, now time.Time) Result

Validate checks a plan using now when deciding whether its upload window is closed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL