feat: Replace SQLite with per-user JSON storage (fixes #2) #3
Reference in New Issue
Block a user
Delete Branch "fix/issue-2-json-storage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
data/users/storage.pywith atomic writes via tempfile+renamedb.py,schema.sql,cron.py,test_db.pyKey Changes
data/users/{telegram_user_id}.jsonClarifying Questions
Posted questions on issue #2 regarding data location, cross-group bounty lookup, and admin model removal.
lgtm
Changed from per-user flat files to group/DM directory structure: - data/{group_id}/group.json — group bounties - data/{group_id}/{user_id}.json — user tracking in group - data/{user_id}/user.json — user personal bounties (DM) - Groups isolated, no cross-group access - Tracking is per-group-per-user- Storage: Change from per-user to per-group JSON files - Data location: ~/.jigaido/ instead of apps/telegram-bot/data/ - Group bounties: data/{group_id}/group.json - User tracking: data/{group_id}/{user_id}.json - Personal bounties: data/{user_id}/user.json - Update commands.py for new storage model - Update bot.py to remove admin handlers - Update tests to reflect created_by_user_id field - Update SPEC.md with new design Addresses user feedback from issue #2lgtm