๐Ÿ›ก๏ธ P3CL Backup & Restore Tool

Project 3 Consultants & Logistics Inc.
โš ๏ธ Open this file directly in Chrome on your computer (File โ†’ Open File, or drag it into Chrome). It reads your browser's localStorage and IndexedDB to export your settings and data. You must be on the same device and browser where you use the P3CL platform.
โš™๏ธ

Settings & Secrets Backup

Exports your Supabase connection, API keys, email config, and custom templates to a JSON file you can store safely.

To restore on a new device or after clearing browser data:

๐Ÿ’พ

Local Data Backup (IndexedDB)

Exports all locally cached data โ€” projects, estimates, clients, procurement orders, messages, and more โ€” to a JSON file.

โš ๏ธ This is your device's local cache. For the authoritative backup, use Supabase (see below).

โ˜๏ธ

Supabase Database Backup โ€” Step-by-Step

Your Supabase database is the authoritative source of all data. Back it up regularly using the Supabase dashboard.

Method A โ€” SQL Dump (Recommended)

1
Go to supabase.com โ†’ your project โ†’ Database โ†’ Backups
2
On free plan: click Download next to any listed backup (Supabase keeps 7 days of daily backups on paid plans; free plan: use the SQL Editor export below)
3
Free plan alternative: SQL Editor โ†’ run the query below โ†’ copy results โ†’ save as .sql file

Method B โ€” Table Editor CSV Export

For each table you want to back up:

1. Supabase โ†’ Table Editor
2. Click the table name (e.g. clients)
3. Click the Export button (top right)
4. Choose CSV or JSON
5. Save the file with the table name

Tables to export:
clients projects estimates tasks procurement_orders materials rates notes messages user_profiles
๐Ÿ’ก Paid Supabase plan tip: On the Pro plan ($25/mo) Supabase keeps 7 days of automatic point-in-time daily backups and lets you download them as .sql.gz files from the Backups section. This is the easiest option and takes one click.
๐Ÿ™

GitHub Code Backup โ€” Permanent Version Control

GitHub stores your complete platform code with a full history of every change. Free. Unlimited. If your laptop dies, Netlify burns down, or you need to roll back a bad update โ€” GitHub has everything.

First-Time Setup (one-off)

1. Go to github.com โ†’ sign up (free)
2. Click + New repository
3. Name it p3cl-platform
4. Set to Private (your code stays yours)
5. Do NOT tick "Add README"
6. Click Create repository
7. Install Git on your computer: git-scm.com
8. Unzip p3cl-deploy.zip to a folder

Push your code to GitHub

Open Terminal (Mac/Linux) or Git Bash (Windows) and run:

After every update

Each time you get a new p3cl-deploy.zip, copy the files over and run:

Connect Netlify to GitHub (auto-deploy)

Once connected, pushing to GitHub automatically deploys to Netlify:
1. Netlify โ†’ Site configuration โ†’ Build & deploy
2. Click Link to Git provider โ†’ GitHub
3. Select your p3cl-platform repo
4. Branch: main, Publish dir: leave blank
5. Click Deploy site
Now every git push goes live automatically.
โš ๏ธ Never commit secrets to GitHub. The platform code itself contains no secrets โ€” API keys and Supabase credentials are stored in your browser's localStorage, not in any file. The p3cl-deploy.zip is safe to push to GitHub as-is.
๐Ÿ”„

Full Platform Restore โ€” Step by Step

Follow these steps to restore the complete platform after a catastrophic failure (lost device, account lockout, accidental deletion, etc.).

Step 1 โ€” Restore the code
If you have GitHub:
โ€ข Download the repo as ZIP from GitHub
โ€ข Or: git clone https://github.com/YOU/p3cl-platform.git

If you have the ZIP backup only:
โ€ข Drag p3cl-deploy.zip to Netlify
Step 2 โ€” Restore the database
In Supabase SQL Editor:
โ€ข Run SUPABASE_SCHEMA.sql first (creates all tables)
โ€ข Then paste and run your saved SQL dump

If you have CSV exports:
โ€ข Table Editor โ†’ Import โ†’ select each CSV file per table
Step 3 โ€” Restore secrets
Open the platform URL in Chrome โ†’ open this Backup Tool โ†’ Restore Settings from File โ†’ select your settings .json backup

Or enter manually in Settings:
โ€ข Supabase URL + anon key
โ€ข Resend API key
โ€ข AI API key (OpenRouter/Anthropic)
Step 4 โ€” Verify
โ€ข Sync dot โ†’ Setup โ†’ Test Connection โ†’ should show all 13 tables green
โ€ข Settings โ†’ Email โ†’ Send Test Email
โ€ข Material Pricing โ†’ AI Search โ†’ test a query
โ€ข Team Chat โ†’ send a test message
โ€ข Check dashboard shows your data
๐Ÿ“…

Recommended Backup Schedule

Frequency What How Time
Daily Supabase auto-backup Automatic on Pro plan ($25/mo). Free plan: manual SQL dump weekly. 0 min (auto)
Weekly Code push to GitHub git add . && git commit -m "weekly backup" && git push 2 min
Monthly Settings + full data export Use this tool โ†’ Export Settings + Export Local Data โ†’ save to cloud drive. 5 min
After every update New code ZIP + schema Push updated ZIP to GitHub immediately after deploying to Netlify. 2 min
๐Ÿ’ก Where to store backup files: Google Drive, Dropbox, or OneDrive. Create a folder called P3CL Backups with subfolders: Database, Settings, LocalData. Name files with the date: p3cl-settings-2025-06-15.json
P3CL Platform Backup & Restore Tool ยท Project 3 Consultants & Logistics Inc. ยท info@p3cl.com