{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "iSpeed.my — System Architecture",
    "subtitle": "Stock Trading & Investment Mobile Platform",
    "output": "ispeed-architecture.html",
    "quality_profile": "showcase"
  },
  "components": [
    { "id": "mobile-app", "type": "frontend", "label": "iSpeed.my App", "sublabel": "React Native + Expo", "tag": "TypeScript", "pos": [40, 160], "size": [150, 64] },
    { "id": "api-gateway", "type": "backend", "label": "API Gateway", "sublabel": "Spring Boot 2.1", "tag": "Java 8", "pos": [320, 160], "size": [150, 64] },
    { "id": "mysql", "type": "database", "label": "MySQL", "sublabel": "Primary Database", "tag": "Hibernate", "pos": [620, 80], "size": [140, 60] },
    { "id": "redis", "type": "database", "label": "Redis", "sublabel": "Cache + Sessions", "tag": "Jedis", "pos": [620, 220], "size": [140, 56] },
    { "id": "vbroker", "type": "backend", "label": "VBroker", "sublabel": "Integration Layer", "tag": "IS", "pos": [320, 340], "size": [150, 56] },
    { "id": "trkd", "type": "external", "label": "TRKD / Reuters", "sublabel": "Market Data", "pos": [620, 340], "size": [140, 56] },
    { "id": "push-service", "type": "backend", "label": "Push Service", "sublabel": "FCM + APNS", "pos": [620, 480], "size": [140, 56] },
    { "id": "firebase", "type": "cloud", "label": "Firebase", "sublabel": "FCM + Crashlytics", "pos": [820, 480], "size": [130, 56] }
  ],
  "connections": [
    { "id": "app-to-api", "from": "mobile-app", "to": "api-gateway", "label": "HTTPS / REST", "variant": "emphasis", "fromSide": "right", "toSide": "left" },
    { "id": "api-to-mysql", "from": "api-gateway", "to": "mysql", "label": "JDBC", "fromSide": "right", "toSide": "left" },
    { "id": "api-to-redis", "from": "api-gateway", "to": "redis", "label": "Cache", "fromSide": "right", "toSide": "left" },
    { "id": "api-to-vbroker", "from": "api-gateway", "to": "vbroker", "label": "Market Data", "fromSide": "bottom", "toSide": "top", "labelAt": [395, 238] },
    { "id": "vbroker-to-trkd", "from": "vbroker", "to": "trkd", "label": "Reuters API", "variant": "dashed", "fromSide": "right", "toSide": "left" },
    { "id": "push-to-firebase", "from": "push-service", "to": "firebase", "label": "FCM SDK", "variant": "dashed", "fromSide": "right", "toSide": "left" }
  ],
  "cards": [
    { "dot": "cyan", "title": "Mobile Client", "items": ["React Native 0.85 + Expo SDK 56", "Redux Toolkit state management", "Biometric + MFA + Trade PIN security", "i18next multi-language support"] },
    { "dot": "emerald", "title": "Backend Services", "items": ["10 Spring Boot 2.1 microservices (WAR)", "Java 8 / Hibernate 5.3 / MySQL", "Redis + Caffeine multi-tier caching", "6 deployment profiles (SIT → DR)"] },
    { "dot": "rose", "title": "Integration & External", "items": ["VBroker layer for Thomson Reuters market data", "Firebase Cloud Messaging (Android)", "Apple APNS via Pushy library (iOS)", "Payment gateway integration"] }
  ]
}