- 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 #2
- Add storage.py with load_user(), save_user(), next_bounty_id()
- Rewrite commands.py to use JSON storage (simplified)
- Remove db.py, schema.sql, cron.py, test_db.py
- Update SPEC.md to reflect new architecture
- Admin model removed (anyone can add, creator only can edit/delete)
- No reminders in v1
db.py:
- Add conn.isolation_level = None to get_conn() — fixes row_factory +
autocommit conflict. row_factory disables implicit transactions,
so we need explicit autocommit mode.
- Remove all conn.commit() calls (unnecessary with autocommit)
pyproject.toml:
- Move pytest + pytest-asyncio to main dependencies (uv run pytest
uses ephemeral env with main deps only)
tests/test_db.py:
- Fix test_upsert_user_updates_username to not chain upsert_user()
calls in assert expressions (test isolation issue)
JIGAIDO is now a platform with apps/ as the container.
All telegram-bot files moved to apps/telegram-bot/:
- bot.py, commands.py, cron.py, db.py, schema.sql
- requirements.txt, .env.example, README.md
- Root now holds SPEC.md, README.md, CONTRIBUTING.md only.
Structure:
jigaido/
├── apps/
│ └── telegram-bot/
└── SPEC.md, README.md, CONTRIBUTING.md