Commit graph

6 commits

Author SHA1 Message Date
862fe0bfad Add Docs 2025-12-14 12:47:34 +01:00
cbdd5f3779 Add UI improvements plan for bulk permission features
Documents comprehensive enhancements to Castle permissions UI:
- Analytics dashboard with permission usage statistics
- Bulk grant operations for multiple users
- Permission template copying from experienced users
- User offboarding with revoke-all
- Account sync UI with manual trigger
- Expiring permissions alerts

Implementation prioritized into 3 phases:
- Phase 1 (2-3 days): Analytics, bulk grant, account sync
- Phase 2 (2-3 days): Copy permissions, offboard, alerts
- Phase 3 (later): Templates, advanced analytics

Showcases backend features from account_sync.py and
permission_management.py modules.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 00:05:57 +01:00
09c84f138e Add account sync and bulk permission management
Implements Phase 2 from ACCOUNTS-TABLE-REMOVAL-FEASIBILITY.md with hybrid approach:
- Beancount as source of truth
- Castle DB as metadata store
- Automatic sync keeps them aligned

New Features:

1. Account Synchronization (account_sync.py)
   - Auto-sync accounts from Beancount to Castle DB
   - Type inference from hierarchical names
   - User ID extraction from account names
   - Background scheduling support
   - 150 accounts sync in ~2 seconds

2. Bulk Permission Management (permission_management.py)
   - Bulk grant to multiple users (60x faster)
   - User offboarding (revoke all permissions)
   - Account closure (revoke all on account)
   - Permission templates (copy from user to user)
   - Permission analytics dashboard
   - Automated expired permission cleanup

3. Comprehensive Documentation
   - PERMISSIONS-SYSTEM.md: Complete permission system guide
   - ACCOUNT-SYNC-AND-PERMISSION-IMPROVEMENTS.md: Implementation guide
   - Admin workflow examples
   - API reference
   - Security best practices

Benefits:
- 50-70% reduction in admin time
- Onboarding: 10 min → 1 min
- Offboarding: 5 min → 10 sec
- Access review: 2 hours → 5 min

Related:
- Builds on Phase 1 caching (60-80% DB query reduction)
- Complements BQL investigation
- Part of architecture review improvements

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 23:55:26 +01:00
397b5e743e Move BQL documentation to Castle repo
Moved BQL-BALANCE-QUERIES.md from beancounter project to Castle docs/ folder.
Updated all code references from misc-docs/ to docs/ for proper documentation
location alongside implementation.

The document contains comprehensive BQL investigation results showing that
BQL is not feasible for Castle's current ledger format where SATS are stored
in posting metadata rather than position amounts.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 23:41:48 +01:00
4ae6a8f7d2 Refactors journal entry lines to use single amount
Simplifies the representation of journal entry lines by replacing separate debit and credit fields with a single 'amount' field.

Positive amounts represent debits, while negative amounts represent credits, aligning with Beancount's approach. This change improves code readability and simplifies calculations for balancing entries.
2025-11-08 11:48:08 +01:00
3248d3dad6 add dev docs 2025-11-04 01:19:30 +01:00