How meshlinkfoundation/broker works
meshlink Broker serves a captive-portal experience for Wi-Fi clients and an operator dashboard for access, payments, profiles, and analytics. A client loads its portal skin or operator route, requests configuration and API actions, and the Express routes coordinate tier/profile selection, payment verification, session persistence, and network authorization. The README documents Stripe Checkout and optional portal HTTPS; the indexed source also identifies on-chain payment and TLS modules. Some subsystems are represented at directory level because their implementations were not sampled; links are included only where README or excerpts establish them.
Main entry points: routes.ts REST routes · App.tsx App routing · index.ts Express bootstrap · basic-captive-portal.tsx Captive portal
Components 21
Portal and admin UI
- App routing
client/src/App.tsx - Captive portal
client/src/pages/basic-captive-portal.tsx - Profile portal skins
client/src/pages/pirate-captive-portal.tsx - Payment interface
client/src/components/payment-interface.tsx - Network status
client/src/components/hotspot-status.tsx - Admin dashboard
client/src/pages/admin-dashboard.tsx - User dashboard
client/src/pages/dashboard.tsx - API query client
client/src/lib/queryClient.ts
Broker API
- Express bootstrap
server/index.ts - REST routes
server/routes.ts
Access and profiles
- Network enforcement
server/network-manager.ts - Service profiles
server/service-profiles.ts - Portal HTTPS
server/portal-tls.ts
Payment integrations
- Chain client
server/chain-client.ts - Payment listener
server/payment-listener.ts - Stripe Checkout
Persistence
- Storage interface
server/storage.ts - SQLite storage
server/sqlite-storage.ts - Domain schema
shared/schema.ts
Other components
- Wi-Fi client
- Operator
Connections 21
- Wi-Fi client → App routing: opens portal
README.md - Operator → App routing: opens admin
README.md - App routing → Captive portal: renders default
client/src/App.tsx - App routing → Profile portal skins: selects pirate skin
client/src/App.tsx - App routing → Admin dashboard: routes admin
client/src/App.tsx - App routing → User dashboard: routes dashboard
client/src/App.tsx - App routing → API query client: provides queries
client/src/App.tsx - Captive portal → Payment interface: shows payment
- Express bootstrap → REST routes: registers routes
server/index.ts - REST routes → Service profiles: resolves profiles
server/routes.ts - REST routes → Network enforcement: checks access
server/routes.ts - REST routes → Portal HTTPS: reads TLS config
server/routes.ts - Express bootstrap → Portal HTTPS: configures HTTPS
server/index.ts - REST routes → Storage interface: reads and writes
server/routes.ts - Storage interface → SQLite storage: uses implementation
server/storage.ts - SQLite storage → Domain schema: stores domain records
server/sqlite-storage.ts - REST routes → Payment listener: dispatches payment
server/routes.ts - Payment listener → Chain client: uses chain client
server/payment-listener.ts - REST routes → Stripe Checkout: creates checkout
README.md - API query client → REST routes: requests API
- REST routes → Network enforcement: enforces tier access
README.md