Rebrand CommGate to gsmnode and adopt new design system

Rename the whole project from CommGate to gsmnode and re-skin every
surface onto the new signal-green + ink design system (Space Grotesk /
IBM Plex Sans / JetBrains Mono, flat surfaces, two-arrow routing mark,
lowercase gsm+node wordmark).

- Web App + API panel: rewrite token layer, gn-* utilities, data-gsm-theme,
  new logo/favicon assets; both builds verified.
- Phone App (Flutter): green theme, new mark/wordmark widgets, adaptive
  launcher icons; rename Android applicationId/package to app.gsmnode.phone;
  bump AGP to 8.6.0 and google_fonts to 8.1.0; debug APK build verified.
- API Server (Go): panel routes, User-Agent, health service id, branding.
- Home Assistant Plugin: rename integration domain sms_gateway to gsmnode
  (folder, DOMAIN, services, entity ids, classes); py_compile verified.
- Update all READMEs; add .gitignore (excludes Design/, build artifacts).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tajniak81
2026-07-06 08:53:14 +02:00
commit d6956395c8
166 changed files with 12605 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
import 'package:shared_preferences/shared_preferences.dart';
/// Persists connection settings and credentials across app launches.
class Storage {
static const _kApiBase = 'api_base';
static const _kJwt = 'jwt';
static const _kDeviceToken = 'device_token';
static const _kDeviceId = 'device_id';
static const _kDeviceName = 'device_name';
static const _kUserEmail = 'user_email';
final SharedPreferences _prefs;
Storage(this._prefs);
static Future<Storage> create() async {
return Storage(await SharedPreferences.getInstance());
}
String? get apiBase => _prefs.getString(_kApiBase);
set apiBase(String? v) => _set(_kApiBase, v);
String? get jwt => _prefs.getString(_kJwt);
set jwt(String? v) => _set(_kJwt, v);
String? get deviceToken => _prefs.getString(_kDeviceToken);
set deviceToken(String? v) => _set(_kDeviceToken, v);
String? get deviceId => _prefs.getString(_kDeviceId);
set deviceId(String? v) => _set(_kDeviceId, v);
String? get deviceName => _prefs.getString(_kDeviceName);
set deviceName(String? v) => _set(_kDeviceName, v);
String? get userEmail => _prefs.getString(_kUserEmail);
set userEmail(String? v) => _set(_kUserEmail, v);
bool get isRegistered => (deviceToken ?? '').isNotEmpty;
Future<void> clearSession() async {
await _prefs.remove(_kJwt);
await _prefs.remove(_kDeviceToken);
await _prefs.remove(_kUserEmail);
// Keep device_id stable across logout so re-registering updates the same
// device record instead of creating a new (phantom) one.
}
void _set(String key, String? v) {
if (v == null) {
_prefs.remove(key);
} else {
_prefs.setString(key, v);
}
}
}