mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-07-05 01:11:02 +02:00
3c1625d4c9
This commit establishes the complete foundation for the MeshCore Hub project: - Project setup with pyproject.toml (Python 3.11+, all dependencies) - Development tools: black, flake8, mypy, pytest configuration - Pre-commit hooks for code quality - Package structure with all components (interface, collector, api, web) Common package includes: - Pydantic settings for all component configurations - SQLAlchemy models for nodes, messages, advertisements, traces, telemetry - Pydantic schemas for events, API requests/responses, commands - MQTT client utilities with topic builder - Logging configuration Database infrastructure: - Alembic setup with initial migration for all tables - Database manager with session handling CLI entry point: - Click-based CLI with subcommands for all components - Database migration commands (upgrade, downgrade, revision) Tests: - Basic test suite for config and models - pytest fixtures for in-memory database testing
78 lines
1.5 KiB
Bash
78 lines
1.5 KiB
Bash
# MeshCore Hub - Environment Configuration Example
|
|
# Copy this file to .env and customize values
|
|
|
|
# ===================
|
|
# Common Settings
|
|
# ===================
|
|
|
|
# Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
|
|
LOG_LEVEL=INFO
|
|
|
|
# MQTT Broker Settings
|
|
MQTT_HOST=localhost
|
|
MQTT_PORT=1883
|
|
MQTT_USERNAME=
|
|
MQTT_PASSWORD=
|
|
MQTT_PREFIX=meshcore
|
|
|
|
# ===================
|
|
# Interface Settings
|
|
# ===================
|
|
|
|
# Mode of operation (RECEIVER or SENDER)
|
|
INTERFACE_MODE=RECEIVER
|
|
|
|
# Serial port for MeshCore device
|
|
SERIAL_PORT=/dev/ttyUSB0
|
|
SERIAL_BAUD=115200
|
|
|
|
# Use mock device for testing (true/false)
|
|
MOCK_DEVICE=false
|
|
|
|
# ===================
|
|
# Collector Settings
|
|
# ===================
|
|
|
|
# Database connection URL
|
|
# SQLite: sqlite:///./meshcore.db
|
|
# PostgreSQL: postgresql://user:password@localhost/meshcore
|
|
DATABASE_URL=sqlite:///./meshcore.db
|
|
|
|
# ===================
|
|
# API Settings
|
|
# ===================
|
|
|
|
# API Server binding
|
|
API_HOST=0.0.0.0
|
|
API_PORT=8000
|
|
|
|
# API Keys for authentication
|
|
# Generate secure keys for production!
|
|
API_READ_KEY=
|
|
API_ADMIN_KEY=
|
|
|
|
# ===================
|
|
# Web Dashboard Settings
|
|
# ===================
|
|
|
|
# Web Server binding
|
|
WEB_HOST=0.0.0.0
|
|
WEB_PORT=8080
|
|
|
|
# API connection for web dashboard
|
|
API_BASE_URL=http://localhost:8000
|
|
API_KEY=
|
|
|
|
# Network Information (displayed on web dashboard)
|
|
NETWORK_DOMAIN=
|
|
NETWORK_NAME=MeshCore Network
|
|
NETWORK_CITY=
|
|
NETWORK_COUNTRY=
|
|
NETWORK_LOCATION=
|
|
NETWORK_RADIO_CONFIG=
|
|
NETWORK_CONTACT_EMAIL=
|
|
NETWORK_CONTACT_DISCORD=
|
|
|
|
# Path to members JSON file
|
|
MEMBERS_FILE=members.json
|