Skip to content

3d-omics/database

Repository files navigation

Admin Guide: Updating Site Data

📊 When to Update Data

Update the site whenever you:

  • Add new records to Airtable
  • Modify existing Airtable data
  • Update CSV files (genome metadata, sample counts)

🔧 How to Update + Deploy

Step 1: Update Data Locally

# Navigate to project directory
cd your-project-folder

# Fetch fresh data from Airtable and regenerate JSON files
npm run generate-data

This regenerates all 102 JSON files:

  • 9 Airtable tables
  • 14 genome metadata files
  • 14 macro genome count files
  • 69 microsample count files

Step 2: Test Locally (Optional)

# Run development server to verify
npm run dev

Visit http://localhost:5173 to check the updated data.

Step 3: Deploy

# Build for production
npm run build

# Commit and push (triggers auto-deployment)
git add .
git commit -m "Update data from Airtable"
git push origin main

📝 Quick Reference

Task Command
Fetch fresh Airtable data npm run generate-data
Test locally npm run dev
Build for production npm run build
Deploy git push origin main
Quick refresh (no local changes) git commit --allow-empty -m "Refresh" && git push

⚠️ Important Notes

CSV File Changes

If you update CSV files in src/assets/data/:

  1. Commit the CSV changes: git add src/assets/data/ && git commit -m "Update CSV data"
  2. Push: git push origin main
  3. GitHub Actions will regenerate JSON files automatically

Generated Files

NEVER manually edit these folders:

  • src/assets/data/airtable/
  • src/assets/data/genome_metadata_json/
  • src/assets/data/macro_genome_counts_json/
  • src/assets/data/microsample_counts_json/

They are auto-generated and will be overwritten.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages