Skip to content

Implement meshinfo-network: full-stack React + FastAPI instance directory#1

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-meshinfo-network
Draft

Implement meshinfo-network: full-stack React + FastAPI instance directory#1
Copilot wants to merge 2 commits intomainfrom
copilot/add-meshinfo-network

Conversation

Copy link

Copilot AI commented Mar 26, 2026

Replaces the minimal flat-file FastAPI prototype with a production-ready full-stack application serving as the central directory for MeshInfo instances.

Backend (backend/)

  • FastAPI + SQLAlchemy ORM, SQLite by default with a clean Postgres path via DATABASE_URL
  • Approval workflow: registrations start pending and are invisible publicly until manually approved — only status=approved + visibility=public rows appear in the API
  • Token flow: POST /api/register generates a secrets.token_hex(32) key, stores SHA-256 hash, returns plaintext once; all subsequent writes (/heartbeat, /stats) require the token
  • URL canonicalization: strips protocol/trailing slashes, lowercases host, preserves subdomains and path casing, enforced at registration and lookup
  • Alembic migrations for instances, instance_stats_snapshots, instance_events
GET  /api/health
GET  /api/instances                       # approved + public only
GET  /api/instances/{id}
POST /api/register                        # returns token once
POST /api/instances/{id}/heartbeat        # token-authenticated
POST /api/instances/{id}/stats            # token-authenticated, coarse stats

Frontend (frontend/)

  • React + TypeScript + Vite + Tailwind CSS v4, React Router — intentionally aligned with MeshAddicts/meshinfo conventions
  • Dark mode with prefers-color-scheme detection and localStorage override
  • Three pages: Home (what/how/privacy modes), Instances (searchable card list), Instance Detail
  • Vite dev proxy routes /api/*localhost:8000
Light Dark
Home light Home dark

Instances page

Supporting files

  • docs/meshinfo-integration.md: concrete Phase 2 plan for adding opt-in reporting to MeshAddicts/meshinfo (config schema, token storage, re-registration, failure handling)
  • README.md: full reference — dev setup, Docker, env vars, migrations, API, token flow, canonicalization rules, approval model
  • docker-compose.yml / Dockerfile / Caddyfile: backend + frontend-build + Caddy reverse proxy

Removed

  • api.py, requirements.txt, templates/ — old in-memory + JSON flat-file prototype

⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

…MeshInfo instances

Co-authored-by: daviesgeek <2348508+daviesgeek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MeshAddicts/meshinfo-network/sessions/0ff61728-dec9-4406-8b57-aed649cb6b4b
Copilot AI changed the title [WIP] Add meshinfo-network as centralized directory for instances Implement meshinfo-network: full-stack React + FastAPI instance directory Mar 26, 2026
Copilot AI requested a review from daviesgeek March 26, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants