# Sprint G011 — Guest Book Engine

## Context

Project: INVEETAIRE Digital Invitation Platform

Architecture:

Couple Panel (CMS)
        ↓
Invitation Configuration
        ↓
InvitationRenderer
        ↓
Public Invitation

Completed Engines:

✅ G004 Media Engine
✅ G005 Image Processing Engine
✅ G006 Guest Engine
✅ G007 Music Engine
✅ G008 QR Attendance Engine
✅ G009 Couple Panel Integration
✅ G010 RSVP Engine

This sprint introduces the complete Guest Book Engine.

---

# Objective

Implement a complete Guest Book (Wishes) system allowing invited guests to leave messages while giving the Couple full control over visibility and moderation.

Guest identity is determined exclusively by the invitation token.

No anonymous posting.

No login system.

No replies.

No reactions.

No social features.

---

# Core Principles

Guest token is the source of identity.

One guest may submit one wish.

Guest Book belongs to the invitation.

Couple controls visibility.

Public Invitation only renders approved wishes.

---

# Scope

## 1. Couple Panel Settings

Reuse existing configuration where available.

Support:

- Enable Guest Book
- Display Public Wishes
- Require Moderation
- Maximum Character Limit
- Sort Order
    - Newest First
    - Oldest First

Do NOT redesign existing CMS.

Reuse existing configuration if already implemented.

---

## 2. Public Invitation

Display Guest Book section only when enabled.

Guest sees:

- Guest Name (auto-filled from invitation)
- Wish Textarea

Do NOT ask guest to type their own name.

Identity always comes from Guest record.

---

## 3. Validation

Validate:

- Invitation published
- Guest token valid
- Character limit
- Empty message
- Duplicate submission

Friendly validation messages.

---

## 4. Editing

Guest may edit their own wish.

Update existing record.

No duplicate wishes.

One Guest = One Wish.

---

## 5. Moderation

If moderation enabled:

Status:

- Pending
- Approved
- Rejected

Public Invitation displays only Approved wishes.

Pending wishes remain invisible.

Rejected wishes never appear publicly.

---

## 6. Public Display

If Display Public Wishes disabled:

Guest can still submit wishes.

No wishes are rendered publicly.

If enabled:

Render approved wishes only.

Each item shows:

- Guest Name
- Message
- Submission Date

Never expose guest phone number or other private information.

---

## 7. Couple Panel Dashboard

Provide Guest Book management table.

Columns:

- Guest
- Message Preview
- Status
- Submitted At

Actions:

- Approve
- Reject
- Edit (optional)
- Delete

Support:

- Search
- Filter by Status
- Sort by Date

---

## 8. Business Rules

Guest token required.

Invitation must be published.

One guest may only own one wish.

Edits update existing wish.

Character limit enforced.

Moderation rules respected.

---

## 9. Database

Reuse existing tables if possible.

Create new table only if Guest Book persistence does not yet exist.

Suggested fields:

- guest_id
- invitation_id
- message
- status
- submitted_at
- updated_at
- approved_at
- approved_by

Avoid duplicated data.

---

## 10. Renderer

InvitationRenderer exposes Guest Book configuration.

Themes only render prepared data.

No moderation logic inside views.

No SQL inside templates.

---

## 11. Privacy

Never expose:

- Phone Number
- Email
- Guest Token
- Internal IDs

Only display:

Guest Name

Wish

Submission Date

---

# Deliverables

Complete Guest Book workflow.

Guest can:

- Submit one wish
- Edit existing wish

Couple can:

- Approve wishes
- Reject wishes
- Manage Guest Book

Public Invitation displays only allowed wishes.

Renderer fully integrated.

Validation completed.

---

# Testing Checklist

- Guest Book hidden when disabled
- Guest Book visible when enabled
- Character limit enforced
- Empty message rejected
- Duplicate wish prevented
- Edit updates existing wish
- Moderation workflow works
- Approved wishes displayed
- Pending wishes hidden
- Rejected wishes hidden
- Public display toggle works
- Existing invitations remain unaffected

---

# Expected Result

After Sprint G011:

INVEETAIRE provides a complete Guest Book Engine integrated with Guest Engine and Couple Panel.

Guest wishes are securely linked to invitation tokens.

Couple has full moderation and visibility control.

The implementation must remain simple, maintainable, and consistent with the existing platform architecture.