-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMobile-Stacks-Visual-Guide.html
More file actions
648 lines (599 loc) · 49.8 KB
/
Copy pathMobile-Stacks-Visual-Guide.html
File metadata and controls
648 lines (599 loc) · 49.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Mobile Stacks · Interactive Visual Guide 2026</title>
<meta name="description" content="Interactive visual guide to mobile tech stacks in 2026. Compare cross-platform frameworks, native tools, UI libraries, state management, testing, and more." />
<meta name="keywords" content="mobile, tech stack, 2026, React Native, Flutter, Expo, SwiftUI, Jetpack Compose, KMP, framework comparison" />
<meta property="og:title" content="Mobile Tech Stacks · Visual Guide 2026" />
<meta property="og:description" content="Mind-map view of the 2026 mobile universe — cross-platform, native, UI, navigation, state, data, testing, build, push, and design." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://opentechstack.stitchwebsite.com/Mobile-Stacks-Visual-Guide.html" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Mobile Tech Stacks · Visual Guide 2026" />
<meta name="twitter:description" content="Interactive guide to the 2026 mobile stack landscape. Compare 40+ technologies across 10 categories." />
<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large" />
<link rel="canonical" href="https://opentechstack.stitchwebsite.com/Mobile-Stacks-Visual-Guide.html" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"Article","name":"Mobile Stacks Visual Guide 2026","headline":"Mobile Tech Stacks — Interactive Visual Guide 2026","description":"Interactive guide to 46+ mobile technologies: React Native, Expo, Flutter, SwiftUI, Jetpack Compose, KMP, NativeWind, and more.","url":"https://opentechstack.stitchwebsite.com/Mobile-Stacks-Visual-Guide.html","publisher":{"@type":"Organization","name":"Open TechStack","url":"https://opentechstack.stitchwebsite.com"},"datePublished":"2026-04-06","dateModified":"2026-04-06","keywords":"mobile, React Native, Flutter, Expo, SwiftUI, Jetpack Compose, tech stack, 2026","isPartOf":{"@type":"WebSite","name":"Open TechStack","url":"https://opentechstack.stitchwebsite.com"}}
</script>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📱</text></svg>" />
<script src="https://cdn.tailwindcss.com"></script>
<script>tailwind.config={darkMode:"class"}</script>
<link rel="stylesheet" href="dark-mode.css">
<script src="dark-mode.js"></script>
<style>
html { scroll-behavior: smooth; }
body { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.cat-cross { --c:#6366f1; --cs:#eef2ff; } /* Cross-Platform */
.cat-native { --c:#06b6d4; --cs:#ecfeff; } /* Native */
.cat-ui { --c:#ec4899; --cs:#fdf2f8; } /* UI & Components */
.cat-nav { --c:#10b981; --cs:#ecfdf5; } /* Navigation */
.cat-state { --c:#f59e0b; --cs:#fffbeb; } /* State Management */
.cat-data { --c:#8b5cf6; --cs:#f5f3ff; } /* Data & Backend */
.cat-test { --c:#0ea5e9; --cs:#f0f9ff; } /* Testing */
.cat-build { --c:#14b8a6; --cs:#f0fdfa; } /* Build & Deploy */
.cat-push { --c:#f97316; --cs:#fff7ed; } /* Push & Analytics */
.cat-design { --c:#e11d48; --cs:#fff1f2; } /* Design & Prototyping */
.chip { background: var(--cs); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.node { cursor: pointer; transition: transform .2s ease, opacity .3s ease; transform-origin: center; transform-box: fill-box; }
.node:hover { transform: scale(1.08); }
.node.dim { opacity: .18; }
.link { transition: opacity .3s ease, stroke-width .2s ease; }
.link.dim { opacity: .1; }
.card { transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease; }
.card.hidden-card { opacity: 0; transform: scale(.96); pointer-events: none; position: absolute; }
.card.flash { animation: flash 1.2s ease; }
@keyframes flash {
0%,100% { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
30% { box-shadow: 0 0 0 4px #fde68a, 0 10px 30px rgba(245,158,11,.25); }
}
.stage-btn.active { background: #0f172a; color: white; box-shadow: 0 8px 20px rgba(15,23,42,.25); }
.filter-chip.active { background: #0f172a !important; color: white !important; border-color: #0f172a !important; }
@media print {
.no-print { display: none !important; }
.card.hidden-card { display: none !important; }
}
</style>
</head>
<body class="bg-slate-50 text-slate-800">
<!-- ============ NAV ============ -->
<nav class="bg-slate-900 text-white text-sm sticky top-0 z-50">
<div class="max-w-5xl mx-auto px-6 py-2.5 flex items-center justify-between">
<a href="index.html" class="font-bold tracking-tight hover:text-slate-300 transition">⚡ Open TechStack</a>
<div class="flex items-center gap-4 flex-wrap">
<a href="Frontend-Stacks-Visual-Guide.html" class="hover:text-slate-300 transition">Frontend</a>
<a href="Backend-Stacks-Visual-Guide.html" class="hover:text-slate-300 transition">Backend</a>
<a href="AIML-Stacks-Visual-Guide.html" class="hover:text-slate-300 transition">AI/ML</a>
<a href="AI-Coding-Tools-Visual-Guide.html" class="hover:text-slate-300 transition">AI Coding</a>
<a href="DevOps-Stacks-Visual-Guide.html" class="hover:text-slate-300 transition">DevOps</a>
<a href="Mobile-Stacks-Visual-Guide.html" class="hover:text-slate-300 transition">Mobile</a>
<a href="Stack-Combos.html" class="hover:text-slate-300 transition">Combos</a>
<a href="stack-picker.html" class="hover:text-slate-300 transition">Picker</a>
<a href="stack-detector.html" class="hover:text-slate-300 transition text-emerald-400 font-semibold">Detector</a>
<a href="blog/" class="hover:text-slate-300 transition">Blog</a>
<a href="compare/" class="hover:text-slate-300 transition">Compare</a>
<a href="https://github.com/JagadeepPortfolio/awesome-vibecoding-techstacks" target="_blank" rel="noopener" class="hover:text-slate-300 transition">GitHub</a>
</div>
</div>
</nav>
<header class="relative overflow-hidden border-b border-slate-200 bg-gradient-to-br from-white via-orange-50 to-rose-50">
<div class="max-w-7xl mx-auto px-6 py-10">
<div class="flex items-start justify-between gap-6 flex-wrap">
<div class="max-w-3xl">
<div class="inline-flex items-center gap-2 text-xs font-medium text-orange-700 bg-orange-100 rounded-full px-3 py-1 mb-3">
<span class="w-2 h-2 rounded-full bg-orange-500"></span>
Interactive guide · 2026 edition
</div>
<h1 class="text-4xl md:text-5xl font-extrabold tracking-tight text-slate-900">Mobile Tech Stacks, Visualised</h1>
<p class="mt-3 text-slate-600 text-lg">
A mind-map view of the 2026 mobile universe — cross-platform, native, UI, navigation, state management, data, testing, build tools, push notifications, and design.
Pick your stage, filter by what matters, and see the stack that fits.
</p>
</div>
<div class="no-print flex items-center gap-2 text-xs text-slate-500">
<kbd class="px-2 py-1 bg-white border border-slate-300 rounded">/</kbd> search
<kbd class="px-2 py-1 bg-white border border-slate-300 rounded">1-4</kbd> stage
<kbd class="px-2 py-1 bg-white border border-slate-300 rounded">Esc</kbd> reset
</div>
</div>
</div>
</header>
<section class="no-print sticky top-0 z-30 bg-white/90 backdrop-blur border-b border-slate-200 shadow-sm">
<div class="max-w-7xl mx-auto px-6 py-4 flex flex-col gap-3">
<div class="flex items-center gap-3 flex-wrap">
<div class="relative flex-1 min-w-[220px]">
<svg class="w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-400" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
<input id="search" type="text" placeholder="Search framework, library, or tool…"
class="w-full pl-9 pr-3 py-2 rounded-lg border border-slate-300 focus:outline-none focus:ring-2 focus:ring-orange-400 bg-white text-sm" />
</div>
<label class="inline-flex items-center gap-2 text-sm text-slate-600"><input type="checkbox" id="f-free" class="rounded border-slate-300"> Free / OSS</label>
<label class="inline-flex items-center gap-2 text-sm text-slate-600"><input type="checkbox" id="f-oss" class="rounded border-slate-300"> Open source</label>
<label class="inline-flex items-center gap-2 text-sm text-slate-600"><input type="checkbox" id="f-prod" class="rounded border-slate-300"> Production-proven</label>
<button id="reset" class="ml-auto text-xs text-slate-500 hover:text-slate-900 underline">Reset all</button>
</div>
<div id="catChips" class="flex items-center gap-2 flex-wrap text-xs"></div>
</div>
</section>
<section class="max-w-7xl mx-auto px-6 pt-8">
<div class="flex items-center justify-between mb-3">
<h2 class="text-lg font-semibold text-slate-900">The landscape at a glance</h2>
<p class="text-xs text-slate-500"><span id="countLabel">—</span> · click a node to jump to its card</p>
</div>
<div class="rounded-2xl border border-slate-200 bg-white shadow-sm overflow-hidden">
<svg id="mindmap" viewBox="0 0 1200 760" class="w-full h-[560px]"></svg>
</div>
</section>
<section class="max-w-7xl mx-auto px-6 py-10">
<div class="flex items-center justify-between mb-4 flex-wrap gap-3">
<div>
<h2 class="text-lg font-semibold text-slate-900">Which stage are you at?</h2>
<p class="text-sm text-slate-500">Pick one — the stack below adapts, and cards fade to only what fits.</p>
</div>
<div id="stageTabs" class="flex gap-2 flex-wrap"></div>
</div>
<div id="stagePanel" class="rounded-2xl border border-slate-200 bg-gradient-to-br from-white to-slate-50 shadow-sm p-6"></div>
</section>
<section class="max-w-7xl mx-auto px-6 pb-10">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-semibold text-slate-900">All technologies</h2>
<p class="text-xs text-slate-500" id="gridCount"></p>
</div>
<div id="grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"></div>
</section>
<section class="bg-white border-t border-slate-200">
<div class="max-w-7xl mx-auto px-6 py-12">
<h2 class="text-xl font-bold text-slate-900 mb-6">Decision cheat-sheet</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="rounded-xl border border-slate-200 p-5 bg-slate-50">
<h3 class="font-semibold text-slate-900 mb-3">Pick by team</h3>
<ul class="space-y-2 text-sm text-slate-700">
<li><b>Web devs:</b> React Native + Expo. Familiar React patterns, great DX, fast iteration.</li>
<li><b>Dart enthusiasts:</b> Flutter. Pixel-perfect UI, single codebase for mobile + web + desktop.</li>
<li><b>Native-first with shared logic:</b> Kotlin Multiplatform (KMP). Native UI per platform, shared business logic.</li>
<li><b>iOS-only:</b> SwiftUI. Apple-first features, modern declarative syntax.</li>
<li><b>Android-only:</b> Jetpack Compose. Modern Kotlin, Google-backed, great tooling.</li>
<li><b>Enterprise .NET:</b> .NET MAUI. C# everywhere, Visual Studio integration.</li>
</ul>
</div>
<div class="rounded-xl border border-slate-200 p-5 bg-slate-50">
<h3 class="font-semibold text-slate-900 mb-3">Pick by constraint</h3>
<ul class="space-y-2 text-sm text-slate-700">
<li><b>Fastest to market:</b> Expo. Managed workflow, EAS builds, OTA updates.</li>
<li><b>Best performance:</b> Native (SwiftUI / Jetpack Compose) or Flutter.</li>
<li><b>Smallest team:</b> Expo or Flutter. One codebase, both platforms.</li>
<li><b>Offline-first:</b> Firebase + Realm / WatermelonDB. Built-in sync.</li>
<li><b>Web + Mobile:</b> React Native + Expo for web. Universal codebase.</li>
</ul>
</div>
<div class="rounded-xl border border-rose-200 p-5 bg-rose-50">
<h3 class="font-semibold text-rose-900 mb-3">Anti-patterns to avoid</h3>
<ul class="space-y-2 text-sm text-rose-900/90">
<li>Ejecting from Expo too early. The managed workflow handles most use cases.</li>
<li>Building custom navigation from scratch. Use Expo Router or React Navigation.</li>
<li>Ignoring platform conventions. iOS and Android users expect different UX patterns.</li>
<li>Shipping without crash reporting. Add Crashlytics before your first beta.</li>
<li>Using web-only state management patterns. Mobile has different lifecycle needs.</li>
<li>Skipping deep linking setup. It only gets harder to add later.</li>
</ul>
</div>
</div>
</div>
</section>
<footer class="bg-slate-900 text-slate-400 text-sm">
<div class="max-w-7xl mx-auto px-6 py-8">
<div class="flex items-center justify-between flex-wrap gap-4 mb-4">
<div class="font-semibold text-white">⚡ Open TechStack</div>
<div class="flex items-center gap-4">
<a href="index.html" class="hover:text-white transition">Home</a>
<a href="Frontend-Stacks-Visual-Guide.html" class="hover:text-white transition">Frontend Guide</a>
<a href="Backend-Stacks-Visual-Guide.html" class="hover:text-white transition">Backend Guide</a>
<a href="AIML-Stacks-Visual-Guide.html" class="hover:text-white transition">AI/ML Guide</a>
<a href="DevOps-Stacks-Visual-Guide.html" class="hover:text-white transition">DevOps Guide</a>
<a href="Mobile-Stacks-Visual-Guide.html" class="text-slate-200">Mobile Guide</a>
</div>
</div>
<div class="flex items-center justify-between flex-wrap gap-3 pt-4 border-t border-slate-800">
<div>Open source · <a href="https://github.com/JagadeepPortfolio/awesome-vibecoding-techstacks" class="text-orange-400 hover:text-orange-300 transition" target="_blank" rel="noopener">Star on GitHub</a> · Contributions welcome</div>
<div class="text-xs">Built with vanilla HTML, Tailwind CSS, and zero dependencies</div>
</div>
</div>
</footer>
<!-- FLOATING SHARE BAR -->
<div id="shareBar" class="fixed bottom-0 left-0 right-0 z-50 bg-slate-900/95 backdrop-blur border-t border-slate-700 transform translate-y-full" style="transition:transform .3s ease">
<div class="max-w-7xl mx-auto px-6 py-3 flex items-center justify-between gap-4">
<div class="text-white text-sm font-medium hidden sm:block">Found this useful? Share it!</div>
<div class="flex items-center gap-2 flex-wrap">
<a id="shareTwitter" target="_blank" rel="noopener" class="inline-flex items-center gap-1.5 px-3 py-1.5 bg-[#1DA1F2] text-white text-xs font-semibold rounded-lg hover:opacity-90 transition">Tweet</a>
<a id="shareReddit" target="_blank" rel="noopener" class="inline-flex items-center gap-1.5 px-3 py-1.5 bg-[#FF4500] text-white text-xs font-semibold rounded-lg hover:opacity-90 transition">Reddit</a>
<a id="shareLinkedin" target="_blank" rel="noopener" class="inline-flex items-center gap-1.5 px-3 py-1.5 bg-[#0A66C2] text-white text-xs font-semibold rounded-lg hover:opacity-90 transition">LinkedIn</a>
<a href="https://github.com/JagadeepPortfolio/awesome-vibecoding-techstacks" target="_blank" rel="noopener" class="inline-flex items-center gap-1.5 px-3 py-1.5 bg-white text-slate-900 text-xs font-semibold rounded-lg hover:bg-slate-100 transition">Star on GitHub</a>
</div>
</div>
</div>
<script>
(function(){
const bar=document.getElementById("shareBar");const url=encodeURIComponent(location.href);const title=encodeURIComponent(document.title);
const text=encodeURIComponent("Check out this interactive guide to modern tech stacks — 200+ technologies compared with mind maps and filters");
document.getElementById("shareTwitter").href=`https://x.com/intent/tweet?text=${text}&url=${url}`;
document.getElementById("shareReddit").href=`https://reddit.com/submit?url=${url}&title=${title}`;
document.getElementById("shareLinkedin").href=`https://www.linkedin.com/sharing/share-offsite/?url=${url}`;
let shown=false;window.addEventListener("scroll",()=>{if(window.scrollY>400&&!shown){shown=true;bar.style.transform="translateY(0)";}if(window.scrollY<200&&shown){shown=false;bar.style.transform="translateY(100%)";}});
})();
</script>
<script>
/* ================= DATA ================= */
const CATEGORIES = [
{ id:"cross", label:"Cross-Platform", cls:"cat-cross" },
{ id:"native", label:"Native", cls:"cat-native" },
{ id:"ui", label:"UI & Components", cls:"cat-ui" },
{ id:"nav", label:"Navigation", cls:"cat-nav" },
{ id:"state", label:"State Management", cls:"cat-state" },
{ id:"data", label:"Data & Backend", cls:"cat-data" },
{ id:"test", label:"Testing", cls:"cat-test" },
{ id:"build", label:"Build & Deploy", cls:"cat-build" },
{ id:"push", label:"Push & Analytics", cls:"cat-push" },
{ id:"design", label:"Design & Prototyping", cls:"cat-design" },
];
const STAGES = [
{ id:"hobby", label:"Hobby", cost:"$0", tag:"Side project", desc:"Free tools, single platform, learning phase." },
{ id:"mvp", label:"MVP", cost:"$0\u2013$100", tag:"First users", desc:"Both platforms, basic analytics, TestFlight/Play Store." },
{ id:"growth", label:"Growth", cost:"$100\u2013$1k", tag:"Scaling", desc:"CI/CD, crash reporting, A/B testing, proper architecture." },
{ id:"scale", label:"Scale", cost:"$1k+", tag:"Enterprise", desc:"Design system, feature flags, full testing suite, multi-team." },
];
const STAGE_STACKS = {
hobby: { framework:"React Native / Expo or Flutter", ui:"Built-in components", state:"useState / Riverpod", navigation:"Expo Router / GoRouter", testing:"Manual", deploy:"Expo Go / TestFlight" },
mvp: { framework:"Expo (managed) / Flutter", ui:"NativeWind + RN components", state:"Zustand / Riverpod", navigation:"Expo Router / GoRouter", testing:"Jest + Detox basics", deploy:"EAS Build / Fastlane" },
growth: { framework:"Expo / Flutter / KMP", ui:"Custom design system", state:"Zustand + TanStack Query / Bloc", navigation:"Expo Router / GoRouter", testing:"Detox / Patrol + unit tests", deploy:"EAS + CI/CD pipeline" },
scale: { framework:"RN bare / Flutter / Native + KMP", ui:"Shared design system package", state:"Enterprise state solution", navigation:"File-based + deep linking", testing:"Full E2E + visual regression", deploy:"Fastlane + custom CI" },
};
const TECH = [
// Cross-Platform
{ id:"reactnative", name:"React Native", cat:"cross", summary:"Meta's cross-platform framework. New Architecture with Fabric and TurboModules. Huge ecosystem.", pros:["Largest ecosystem","Web devs can contribute","New Architecture is fast"], cons:["Native bridge complexity","Upgrade pain","Platform-specific bugs"], bestFor:"Teams with React/web expertise", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"expo", name:"Expo", cat:"cross", summary:"The React Native platform. Managed workflow, EAS build/deploy, file-based routing.", pros:["Incredible DX","EAS builds","Expo Router","OTA updates"], cons:["Some native modules limited","Managed workflow constraints"], bestFor:"Most new React Native projects in 2026", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"flutter", name:"Flutter", cat:"cross", summary:"Google's UI toolkit. Dart language, custom rendering engine, true pixel-perfect cross-platform.", pros:["Pixel-perfect UI","Great performance","Single codebase for mobile+web+desktop"], cons:["Dart learning curve","Large app size","Google commitment concerns"], bestFor:"Custom UI-heavy apps, startups", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"kmp", name:"Kotlin Multiplatform (KMP)", cat:"cross", summary:"Share Kotlin business logic across iOS, Android, web. Native UI per platform.", pros:["Shared business logic","Native UI","Growing adoption (Netflix, Philips)"], cons:["iOS integration complexity","Newer","Smaller ecosystem"], bestFor:"Teams valuing native UI with shared logic", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
{ id:"maui", name:".NET MAUI", cat:"cross", summary:"Microsoft's cross-platform framework. C#, XAML, enterprise-oriented.", pros:["C# everywhere","Enterprise support","Visual Studio integration"], cons:["Buggy history","Smaller community","Performance concerns"], bestFor:"Enterprise .NET shops", free:true, oss:true, prod:true, stages:["growth","scale"] },
{ id:"capacitor", name:"Capacitor (Ionic)", cat:"cross", summary:"Web-native apps. Use any web framework, wrap in native shell.", pros:["Any web framework","Full native API access","Easy for web devs"], cons:["Web performance limitations","Not truly native feel","Larger apps"], bestFor:"Web-first teams needing mobile", free:true, oss:true, prod:true, stages:["hobby","mvp","growth"] },
// Native
{ id:"swiftui", name:"SwiftUI", cat:"native", summary:"Apple's declarative UI framework. The future of iOS/macOS development.", pros:["Modern declarative syntax","Apple-first features","Great previews"], cons:["iOS 15+ only realistically","Less Stack Overflow help","Breaking changes"], bestFor:"iOS-only or Apple ecosystem apps", free:true, oss:false, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"jetpack", name:"Jetpack Compose", cat:"native", summary:"Android's modern declarative UI toolkit. Kotlin-based, Google-endorsed.", pros:["Modern Kotlin","Great tooling","Google-backed"], cons:["Android-only","Migration from XML views","Performance edge cases"], bestFor:"Android-first apps", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"uikit", name:"UIKit", cat:"native", summary:"Classic iOS framework. Still needed for advanced use cases.", pros:["Battle-tested","Full control","Every feature"], cons:["Imperative","More boilerplate","Storyboard pain"], bestFor:"Complex custom iOS UIs, legacy apps", free:true, oss:false, prod:true, stages:["growth","scale"] },
// UI & Components
{ id:"nativewind", name:"NativeWind", cat:"ui", summary:"Tailwind CSS for React Native. Utility-first styling that web devs love.", pros:["Tailwind mental model","Great DX","Web parity"], cons:["RN-specific quirks","Not all Tailwind features"], bestFor:"React Native + Tailwind teams", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"tamagui", name:"Tamagui", cat:"ui", summary:"Universal UI for React Native + Web. Compile-time optimized, themeable.", pros:["Cross-platform","Compile-time optimization","Rich theming"], cons:["Complex setup","Learning curve","Opinionated"], bestFor:"Universal React Native + Web apps", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
{ id:"gluestack", name:"gluestack-ui", cat:"ui", summary:"Universal component library. NativeWind-powered, accessible.", pros:["Accessible","NativeWind-based","Good defaults"], cons:["Newer","Smaller community"], bestFor:"React Native apps needing accessible components", free:true, oss:true, prod:true, stages:["hobby","mvp","growth"] },
{ id:"rnpaper", name:"React Native Paper", cat:"ui", summary:"Material Design components for React Native. Mature, well-tested.", pros:["Material Design","Mature","Good accessibility"], cons:["Material look may not fit","Heavier bundle"], bestFor:"Material Design mobile apps", free:true, oss:true, prod:true, stages:["hobby","mvp","growth"] },
{ id:"flutterwidgets", name:"Flutter Material / Cupertino", cat:"ui", summary:"Built-in widget libraries. Material Design and iOS-style components.", pros:["Built-in","Platform-adaptive","No extra deps"], cons:["Customization overhead for unique designs"], bestFor:"Flutter apps", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"rnelements", name:"React Native Elements", cat:"ui", summary:"Cross-platform UI toolkit. Consistent components across iOS and Android.", pros:["Consistent cross-platform","Easy to use","Good docs"], cons:["Less customizable","Dated design"], bestFor:"Quick MVPs", free:true, oss:true, prod:true, stages:["hobby","mvp"] },
// Navigation
{ id:"exporouter", name:"Expo Router", cat:"nav", summary:"File-based routing for React Native. Universal links, deep linking, typed routes.", pros:["File-based routing","Deep linking built-in","Web parity"], cons:["Expo-only","Newer patterns"], bestFor:"Expo projects", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"rnnavigation", name:"React Navigation", cat:"nav", summary:"The standard React Native navigator. Stack, tabs, drawer, all patterns.", pros:["Battle-tested","Every pattern","Huge community"], cons:["Performance on complex stacks","Config complexity"], bestFor:"React Native without Expo Router", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"gorouter", name:"GoRouter", cat:"nav", summary:"Declarative routing for Flutter. Deep linking, guards, redirects.", pros:["Declarative","Deep linking","Google-maintained"], cons:["API changes","Complex nested routing"], bestFor:"Flutter apps", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"autoroute", name:"auto_route", cat:"nav", summary:"Code-generated Flutter routing. Type-safe, less boilerplate.", pros:["Type-safe","Code generation","Clean API"], cons:["Build runner dependency","Learning curve"], bestFor:"Large Flutter apps wanting type safety", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
// State Management
{ id:"zustandmobile", name:"Zustand", cat:"state", summary:"Lightweight state for React Native. Same API as web.", pros:["Tiny","Simple","Web parity"], cons:["No persistence built-in","Manual selectors"], bestFor:"React Native global state", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"riverpod", name:"Riverpod", cat:"state", summary:"Compile-safe state for Flutter. The modern Flutter state solution.", pros:["Compile-safe","Testable","Great docs"], cons:["Learning curve","Verbose for simple cases"], bestFor:"Flutter projects", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"bloc", name:"Bloc / Cubit", cat:"state", summary:"Predictable state management for Flutter. Event-driven, testable.", pros:["Predictable","Great for complex flows","Good testing"], cons:["Boilerplate","Steeper learning curve"], bestFor:"Complex Flutter apps, enterprise", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
{ id:"jotaimobile", name:"Jotai", cat:"state", summary:"Atomic state for React Native. Fine-grained reactivity.", pros:["Atomic model","Fine-grained","Composable"], cons:["Different mental model","Fewer RN examples"], bestFor:"Complex state with fine-grained updates", free:true, oss:true, prod:true, stages:["mvp","growth"] },
{ id:"mmkv", name:"MMKV / AsyncStorage", cat:"state", summary:"Persistent key-value storage. MMKV is 30x faster than AsyncStorage.", pros:["Fast (MMKV)","Simple API","Synchronous reads"], cons:["Not a full state solution","Low-level"], bestFor:"Persistent local data", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
// Data & Backend
{ id:"tanquerymobile", name:"TanStack Query (React Query)", cat:"data", summary:"Server state management. Caching, refetching, offline support.", pros:["Caching done right","Offline support","Web parity"], cons:["React-only","Learning curve"], bestFor:"React Native API data fetching", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"supabasemobile", name:"Supabase (Mobile SDKs)", cat:"data", summary:"Postgres BaaS with great mobile SDKs. Auth, realtime, storage.", pros:["Full backend","Realtime","Good mobile SDKs"], cons:["Cold starts on free tier","Newer mobile SDKs"], bestFor:"Mobile apps needing a full backend", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"firebasemobile", name:"Firebase", cat:"data", summary:"Google's mobile BaaS. Firestore, Auth, Messaging, Crashlytics, Analytics.", pros:["Best mobile SDKs","Offline-first Firestore","Push notifications"], cons:["Vendor lock-in","Pricing surprises","NoSQL only"], bestFor:"Mobile-first apps, realtime consumer apps", free:true, oss:false, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"realm", name:"Realm / WatermelonDB", cat:"data", summary:"Local-first databases for mobile. Offline sync, reactive queries.", pros:["Offline-first","Reactive","Fast local queries"], cons:["Sync complexity","Migration pain"], bestFor:"Offline-first mobile apps", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
{ id:"graphqlmobile", name:"Apollo Client / urql (Mobile)", cat:"data", summary:"GraphQL clients for mobile. Normalized caching, offline.", pros:["Normalized cache","Type safety","Offline support"], cons:["GraphQL complexity","Setup overhead"], bestFor:"GraphQL-first mobile apps", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
// Testing
{ id:"detox", name:"Detox", cat:"test", summary:"End-to-end testing for React Native. Gray-box, fast, reliable.", pros:["RN-native","Fast execution","Gray-box testing"], cons:["Setup complexity","iOS-focused historically"], bestFor:"React Native E2E testing", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
{ id:"maestro", name:"Maestro", cat:"test", summary:"Simple mobile UI testing. YAML-based flows, no code needed.", pros:["Dead simple","YAML-based","Both platforms"], cons:["Limited assertions","Newer"], bestFor:"Quick mobile UI testing", free:true, oss:true, prod:true, stages:["hobby","mvp","growth"] },
{ id:"patrol", name:"Patrol", cat:"test", summary:"Native testing for Flutter. Access native features in integration tests.", pros:["Native access","Flutter integration tests","Good DX"], cons:["Flutter-only","Smaller community"], bestFor:"Flutter E2E testing", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
{ id:"appium", name:"Appium", cat:"test", summary:"Cross-platform mobile test automation. Supports any framework.", pros:["Framework-agnostic","Mature","Selenium-like API"], cons:["Slow","Complex setup","Flaky"], bestFor:"Cross-framework mobile testing", free:true, oss:true, prod:true, stages:["growth","scale"] },
{ id:"jest", name:"Jest + RN Testing Library", cat:"test", summary:"Unit and component testing for React Native.", pros:["Fast","Good component testing","Web parity"], cons:["No native testing","Mocking overhead"], bestFor:"RN component unit tests", free:true, oss:true, prod:true, stages:["hobby","mvp","growth","scale"] },
// Build & Deploy
{ id:"eas", name:"EAS Build + Submit", cat:"build", summary:"Expo Application Services. Cloud builds, OTA updates, app store submission.", pros:["No local build env needed","OTA updates","App store submit"], cons:["Expo-only","Paid for priority builds","Queue times"], bestFor:"Expo projects", free:true, oss:false, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"fastlane", name:"Fastlane", cat:"build", summary:"Automate iOS and Android builds, signing, and deployment.", pros:["Battle-tested","Flexible","Both platforms"], cons:["Ruby dependency","Complex configuration","Maintenance burden"], bestFor:"Custom build pipelines", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
{ id:"codemagic", name:"Codemagic", cat:"build", summary:"CI/CD for mobile. Flutter-first, but supports React Native and native.", pros:["Mobile-focused CI","Flutter-first","Mac machines"], cons:["Pricing per build minute","Smaller than general CI"], bestFor:"Flutter CI/CD", free:true, oss:false, prod:true, stages:["mvp","growth"] },
{ id:"bitrise", name:"Bitrise", cat:"build", summary:"Mobile CI/CD platform. Large step library, good caching.", pros:["Mobile-focused","Large step library","Good caching"], cons:["Expensive","Slow builds sometimes","UI clunky"], bestFor:"Enterprise mobile CI/CD", free:true, oss:false, prod:true, stages:["growth","scale"] },
{ id:"codepush", name:"CodePush / EAS Updates", cat:"build", summary:"Over-the-air updates. Push JS/Dart changes without app store review.", pros:["Instant updates","Skip app review","Rollback support"], cons:["JS/Dart only","Size limits","Platform restrictions"], bestFor:"Rapid iteration post-launch", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
// Push & Analytics
{ id:"firebasemsg", name:"Firebase Cloud Messaging", cat:"push", summary:"Push notifications for iOS and Android. Free, reliable, Google-backed.", pros:["Free","Reliable","Both platforms","Good targeting"], cons:["Google dependency","Complex setup for iOS"], bestFor:"Most mobile push notification needs", free:true, oss:false, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"onesignal", name:"OneSignal", cat:"push", summary:"Push notification platform with segmentation, A/B testing, analytics.", pros:["Good free tier","Rich segmentation","Email + push"], cons:["Can get expensive","Some reliability issues"], bestFor:"Marketing-heavy push notifications", free:true, oss:false, prod:true, stages:["hobby","mvp","growth"] },
{ id:"mixpanel", name:"Mixpanel / Amplitude", cat:"push", summary:"Product analytics. Funnels, retention, user behavior.", pros:["Rich analytics","Good free tiers","Standard in mobile"], cons:["Pricing at scale","Integration weight"], bestFor:"Product analytics for mobile", free:true, oss:false, prod:true, stages:["mvp","growth","scale"] },
{ id:"posthog", name:"PostHog", cat:"push", summary:"Open-source product analytics, feature flags, session replay.", pros:["Open source","Feature flags included","Self-hostable"], cons:["Mobile SDKs newer","Self-host complexity"], bestFor:"Teams wanting open-source analytics", free:true, oss:true, prod:true, stages:["mvp","growth","scale"] },
{ id:"crashlytics", name:"Firebase Crashlytics", cat:"push", summary:"Crash reporting for mobile. Real-time alerts, stack traces.", pros:["Free","Real-time","Good grouping","Both platforms"], cons:["Firebase dependency","Limited custom events"], bestFor:"Every mobile app in production", free:true, oss:false, prod:true, stages:["hobby","mvp","growth","scale"] },
// Design & Prototyping
{ id:"figma", name:"Figma", cat:"design", summary:"The design standard. Mobile design kits, prototyping, dev mode.", pros:["Industry standard","Great collaboration","Dev mode"], cons:["Subscription cost","Performance on large files"], bestFor:"Every mobile design workflow", free:true, oss:false, prod:true, stages:["hobby","mvp","growth","scale"] },
{ id:"storybook", name:"Storybook (React Native)", cat:"design", summary:"Component workshop for React Native. Develop components in isolation.", pros:["Isolated development","Visual testing","Documentation"], cons:["RN setup complexity","Performance"], bestFor:"Design system development", free:true, oss:true, prod:true, stages:["growth","scale"] },
{ id:"widgetbook", name:"Widgetbook", cat:"design", summary:"Storybook for Flutter. Widget catalog with golden tests.", pros:["Flutter-native","Golden tests","Good docs"], cons:["Smaller community","Flutter-only"], bestFor:"Flutter design systems", free:true, oss:true, prod:true, stages:["growth","scale"] },
];
/* ================= STATE ================= */
const state = { q:"", cats:new Set(), free:false, oss:false, prod:false, stage:null };
function catOf(id){return CATEGORIES.find(c=>c.id===id);}
function matches(t){
if (state.q){
const q=state.q.toLowerCase();
const hay=(t.name+" "+t.summary+" "+t.bestFor+" "+t.cat).toLowerCase();
if (!hay.includes(q)) return false;
}
if (state.cats.size && !state.cats.has(t.cat)) return false;
if (state.free && !t.free) return false;
if (state.oss && !t.oss) return false;
if (state.prod && !t.prod) return false;
if (state.stage && !t.stages.includes(state.stage)) return false;
return true;
}
/* ================= CHIPS ================= */
const chipsEl = document.getElementById("catChips");
CATEGORIES.forEach(c=>{
const b=document.createElement("button");
b.className=`filter-chip ${c.cls} chip rounded-full px-3 py-1 font-medium`;
b.textContent=c.label; b.dataset.cat=c.id;
b.addEventListener("click",()=>{
if (state.cats.has(c.id)){state.cats.delete(c.id);b.classList.remove("active");}
else {state.cats.add(c.id);b.classList.add("active");}
render();
});
chipsEl.appendChild(b);
});
/* ================= MINDMAP ================= */
const svg=document.getElementById("mindmap");
const NS="http://www.w3.org/2000/svg";
const CX=600, CY=380;
const PRIMARY=[
{cat:"cross", a:-Math.PI/2, r:220},
{cat:"native", a:-Math.PI/2+(2*Math.PI/5), r:220},
{cat:"ui", a:-Math.PI/2+(4*Math.PI/5), r:220},
{cat:"state", a:-Math.PI/2+(6*Math.PI/5), r:220},
{cat:"data", a:-Math.PI/2+(8*Math.PI/5), r:220},
];
const SECONDARY=["nav","test","build","push","design"];
const COLORS={cross:"#6366f1",native:"#06b6d4",ui:"#ec4899",nav:"#10b981",state:"#f59e0b",data:"#8b5cf6",test:"#0ea5e9",build:"#14b8a6",push:"#f97316",design:"#e11d48"};
function buildMindmap(){
svg.innerHTML="";
const defs=document.createElementNS(NS,"defs");
defs.innerHTML=`<radialGradient id="g1"><stop offset="0%" stop-color="#f97316"/><stop offset="100%" stop-color="#f97316" stop-opacity="0"/></radialGradient>`;
svg.appendChild(defs);
const bg=document.createElementNS(NS,"circle");
bg.setAttribute("cx",CX);bg.setAttribute("cy",CY);bg.setAttribute("r","260");
bg.setAttribute("fill","url(#g1)");bg.setAttribute("opacity","0.15");
svg.appendChild(bg);
// center
const g=document.createElementNS(NS,"g");
const c=document.createElementNS(NS,"circle");
c.setAttribute("cx",CX);c.setAttribute("cy",CY);c.setAttribute("r","58");c.setAttribute("fill","#0f172a");
const t=document.createElementNS(NS,"text");
t.setAttribute("x",CX);t.setAttribute("y",CY-4);t.setAttribute("text-anchor","middle");t.setAttribute("fill","white");t.setAttribute("font-weight","700");t.setAttribute("font-size","18");t.textContent="Mobile";
const s=document.createElementNS(NS,"text");
s.setAttribute("x",CX);s.setAttribute("y",CY+16);s.setAttribute("text-anchor","middle");s.setAttribute("fill","#94a3b8");s.setAttribute("font-size","11");s.textContent="2026";
g.appendChild(c);g.appendChild(t);g.appendChild(s);svg.appendChild(g);
PRIMARY.forEach(br=>{
const bx=CX+Math.cos(br.a)*br.r, by=CY+Math.sin(br.a)*br.r;
const line=document.createElementNS(NS,"line");
line.setAttribute("x1",CX);line.setAttribute("y1",CY);line.setAttribute("x2",bx);line.setAttribute("y2",by);
line.setAttribute("stroke",COLORS[br.cat]);line.setAttribute("stroke-width","3");line.setAttribute("opacity","0.5");
line.classList.add("link");line.dataset.cat=br.cat;svg.appendChild(line);
const hub=document.createElementNS(NS,"g");
hub.classList.add("node");hub.dataset.cat=br.cat;
const hc=document.createElementNS(NS,"circle");
hc.setAttribute("cx",bx);hc.setAttribute("cy",by);hc.setAttribute("r","38");hc.setAttribute("fill",COLORS[br.cat]);
const ht=document.createElementNS(NS,"text");
ht.setAttribute("x",bx);ht.setAttribute("y",by+4);ht.setAttribute("text-anchor","middle");ht.setAttribute("fill","white");ht.setAttribute("font-weight","700");ht.setAttribute("font-size","11");
ht.textContent=catOf(br.cat).label.split(" ")[0];
hub.appendChild(hc);hub.appendChild(ht);
hub.addEventListener("click",()=>{
if (state.cats.has(br.cat)) state.cats.delete(br.cat); else state.cats.add(br.cat);
document.querySelectorAll(".filter-chip").forEach(el=>{if(el.dataset.cat===br.cat) el.classList.toggle("active",state.cats.has(br.cat));});
render();
});
svg.appendChild(hub);
const items=TECH.filter(x=>x.cat===br.cat);
items.forEach((it,i)=>{
const spread=Math.min(items.length,6);
const off=(i-(spread-1)/2)*0.26;
const la=br.a+off;
const lr=br.r+125;
const lx=CX+Math.cos(la)*lr, ly=CY+Math.sin(la)*lr;
const ll=document.createElementNS(NS,"line");
ll.setAttribute("x1",bx);ll.setAttribute("y1",by);ll.setAttribute("x2",lx);ll.setAttribute("y2",ly);
ll.setAttribute("stroke",COLORS[br.cat]);ll.setAttribute("stroke-width","1.5");ll.setAttribute("opacity","0.4");
ll.classList.add("link");ll.dataset.tech=it.id;ll.dataset.cat=it.cat;svg.appendChild(ll);
const lg=document.createElementNS(NS,"g");
lg.classList.add("node");lg.dataset.tech=it.id;lg.dataset.cat=it.cat;
const w=Math.max(70,Math.min(150,it.name.length*6.3));
const r=document.createElementNS(NS,"rect");
r.setAttribute("x",lx-w/2);r.setAttribute("y",ly-14);r.setAttribute("rx","12");r.setAttribute("ry","12");
r.setAttribute("width",w);r.setAttribute("height","28");
r.setAttribute("fill","white");r.setAttribute("stroke",COLORS[br.cat]);r.setAttribute("stroke-width","2");
const tx=document.createElementNS(NS,"text");
tx.setAttribute("x",lx);tx.setAttribute("y",ly+4);tx.setAttribute("text-anchor","middle");
tx.setAttribute("fill","#0f172a");tx.setAttribute("font-size","10.5");tx.setAttribute("font-weight","600");
tx.textContent=it.name.length>20?it.name.slice(0,19)+"\u2026":it.name;
lg.appendChild(r);lg.appendChild(tx);
lg.addEventListener("click",()=>{
const card=document.getElementById("card-"+it.id);
if (card){card.scrollIntoView({behavior:"smooth",block:"center"});card.classList.remove("flash");void card.offsetWidth;card.classList.add("flash");}
});
svg.appendChild(lg);
});
});
SECONDARY.forEach((cid,i)=>{
const angle=Math.PI*0.58+(i-(SECONDARY.length-1)/2)*0.17;
const r=340;
const x=CX+Math.cos(angle)*r, y=CY+Math.sin(angle)*r;
const line=document.createElementNS(NS,"line");
line.setAttribute("x1",CX);line.setAttribute("y1",CY);line.setAttribute("x2",x);line.setAttribute("y2",y);
line.setAttribute("stroke",COLORS[cid]);line.setAttribute("stroke-width","2");line.setAttribute("opacity","0.35");
line.classList.add("link");line.dataset.cat=cid;svg.appendChild(line);
const g=document.createElementNS(NS,"g");
g.classList.add("node");g.dataset.cat=cid;
const c=document.createElementNS(NS,"circle");
c.setAttribute("cx",x);c.setAttribute("cy",y);c.setAttribute("r","26");c.setAttribute("fill",COLORS[cid]);
const tx=document.createElementNS(NS,"text");
tx.setAttribute("x",x);tx.setAttribute("y",y+4);tx.setAttribute("text-anchor","middle");tx.setAttribute("fill","white");tx.setAttribute("font-weight","700");tx.setAttribute("font-size","10");
tx.textContent=catOf(cid).label.split(" ")[0];
g.appendChild(c);g.appendChild(tx);
g.addEventListener("click",()=>{
if (state.cats.has(cid)) state.cats.delete(cid); else state.cats.add(cid);
document.querySelectorAll(".filter-chip").forEach(el=>{if(el.dataset.cat===cid) el.classList.toggle("active",state.cats.has(cid));});
render();
});
svg.appendChild(g);
});
}
function updateMindmap(){
svg.querySelectorAll(".node").forEach(n=>{
const t=n.dataset.tech?TECH.find(x=>x.id===n.dataset.tech):null;
let visible=true;
if (t) visible=matches(t);
else if (n.dataset.cat) visible=TECH.some(x=>x.cat===n.dataset.cat&&matches(x));
n.classList.toggle("dim",!visible);
});
svg.querySelectorAll(".link").forEach(l=>{
const t=l.dataset.tech?TECH.find(x=>x.id===l.dataset.tech):null;
let visible=true;
if (t) visible=matches(t);
else if (l.dataset.cat) visible=TECH.some(x=>x.cat===l.dataset.cat&&matches(x));
l.classList.toggle("dim",!visible);
});
}
/* ================= STAGES ================= */
const stageTabsEl=document.getElementById("stageTabs");
STAGES.forEach((s,i)=>{
const b=document.createElement("button");
b.className="stage-btn px-4 py-2 rounded-full border border-slate-300 bg-white text-sm font-semibold hover:border-slate-900 transition";
b.innerHTML=`<span class="mr-1">${i+1}</span>${s.label} <span class="text-slate-400 font-normal ml-1">${s.cost}</span>`;
b.dataset.stage=s.id;
b.addEventListener("click",()=>{state.stage=state.stage===s.id?null:s.id;render();});
stageTabsEl.appendChild(b);
});
function renderStagePanel(){
const panel=document.getElementById("stagePanel");
const s=STAGES.find(x=>x.id===state.stage);
if (!s){
panel.innerHTML=`
<div class="text-center py-6">
<div class="text-slate-500 text-sm">Pick a stage above to see the recommended stack and filter cards to what fits.</div>
<div class="mt-4 grid grid-cols-2 md:grid-cols-4 gap-3 max-w-3xl mx-auto">
${STAGES.map(st=>`
<div class="rounded-xl border border-slate-200 bg-white p-3 text-left">
<div class="text-xs text-slate-500">${st.tag}</div>
<div class="text-sm font-bold text-slate-900">${st.label}</div>
<div class="text-xs text-slate-500 mt-1">${st.cost}/mo</div>
</div>`).join("")}
</div>
</div>`;
return;
}
const stack=STAGE_STACKS[s.id];
panel.innerHTML=`
<div class="flex items-start justify-between gap-4 flex-wrap">
<div class="max-w-2xl">
<div class="text-xs uppercase tracking-wider text-orange-600 font-semibold">${s.tag}</div>
<h3 class="text-2xl font-bold text-slate-900 mt-1">${s.label} stage · ${s.cost}/month</h3>
<p class="text-slate-600 mt-2">${s.desc}</p>
</div>
<div class="text-right">
<div class="text-5xl font-extrabold text-slate-900">${s.cost}</div>
<div class="text-xs text-slate-500">typical monthly spend</div>
</div>
</div>
<div class="mt-5 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3">
${Object.entries(stack).map(([k,v])=>`
<div class="rounded-lg border border-slate-200 bg-white p-3">
<div class="text-[10px] uppercase tracking-wide text-slate-500 font-semibold">${k}</div>
<div class="text-sm font-semibold text-slate-900 mt-1">${v}</div>
</div>`).join("")}
</div>`;
}
function updateStageTabs(){
document.querySelectorAll(".stage-btn").forEach(b=>b.classList.toggle("active",b.dataset.stage===state.stage));
}
/* ================= GRID ================= */
const grid=document.getElementById("grid");
function buildGrid(){
grid.innerHTML="";
TECH.forEach(t=>{
const c=catOf(t.cat);
const el=document.createElement("div");
el.id="card-"+t.id;
el.className=`card ${c.cls} bg-white rounded-xl border border-slate-200 p-5 shadow-sm hover:shadow-md`;
el.innerHTML=`
<div class="flex items-start justify-between gap-2 mb-2">
<h3 class="text-base font-bold text-slate-900">${t.name}</h3>
<span class="chip text-[10px] font-semibold uppercase tracking-wide px-2 py-0.5 rounded-full whitespace-nowrap">${c.label}</span>
</div>
<p class="text-sm text-slate-600 leading-relaxed">${t.summary}</p>
<div class="mt-3 grid grid-cols-2 gap-3 text-xs">
<div>
<div class="font-semibold text-emerald-700 mb-1">Pros</div>
<ul class="text-slate-600 space-y-0.5">${t.pros.map(p=>`<li>• ${p}</li>`).join("")}</ul>
</div>
<div>
<div class="font-semibold text-rose-700 mb-1">Cons</div>
<ul class="text-slate-600 space-y-0.5">${t.cons.map(p=>`<li>• ${p}</li>`).join("")}</ul>
</div>
</div>
<div class="mt-3 text-xs text-slate-500"><b class="text-slate-700">Best for:</b> ${t.bestFor}</div>
<div class="mt-3 flex flex-wrap gap-1">
${t.free ? '<span class="text-[10px] bg-emerald-100 text-emerald-700 rounded px-1.5 py-0.5 font-semibold">FREE</span>' : ''}
${t.oss ? '<span class="text-[10px] bg-sky-100 text-sky-700 rounded px-1.5 py-0.5 font-semibold">OPEN SOURCE</span>' : ''}
${t.prod ? '<span class="text-[10px] bg-indigo-100 text-indigo-700 rounded px-1.5 py-0.5 font-semibold">PROD-PROVEN</span>' : ''}
</div>
<div class="mt-2 flex gap-1">
${STAGES.map(s=>{
const ok=t.stages.includes(s.id);
return `<span class="text-[10px] px-1.5 py-0.5 rounded ${ok?'bg-slate-900 text-white':'bg-slate-100 text-slate-400'}">${s.label}</span>`;
}).join("")}
</div>`;
grid.appendChild(el);
});
}
function updateGrid(){
let shown=0;
TECH.forEach(t=>{
const el=document.getElementById("card-"+t.id);
if (!el) return;
const ok=matches(t);
el.classList.toggle("hidden-card",!ok);
if (ok) shown++;
});
document.getElementById("gridCount").textContent=`${shown} of ${TECH.length} shown`;
document.getElementById("countLabel").textContent=`${shown} of ${TECH.length} technologies`;
}
/* ================= RENDER ================= */
function render(){
updateStageTabs();
renderStagePanel();
updateMindmap();
updateGrid();
const p=[];
if (state.stage) p.push("stage="+state.stage);
history.replaceState(null,"",p.length?"#"+p.join("&"):"#");
}
/* ================= EVENTS ================= */
document.getElementById("search").addEventListener("input",e=>{state.q=e.target.value;render();});
document.getElementById("f-free").addEventListener("change",e=>{state.free=e.target.checked;render();});
document.getElementById("f-oss").addEventListener("change",e=>{state.oss=e.target.checked;render();});
document.getElementById("f-prod").addEventListener("change",e=>{state.prod=e.target.checked;render();});
document.getElementById("reset").addEventListener("click",()=>{
state.q="";state.cats.clear();state.free=state.oss=state.prod=false;state.stage=null;
document.getElementById("search").value="";
["f-free","f-oss","f-prod"].forEach(id=>document.getElementById(id).checked=false);
document.querySelectorAll(".filter-chip").forEach(el=>el.classList.remove("active"));
render();
});
document.addEventListener("keydown",e=>{
if (e.key==="/" && document.activeElement.tagName!=="INPUT"){e.preventDefault();document.getElementById("search").focus();}
if (e.key==="Escape") document.getElementById("reset").click();
if (["1","2","3","4"].includes(e.key) && document.activeElement.tagName!=="INPUT"){
state.stage=STAGES[parseInt(e.key,10)-1].id;render();
}
});
(function(){const h=location.hash.slice(1);if (h) h.split("&").forEach(p=>{const[k,v]=p.split("=");if(k==="stage"&&STAGES.find(s=>s.id===v)) state.stage=v;});})();
buildMindmap();
buildGrid();
render();
</script>
</body>
</html>