docs: Move data storage to project directory and cleanup configuration

Major documentation update with new data structure:

Breaking Changes:
- Data storage moved from host directories to ./data/ inside project
- MC_CONFIG_DIR default changed: /root/.config/meshcore → ./data/meshcore
- MC_ARCHIVE_DIR default changed: /mnt/archive/meshcore → ./data/archive
- Requires migration for existing installations (see MIGRATION.md)

Documentation:
- Add MIGRATION.md - step-by-step guide for existing users
- Add FRESH_INSTALL.md - complete installation guide for new users
- Update README.md - new Configuration section with ./data/ structure
- Update .env.example - placeholders instead of real values, new defaults
- Update .claude/CLAUDE.md - updated environment variables documentation
- Change serial device detection from 'ls -l' to 'ls' (cleaner output)

Code Cleanup:
- Remove deprecated MC_REFRESH_INTERVAL variable (unused since intelligent refresh)
- Remove MC_REFRESH_INTERVAL from app/config.py
- Remove refresh_interval from app/routes/views.py (5 functions)
- Remove refresh_interval from app/routes/api.py
- Remove refreshInterval from app/templates/index.html
- Remove refreshInterval from app/templates/dm.html
- Remove MC_REFRESH_INTERVAL from docker-compose.yml

Configuration:
- Update .gitignore - exclude data/ and docs/github-discussion-*.md
- Serial port: use /dev/serial/by-id/[YOUR_DEVICE_ID] placeholder
- Device name: use [YOUR_DEVICE_NAME] placeholder

Benefits:
- All project data in one location (easier backups)
- Better portability (no host dependencies)
- Cleaner codebase (removed unused variables)
- Comprehensive documentation for migration and fresh install

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2025-12-30 15:31:26 +01:00
parent dec264bdc2
commit f8ef1ac297
11 changed files with 929 additions and 39 deletions
-1
View File
@@ -18,7 +18,6 @@ class Config:
MC_BRIDGE_URL = os.getenv('MC_BRIDGE_URL', 'http://meshcore-bridge:5001/cli')
# Application settings
MC_REFRESH_INTERVAL = int(os.getenv('MC_REFRESH_INTERVAL', '60'))
MC_INACTIVE_HOURS = int(os.getenv('MC_INACTIVE_HOURS', '48'))
# Archive configuration
+1 -2
View File
@@ -212,8 +212,7 @@ def get_status():
'device_name': config.MC_DEVICE_NAME,
'serial_port': config.MC_SERIAL_PORT,
'message_count': message_count,
'latest_message_timestamp': latest_timestamp,
'refresh_interval': config.MC_REFRESH_INTERVAL
'latest_message_timestamp': latest_timestamp
}), 200
except Exception as e:
+4 -9
View File
@@ -18,8 +18,7 @@ def index():
"""
return render_template(
'index.html',
device_name=config.MC_DEVICE_NAME,
refresh_interval=config.MC_REFRESH_INTERVAL
device_name=config.MC_DEVICE_NAME
)
@@ -36,7 +35,6 @@ def direct_messages():
return render_template(
'dm.html',
device_name=config.MC_DEVICE_NAME,
refresh_interval=config.MC_REFRESH_INTERVAL,
initial_conversation=initial_conversation
)
@@ -48,8 +46,7 @@ def contact_management():
"""
return render_template(
'contacts-manage.html',
device_name=config.MC_DEVICE_NAME,
refresh_interval=config.MC_REFRESH_INTERVAL
device_name=config.MC_DEVICE_NAME
)
@@ -60,8 +57,7 @@ def contact_pending_list():
"""
return render_template(
'contacts-pending.html',
device_name=config.MC_DEVICE_NAME,
refresh_interval=config.MC_REFRESH_INTERVAL
device_name=config.MC_DEVICE_NAME
)
@@ -72,8 +68,7 @@ def contact_existing_list():
"""
return render_template(
'contacts-existing.html',
device_name=config.MC_DEVICE_NAME,
refresh_interval=config.MC_REFRESH_INTERVAL
device_name=config.MC_DEVICE_NAME
)
-1
View File
@@ -169,7 +169,6 @@
<script>
// Pass configuration from Flask to JavaScript
window.MC_CONFIG = {
refreshInterval: {{ refresh_interval }} * 1000,
deviceName: "{{ device_name }}",
initialConversation: "{{ initial_conversation or '' }}"
};
-1
View File
@@ -111,7 +111,6 @@
<script>
// Pass configuration from Flask to JavaScript
window.MC_CONFIG = {
refreshInterval: {{ refresh_interval }} * 1000, // Convert to milliseconds
deviceName: "{{ device_name }}"
};
</script>