[1.5] Restore Project

1. Front Matter

  • Title: Restore Project

  • Author: scorevi (Sean Patrick Caintic)

  • Reviewers: dyorgie (Jethro Lagmay)

  • Created: February 2026

  • Status: Approved

  • References:

    • Issue: [1.5] Restore Project #27

    • Milestone: [1] Diagnose (Project Setup)


2. Introduction & Goals

  • Problem Summary: Creators who archived projects may want to recover them. The restore feature returns archived projects to their active state, enabling full editing capabilities again.

  • Goals:

    • Restore archived projects to active status

    • Return project to DRAFT status (safe default)

    • Clean up archive metadata

    • Enable full editing again

  • Non-Goals:

    • Restore to original status (always DRAFT for safety)

    • Batch restore operations

    • Restore permanently deleted items

  • Glossary:

    • Restore: Move from ARCHIVED back to active status


3. High-Level Architecture

  • System Diagram:

image.png
  • Technologies Used:

    • Server Actions - Restore logic

    • Supabase - Status update


4. Detailed Design & Implementation

  • Data Model / Schema: Updates on restore:

Column

Before

After

status

ARCHIVED

DRAFT

archived_at

timestamp

NULL

previous_status

status

NULL

restored_at

NULL

timestamp

  • API Specification:

    • PATCH /api/creator/restore-content - Restore archived quest

    • Request body: questId (UUID, required) - Quest to restore

  • Logic & Workflows: Restore flow:

    1. Click "Restore" - API call (no confirmation needed)

    2. Verify status - Must be ARCHIVED

    3. Update status - Set to DRAFT

    4. Clear metadata - archived_at, previous_status → NULL

    5. UI refresh - Returns to active dashboard

  • Key Files:

    • app/api/creator/(content)/restore-content/route.ts - Restore API

    • components/creator/ArchivedProjectCard.tsx - Restore button


5. Infrastructure & Operations

  • Dependencies:

    • Supabase - Status persistence

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

  • Deployment Plan:

    1. Add restored_at column (optional tracking)

    2. Deploy API and UI

    3. No feature flags


6. Testing & Quality Assurance

  • Test Strategy:

    • Manual: Restore flow, active list update

    • Integration: API ownership checks

  • Known Limitations:

    • Always restores to DRAFT (not original status)

    • Published quests require re-review after restore


7. Maintenance & Support

  • Troubleshooting:

    • "Not archived" error → Quest not in Trash

    • Can't find restored quest → Check active list, refresh

  • Changelog:

    • 1.0 (Feb 2026): Initial implementation


Document Version

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


Was this article helpful?