This repository was archived by the owner on Jan 26, 2026. It is now read-only.
Project refactoring and code cleanup#1
Merged
Conversation
Major Changes: - Added CLI feature with comprehensive command-line interface - Created nexus-cli binary for developer usage - Implemented daemon mode for background synchronization - Added configuration management system (TOML-based) New Commands: - init: Initialize database and create users - start/stop/restart: Daemon lifecycle management - status: Real-time sync status monitoring - peer: Peer discovery and management - device: Multi-device pairing and authorization - config: Configuration management - logs: Log viewing and monitoring - query/oplog: Database debugging tools - info/doctor: System diagnostics - export/import: Database backup/restore CLI Features: - Pretty formatted output with colors and tables - JSON output mode for scripting - Watch mode for continuous monitoring - Comprehensive error handling - Cross-platform support (Unix daemon mode) Architecture: - New src/cli/ module with command structure - New src/bin/nexus-cli.rs entry point - Configuration system at ~/.nexus/config.toml - Daemon PID management - Log rotation support Dependencies Added: - clap: Command-line argument parsing - tokio: Async runtime - colored: Terminal colors - prettytable-rs: Formatted table output - daemonize: Unix daemon support - sysinfo: System information - hostname, rpassword, ctrlc: Utilities Database: - Added get_peer() and get_all_peers() functions - Exported new peer functions in public API Documentation: - Added comprehensive CLI_USAGE.md guide - Updated README with CLI installation and usage - Included examples and troubleshooting Testing: - CLI compiles successfully with --features cli - All existing tests still pass - Library API unchanged (backward compatible) The library can now be used as both: 1. A Rust library (existing usage) 2. A standalone CLI tool for developers
rvoidex7
referenced
this pull request
in rvoidex7/ahenk
Nov 19, 2025
This PR completes the transformation of FocusSuite into Ahenk, a focused P2P sync engine. All application-specific features have been removed and clearly documented as out-of-scope. **🧹 Major Cleanup (PR #1: Broken tauri_api.rs)** - Removed ALL Task, Habit, Pomodoro, Block, Soundscape management from tauri_api.rs - Reduced file from 628 lines to 149 lines (76% reduction) - Only User Management and P2P Sync commands remain - Fixed all compile errors from deleted logic functions - Updated function names: nexus_* → ahenk_* **📚 Documentation Overhaul (PR Ru1vly#2: Documentation Cleanup)** - CHANGELOG.md: Removed all false feature claims, now accurately reflects core infrastructure - CORE_API_VERIFICATION_REPORT.md: Deprecated and archived (outdated Task/Habit claims) - NEW: ARCHITECTURE.md - Clear, honest documentation of what Ahenk IS and IS NOT - Explicit guidance for app developers on using Ahenk as sync backend **🗄️ Database Schema Alignment (PR Ru1vly#3: Schema Consistency)** - schema.sql: Now matches migration/001_initial_schema.sql exactly - Removed all Task, Habit, Pomodoro, Block-related tables - Only 4 core tables: users, devices, oplog, peers - Added clear developer notes on extending schema **✅ What Ahenk Now Provides** - User authentication (register/login with Argon2) - Multi-device management - P2P networking (libp2p, mDNS, Relay, DCUtR) - CRDT sync (OpLog, HLC timestamps, conflict resolution) - Cross-platform FFI (iOS, Android, Desktop) **❌ What Ahenk Does NOT Provide** - Task management - Habit tracking - Pomodoro timers - Time blocking - Soundscapes - ANY application-specific UI or business logic **🎯 Identity Clarification** Ahenk is now clearly positioned as: - "P2P Database Synchronization Engine" - NOT "A productivity app with sync" - Infrastructure library for apps to build upon **🔧 Technical Changes** - tauri_api.rs: 628 → 149 lines - CHANGELOG.md: Completely rewritten for accuracy - schema.sql: Aligned with active migrations - ARCHITECTURE.md: New comprehensive guide **📊 Test Results** - 17/18 tests passing - 1 P2P network test fails (expected in CI environment) - Build successful - All critical functionality verified **🚀 Migration Path for Existing Users** Applications using old FocusSuite code should: 1. Extract domain models to application layer 2. Use Ahenk only for User + Device + Sync 3. Create custom tables alongside Ahenk core tables 4. Use build_oplog_entry() for syncing custom data This is now a production-ready, focused, and honest sync infrastructure. Addresses feedback from independent code review identifying "identity crisis" between being a sync engine vs. complete application.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Major Changes:
New Commands:
CLI Features:
Architecture:
Dependencies Added:
Database:
Documentation:
Testing:
The library can now be used as both: