# Trash & Recovery

Deleted projects aren't gone forever. OpenCharts uses soft-delete with a 30-day retention window, plus local draft recovery to prevent accidental data loss.

## How Deletion Works

When you delete a project, it's **soft-deleted** — it gets a `deletedAt` timestamp and disappears from your main project list, but the data is preserved.

Soft-deleted projects are automatically **purged after 30 days**. Once purged, recovery is not possible.

## Viewing the Trash

Navigate to **Projects → Trash** (or use the Trash filter in the folder sidebar). You'll see all soft-deleted projects with their deletion date and days remaining before permanent removal.

## Restoring a Project

In the Trash view, click **Restore** on any project to move it back to your main project list. The project returns to its original folder (if the folder still exists) or becomes unfoldered.

## Permanent Deletion

Click **Delete Permanently** in the Trash view to immediately remove a project. This action is irreversible. You can also use **Empty Trash** to permanently delete all trashed projects at once.

Permanent deletion removes all project data, version history, and shared links. Make sure to export important projects before purging.

## Draft Recovery

### Automatic Local Drafts

OpenCharts continuously saves your work to **localStorage** as you edit. If you accidentally close the browser or navigate away before the backend save completes, the draft is preserved locally and restored on your next visit.

### Draft Expiry

Local drafts are automatically cleaned up after **30 days**. Once the backend save succeeds, the local draft is no longer needed and is cleared.
