Add BeanFlows MVP: coffee analytics dashboard, API, and web app
- Fix pipeline granularity: add market_year to cleaned/serving SQL models - Add DuckDB data access layer with async query functions (analytics.py) - Build Chart.js dashboard: supply/demand, STU ratio, top producers, YoY table - Add country comparison page with multi-select picker - Replace items CRUD with read-only commodity API (list, metrics, countries, CSV) - Configure BeanFlows plan tiers (Free/Starter/Pro) with feature gating - Rewrite public pages for coffee market intelligence positioning - Remove boilerplate items schema, update health check for DuckDB - Add test suite: 139 tests passing (dashboard, API, billing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
23
web/scripts/backup.sh
Normal file
23
web/scripts/backup.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# BeanFlows Manual Backup Script
|
||||
|
||||
BACKUP_DIR="./backups"
|
||||
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
||||
DB_PATH="./data/app.db"
|
||||
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
|
||||
# Create backup using SQLite's backup command
|
||||
sqlite3 "$DB_PATH" ".backup '$BACKUP_DIR/app_$TIMESTAMP.db'"
|
||||
|
||||
# Compress
|
||||
gzip "$BACKUP_DIR/app_$TIMESTAMP.db"
|
||||
|
||||
echo "✅ Backup created: $BACKUP_DIR/app_$TIMESTAMP.db.gz"
|
||||
|
||||
# Clean old backups (keep last 7 days)
|
||||
find "$BACKUP_DIR" -name "*.db.gz" -mtime +7 -delete
|
||||
|
||||
echo "🧹 Old backups cleaned"
|
||||
Reference in New Issue
Block a user