mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-07-03 00:11:31 +02:00
d37b30a05b
Remove the static Member model/table, CRUD API, YAML seed files, and admin UI. Replace with UserProfile-driven members page that reads roles from OIDC identity provider. Key changes: - Drop members table, add roles column to user_profiles (Alembic migration) - Add GET /api/v1/user/profiles (paginated, no user_id exposed) - Add GET /api/v1/user/profile/me (auto-creates profile for current user) - Replace member_id node tag filter with adopted_by (profile UUID) - Members page now shows profiles grouped by operator/member roles - Profile page supports public view (/profile/:id) and owner edit (/profile) - Node detail page shows adoption card side-by-side with public key card - Auto-create user profile during OIDC login callback - Hide Adopted Nodes section for non-operator/admin users - Add member since date to profile cards - Add role badges and adopted node badges to member tiles - Add antenna/users icons to Members page group headers
1.6 KiB
1.6 KiB
Seed Data
The database can be seeded with node tags from YAML files in the SEED_HOME directory (default: ./seed).
Running the Seed Process
Seeding is a separate process and must be run explicitly:
docker compose -f docker-compose.yml -f docker-compose.dev.yml --profile seed up
This imports data from the following files (if they exist):
{SEED_HOME}/node_tags.yaml- Node tag definitions
Directory Structure
seed/ # SEED_HOME (seed data files)
└── node_tags.yaml # Node tags for import
data/ # DATA_HOME (runtime data)
└── collector/
└── meshcore.db # SQLite database
Example seed files are provided in example/seed/.
Node Tags
Node tags allow you to attach custom metadata to nodes (e.g., location, role, owner). Tags are stored in the database and returned with node data via the API.
Node Tags YAML Format
Tags are keyed by public key in YAML format:
# Each key is a 64-character hex public key
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef:
name: Gateway Node
description: Main network gateway
role: gateway
lat: 37.7749
lon: -122.4194
fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210:
name: Oakland Repeater
elevation: 150
Tag values can be:
- YAML primitives (auto-detected type): strings, numbers, booleans
- Explicit type (when you need to force a specific type):
altitude: value: "150" type: number
Supported types: string, number, boolean