[1.4] Archive Project

1. Front Matter

  • Title: Archive Project

  • Author: scorevi

  • Reviewers: dyorgie

  • Created: February 2026

  • Status: ✅ Approved

  • References:

    • Issue: [1.4] Archive Project #26

    • Milestone: [1] Diagnose (Project Setup)

    • Related: [1.5] Restore Project, [1.6] Permanent Delete


2. Introduction & Goals

  • Problem Summary: Creators need to remove projects from their active dashboard without losing data. A soft-delete (archive) approach preserves data for potential recovery.

  • Goals:

    • Implement soft-delete via status change to ARCHIVED

    • Move archived projects to a Trash tab

    • Make archived projects read-only

    • Preserve previous status for restore

  • Non-Goals:

    • Auto-archive after inactivity

    • Batch archive operations

    • Archive adventures (quests only)

  • Glossary:

    • Soft Delete: Status change, data preserved

    • Trash Tab: UI section showing archived items


3. High-Level Architecture

  • System Diagram:

image.png
  • Technologies Used:

    • Server Actions - Archive logic

    • Supabase - Status update

    • Shadcn AlertDialog - Confirmation modal


4. Detailed Design & Implementation

  • Data Model / Schema:

quests Table Updates:

Column

Type

Description

status

TEXT

Set to ARCHIVED

archived_at

TIMESTAMPTZ

Archive timestamp

previous_status

TEXT

Status before archive

  • API Specification:

    • PATCH /api/creator/archive-content - Archive quest

      • Request: { questId: UUID (required) }

    • GET /api/creator/list-archived - List archived items

  • Logic & Workflows:

Archive Flow:

  1. Click "Archive" → Confirmation dialog

  2. Confirm → API call

  3. Update status → ARCHIVED, save previous_status

  4. UI refresh → Removed from active, appears in Trash

Archived State:

  • Read-only (no edits)

  • Cannot publish

  • Cannot submit for review

  • Canvas view disabled

  • Key Files:

    • app/api/creator/(content)/archive-content/route.ts - Archive API

    • components/creator/ArchiveConfirmDialog.tsx - Confirmation UI


5. Infrastructure & Operations

  • Dependencies:

    • Supabase - Status persistence

  • Monitoring & Alerting: No specific monitoring. Archive is idempotent.

  • Deployment Plan:

    1. Add archived_at, previous_status columns

    2. Deploy API and UI

    3. No feature flags


6. Testing & Quality Assurance

  • Test Strategy:

    • Manual: Archive flow, Trash tab

    • Integration: API ownership checks

  • Known Limitations:

    • Cannot archive quests that are IN_REVIEW (must withdraw first)

    • No bulk archive


7. Maintenance & Support

  • Troubleshooting:

    • "Already archived" error → Quest already in Trash

    • Can't archive → Check ownership, status

  • Changelog:

    • 1.0 (Feb 2026): Initial implementation


Document Version

1.0 - Approved, Feature deployed to production, 02/21/2026


Was this article helpful?