Replace SQLite with JSON file storage

- Remove database.py (SQLite) from tools/storage/ and dss-mvp1/
- Add json_store.py with full JSON-based storage layer
- Update 16 files to use new json_store imports
- Storage now mirrors DSS canonical structure:
  .dss/data/
  ├── _system/    (config, cache, activity)
  ├── projects/   (per-project: tokens, components, styles)
  └── teams/      (team definitions)
- Remove Docker files (not needed)
- Update DSS_CORE.json to v1.1.0

Philosophy: "Eat our own food" - storage structure matches DSS design

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-10 08:21:14 -03:00
parent 7a3044bccc
commit 069f5482d8
22 changed files with 1064 additions and 2382 deletions

View File

@@ -64,10 +64,9 @@ from browser_logger import router as browser_log_router
# Legacy imports (will gradually migrate these)
from config import config
from storage.database import (
from storage.json_store import (
Projects, Components, SyncHistory, ActivityLog, Teams, Cache, get_stats,
FigmaFiles, ESREDefinitions, TokenDriftDetector, CodeMetrics, TestResults,
get_connection
FigmaFiles, CodeMetrics, TestResults, TokenDrift, Tokens, Styles
)
from figma.figma_tools import FigmaToolSuite
@@ -405,16 +404,15 @@ async def health():
import psutil
from pathlib import Path
# ❤️ Check Heart (database) connectivity
# ❤️ Check Heart (storage) connectivity
db_ok = False
try:
with get_connection() as conn:
conn.execute("SELECT 1").fetchone()
db_ok = True
from storage.json_store import DATA_DIR
db_ok = DATA_DIR.exists()
except Exception as e:
import traceback
error_trace = traceback.format_exc()
print(f"🏥 VITAL SIGN: Heart (database) error: {type(e).__name__}: {e}", flush=True)
print(f"🏥 VITAL SIGN: Heart (storage) error: {type(e).__name__}: {e}", flush=True)
print(f" Traceback:\n{error_trace}", flush=True)
pass