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
+15 -9
View File
@@ -6,31 +6,37 @@
# ============================================
# Serial port path (use /dev/serial/by-id for stable device names)
# Find your device: ls -l /dev/serial/by-id/
MC_SERIAL_PORT=/dev/serial/by-id/usb-Espressif_Systems_heltec_wifi_lora_32_v4__16_MB_FLASH__2_MB_PSRAM__90706984A000-if00
# Find your device: ls /dev/serial/by-id/
# Example: usb-Espressif_Systems_heltec_wifi_lora_32_v4__16_MB_FLASH__2_MB_PSRAM__90706984A000-if00
MC_SERIAL_PORT=/dev/serial/by-id/[YOUR_DEVICE_ID]
# Your MeshCore device name (used for .msgs file)
MC_DEVICE_NAME=MarWoj
# Example: MarWoj, SP5XYZ, MyNode
MC_DEVICE_NAME=[YOUR_DEVICE_NAME]
# MeshCore configuration directory (where .msgs file is stored)
MC_CONFIG_DIR=/home/marek/.config/meshcore
# MeshCore configuration directory (where .msgs and settings files are stored)
# Default: ./data/meshcore (inside project directory)
# This directory is mounted as a Docker volume and shared between both containers
MC_CONFIG_DIR=./data/meshcore
# ============================================
# Application Settings
# ============================================
# Auto-refresh interval in seconds
MC_REFRESH_INTERVAL=60
# Hours of inactivity before contacts can be cleaned up
MC_INACTIVE_HOURS=48
# Note: Auto-refresh is now intelligent and checks for new messages every 10 seconds
# No configuration needed - the system automatically updates UI only when new messages arrive
# ============================================
# Archive Configuration
# ============================================
# Directory for storing archived messages
MC_ARCHIVE_DIR=/home/marek/.config/meshcore/archive
# Default: ./data/archive (inside project directory)
# This directory is mounted as a Docker volume for mc-webui container
MC_ARCHIVE_DIR=./data/archive
# Enable automatic daily archiving at midnight
MC_ARCHIVE_ENABLED=true