-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathindex.html
More file actions
1842 lines (1793 loc) 路 121 KB
/
Copy pathindex.html
File metadata and controls
1842 lines (1793 loc) 路 121 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
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- =========================================================
PRIMARY META
========================================================= -->
<title>Moodify - AI Emotion-Based Music Recommendation Platform & Wiki</title>
<meta name="description" content="Moodify reads your mood from text, voice or a selfie with three self-trained AI models and curates a personalized Deezer playlist that matches how you feel. Open-source, web + mobile, privacy-first. This page doubles as the project wiki: architecture, model details, API reference, infrastructure, security (incl. passwordless passkeys / WebAuthn) and self-hosting.">
<meta name="keywords" content="Moodify, mood music, emotion detection, music recommendation, AI music app, BERT, PyTorch, TensorFlow, FER, MTCNN, MFCC, facial expression recognition, speech emotion recognition, text emotion detection, Deezer, React, React Native, Django, Modal, MongoDB, mood playlist, personalized music, mood tracker, open source music app, EWMA, Markov, wiki, architecture, self-hosting, Helm, Terraform, EKS, GKE, Vercel">
<meta name="author" content="Son Nguyen (hoangsonww)">
<meta name="copyright" content="(c) 2024-2026 Son Nguyen">
<meta name="application-name" content="Moodify">
<meta name="generator" content="Static landing page (vanilla HTML/CSS/JS)">
<meta name="rating" content="general">
<meta name="referrer" content="strict-origin-when-cross-origin">
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
<meta name="googlebot" content="index, follow">
<meta name="bingbot" content="index, follow">
<meta name="revisit-after" content="3 days">
<meta name="distribution" content="global">
<meta name="language" content="en">
<meta http-equiv="content-language" content="en">
<meta http-equiv="x-ua-compatible" content="IE=edge">
<!-- =========================================================
VIEWPORT + COLOR
========================================================= -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="theme-color" content="#ff4d4d" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#0b0b11" media="(prefers-color-scheme: dark)">
<meta name="color-scheme" content="dark light">
<meta name="msapplication-TileColor" content="#ff4d4d">
<meta name="msapplication-TileImage" content="images/android-chrome-192x192.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Moodify">
<meta name="mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<!-- =========================================================
CANONICAL + ALTERNATES
========================================================= -->
<link rel="canonical" href="https://moodify-app.vercel.app/">
<link rel="alternate" hreflang="en" href="https://moodify-app.vercel.app/">
<link rel="alternate" hreflang="x-default" href="https://moodify-app.vercel.app/">
<!-- =========================================================
OPEN GRAPH
========================================================= -->
<meta property="og:type" content="website">
<meta property="og:site_name" content="Moodify">
<meta property="og:url" content="https://moodify-app.vercel.app/">
<meta property="og:title" content="Moodify - AI Emotion-Based Music Recommendation Platform & Wiki">
<meta property="og:description" content="Three self-trained models read your mood from text, voice or a selfie. Personalized Deezer playlist - open-source, web + mobile, privacy-first. Full project wiki on one page.">
<meta property="og:image" content="https://moodify-app.vercel.app/images/moodify-logo.png">
<meta property="og:image:secure_url" content="https://moodify-app.vercel.app/images/moodify-logo.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Moodify - AI emotion-based music recommendation app">
<meta property="og:locale" content="en_US">
<meta property="og:updated_time" content="2026-05-24T00:00:00Z">
<meta property="article:author" content="Son Nguyen">
<meta property="article:publisher" content="https://github.com/hoangsonww">
<!-- =========================================================
TWITTER / X CARD
========================================================= -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@hoangsonww">
<meta name="twitter:creator" content="@hoangsonww">
<meta name="twitter:title" content="Moodify - AI Emotion-Based Music Recommendation Platform & Wiki">
<meta name="twitter:description" content="Three self-trained models, one Deezer playlist tuned to how you feel. Full project wiki on a single page.">
<meta name="twitter:image" content="https://moodify-app.vercel.app/images/moodify-logo.png">
<meta name="twitter:image:alt" content="Moodify - AI emotion-based music recommendation app logo">
<!-- =========================================================
ICONS
========================================================= -->
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="192x192" href="images/android-chrome-192x192.png">
<link rel="apple-touch-icon" sizes="512x512" href="images/android-chrome-512x512.png">
<link rel="mask-icon" href="images/favicon.ico" color="#ff4d4d">
<!-- =========================================================
PRECONNECT + DNS-PREFETCH
========================================================= -->
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
<link rel="dns-prefetch" href="//fonts.googleapis.com">
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link rel="dns-prefetch" href="//cdn.jsdelivr.net">
<link rel="dns-prefetch" href="//moodify-emotion-music-app.vercel.app">
<link rel="dns-prefetch" href="//moodify-backend-api.vercel.app">
<link rel="dns-prefetch" href="//api.deezer.com">
<!-- =========================================================
SITEMAP HINT
========================================================= -->
<link rel="sitemap" type="application/xml" title="Sitemap" href="sitemap.xml">
<!-- =========================================================
JSON-LD STRUCTURED DATA
========================================================= -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://moodify-app.vercel.app/#site",
"url": "https://moodify-app.vercel.app/",
"name": "Moodify",
"alternateName": ["Moodify App", "Moodify Music", "Moodify Wiki"],
"description": "AI-powered emotion-based music recommendation platform. Open-source, web + mobile, with text/voice/face mood detection.",
"inLanguage": "en",
"publisher": { "@id": "https://github.com/hoangsonww#person" },
"potentialAction": {
"@type": "SearchAction",
"target": "https://moodify-app.vercel.app/results?emotion={search_term_string}",
"query-input": "required name=search_term_string"
}
},
{
"@type": "SoftwareApplication",
"@id": "https://moodify-app.vercel.app/#app",
"name": "Moodify",
"url": "https://moodify-app.vercel.app/",
"description": "Reads emotion from text / voice / selfie and curates a Deezer playlist that matches.",
"applicationCategory": "MultimediaApplication",
"applicationSubCategory": "MusicApplication",
"operatingSystem": "Web, iOS, Android",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
},
"image": "https://moodify-app.vercel.app/images/moodify-logo.png",
"softwareVersion": "1.0.0",
"datePublished": "2024-10-20",
"dateModified": "2026-05-24",
"inLanguage": "en",
"downloadUrl": "https://moodify-app.vercel.app/",
"featureList": [
"Text mood detection (BERT)",
"Voice mood detection (SVC + MFCC)",
"Facial mood detection (FER + MTCNN)",
"Mood history tracking",
"Genre-aware recommendations",
"Deezer search integration",
"JWT auth with silent refresh",
"Dark + light themes",
"React Native iOS + Android client",
"Real-time ML inference",
"Sliding-window rate limiting",
"LRU + TTL caching layer",
"EWMA + Markov personalization",
"Thompson Sampling contextual bandit re-ranker",
"Per-user mood-detection calibration map",
"Online reinforcement learning from 馃憤 / 馃憥 / un-vote / open-in-Deezer signals",
"Persisted like / dislike state across reloads",
"Sign in with username or email"
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.9",
"ratingCount": "120",
"bestRating": "5",
"worstRating": "1"
},
"creator": { "@id": "https://github.com/hoangsonww#person" }
},
{
"@type": "Person",
"@id": "https://github.com/hoangsonww#person",
"name": "Son Nguyen",
"alternateName": "David Nguyen",
"url": "https://github.com/hoangsonww",
"sameAs": [
"https://github.com/hoangsonww",
"https://www.linkedin.com/in/hoangsonw/"
],
"jobTitle": "Software Engineer",
"worksFor": { "@type": "Organization", "name": "Matroid, Inc." }
},
{
"@type": "Organization",
"@id": "https://moodify-app.vercel.app/#org",
"name": "Moodify",
"url": "https://moodify-app.vercel.app/",
"logo": "https://moodify-app.vercel.app/images/moodify-logo.png",
"founder": { "@id": "https://github.com/hoangsonww#person" },
"sameAs": [
"https://github.com/hoangsonww/Moodify-Emotion-Music-App"
]
},
{
"@type": "TechArticle",
"@id": "https://moodify-app.vercel.app/#wiki",
"headline": "Moodify Project Wiki",
"description": "Architecture, AI/ML model details, API reference, data model, personalization math, infrastructure and self-hosting documentation for the Moodify open-source platform.",
"author": { "@id": "https://github.com/hoangsonww#person" },
"datePublished": "2024-10-20",
"dateModified": "2026-05-24",
"inLanguage": "en",
"isPartOf": { "@id": "https://moodify-app.vercel.app/#site" },
"keywords": "BERT, FER, MTCNN, MFCC, Modal, Django, Vercel, MongoDB, Deezer, EWMA, Markov, JWT, Helm, Terraform"
},
{
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Home", "item": "https://moodify-app.vercel.app/#home" },
{ "@type": "ListItem", "position": 2, "name": "Wiki Index", "item": "https://moodify-app.vercel.app/#wiki-index" },
{ "@type": "ListItem", "position": 3, "name": "Overview", "item": "https://moodify-app.vercel.app/#overview" },
{ "@type": "ListItem", "position": 4, "name": "The Three Models", "item": "https://moodify-app.vercel.app/#models" },
{ "@type": "ListItem", "position": 5, "name": "Architecture", "item": "https://moodify-app.vercel.app/#architecture" },
{ "@type": "ListItem", "position": 6, "name": "Backend Wiki", "item": "https://moodify-app.vercel.app/#wiki-backend" },
{ "@type": "ListItem", "position": 7, "name": "Modal Inference Wiki", "item": "https://moodify-app.vercel.app/#wiki-modal" },
{ "@type": "ListItem", "position": 8, "name": "Frontend & Mobile Wiki", "item": "https://moodify-app.vercel.app/#wiki-frontend" },
{ "@type": "ListItem", "position": 9, "name": "Infrastructure Wiki", "item": "https://moodify-app.vercel.app/#wiki-infra" },
{ "@type": "ListItem", "position": 10, "name": "API Reference", "item": "https://moodify-app.vercel.app/#api-reference" },
{ "@type": "ListItem", "position": 11, "name": "Data Model", "item": "https://moodify-app.vercel.app/#data-model" },
{ "@type": "ListItem", "position": 12, "name": "Personalization Math", "item": "https://moodify-app.vercel.app/#personalization" },
{ "@type": "ListItem", "position": 13, "name": "Glossary", "item": "https://moodify-app.vercel.app/#glossary" },
{ "@type": "ListItem", "position": 14, "name": "FAQ", "item": "https://moodify-app.vercel.app/#faq" }
]
}
]
}
</script>
<!-- =========================================================
STYLES + SCRIPTS
========================================================= -->
<link rel="stylesheet" href="packages/styles.css">
<link rel="stylesheet" href="packages/styles.enhance.css">
<!-- =========================================================
GLOBAL OVERHAUL CSS (scoped tweaks; reuses base vars)
========================================================= -->
<style>
:root {
--mf-grad-1: linear-gradient(135deg, #ff4d4d, #ff7a59 55%, #ec4899);
--mf-grad-2: linear-gradient(135deg, #7B68EE, #22d3ee 55%, #34d399);
--mf-grad-3: linear-gradient(135deg, #f59e0b, #ec4899 55%, #7B68EE);
--mf-card-bg: rgba(255,255,255,0.04);
--mf-card-border: rgba(255,255,255,0.08);
--mf-card-bg-light: rgba(255,77,77,0.04);
--mf-card-border-light: rgba(255,77,77,0.18);
}
html { scroll-padding-top: 90px; }
.mf-wiki-tag {
display: inline-flex; align-items: center; gap: .35rem;
padding: .25rem .6rem; border-radius: 999px;
font-size: .7rem; font-weight: 800; letter-spacing: .4px;
background: linear-gradient(135deg, rgba(123,104,238,0.18), rgba(34,211,238,0.18));
border: 1px solid rgba(123,104,238,0.35);
color: #7B68EE; text-transform: uppercase;
}
.mf-code-inline {
font-family: var(--font-mono, monospace);
background: rgba(0,0,0,0.08); padding: .12rem .4rem;
border-radius: 6px; font-size: .88em;
}
.section-dark .mf-code-inline { background: rgba(255,255,255,0.08); }
.mf-code-block {
font-family: var(--font-mono, monospace);
background: rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.08);
border-radius: 12px; padding: 1rem 1.25rem;
font-size: .82rem; line-height: 1.55; overflow-x: auto;
white-space: pre; color: var(--text-primary, #191414);
}
.section-dark .mf-code-block {
background: rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.08); color: #e2e8f0;
}
.mf-table-wrap { overflow-x: auto; border-radius: 14px; }
.mf-table {
width: 100%; border-collapse: collapse; min-width: 640px;
font-size: .9rem;
}
.mf-table th, .mf-table td {
padding: .8rem 1rem; text-align: left;
border-bottom: 1px solid rgba(0,0,0,0.08);
vertical-align: top;
}
.section-dark .mf-table th, .section-dark .mf-table td {
border-bottom-color: rgba(255,255,255,0.08);
}
.mf-table thead th {
background: var(--mf-grad-1); color: #fff;
font-weight: 800; letter-spacing: .3px;
}
.mf-table tbody tr:hover td { background: rgba(255,77,77,0.05); }
.mf-pill {
display: inline-flex; align-items: center; gap: .35rem;
padding: .2rem .55rem; border-radius: 999px;
font-size: .72rem; font-weight: 700;
background: rgba(255,77,77,0.12); color: #ff4d4d;
border: 1px solid rgba(255,77,77,0.3);
}
.mf-pill.b { background: rgba(123,104,238,0.15); color: #7B68EE; border-color: rgba(123,104,238,0.35); }
.mf-pill.g { background: rgba(52,211,153,0.15); color: #34d399; border-color: rgba(52,211,153,0.35); }
.mf-pill.y { background: rgba(245,158,11,0.15); color: #f59e0b; border-color: rgba(245,158,11,0.35); }
.mf-pill.r { background: rgba(239,68,68,0.15); color: #ef4444; border-color: rgba(239,68,68,0.35); }
.mf-pill.k { background: rgba(0,0,0,0.12); color: #555; border-color: rgba(0,0,0,0.2); }
.section-dark .mf-pill.k { background: rgba(255,255,255,0.1); color: #ccc; border-color: rgba(255,255,255,0.18); }
.mf-method-get { background: rgba(34,211,238,0.18); color: #06b6d4; border-color: rgba(34,211,238,0.4); }
.mf-method-post { background: rgba(52,211,153,0.18); color: #10b981; border-color: rgba(52,211,153,0.4); }
.mf-method-put { background: rgba(245,158,11,0.18); color: #f59e0b; border-color: rgba(245,158,11,0.4); }
.mf-method-delete { background: rgba(239,68,68,0.18); color: #ef4444; border-color: rgba(239,68,68,0.4); }
</style>
</head>
<body>
<!-- Navigation Bar -->
<nav class="navbar">
<div class="container">
<div class="nav-brand">
<img src="images/moodify-logo.png" alt="Moodify Logo" class="logo">
</div>
<ul class="nav-links" id="navLinks">
<li><a href="#home" class="active">Home</a></li>
<li><a href="#overview">Overview</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#how-it-works">How It Works</a></li>
<li><a href="#architecture">Architecture</a></li>
<li><a href="#technology">Tech</a></li>
<li><a href="#deployment">Deploy</a></li>
<li><a href="#demo">Demo</a></li>
<li><a href="#faq">FAQ</a></li>
</ul>
<div class="nav-actions">
<button class="theme-toggle" id="themeToggle" aria-label="Toggle dark mode">
<span class="icon-sun">☀️</span>
<span class="icon-moon">🌙</span>
</button>
<button class="hamburger" id="hamburger" aria-label="Toggle menu">
<span></span>
<span></span>
<span></span>
</button>
</div>
</div>
<div class="progress-container">
<div class="progress-bar" id="progressBar"></div>
</div>
</nav>
<!-- =========================================================
HERO
========================================================= -->
<header class="hero" id="home">
<div class="hero-background">
<div class="gradient-orb orb-1"></div>
<div class="gradient-orb orb-2"></div>
<div class="gradient-orb orb-3"></div>
</div>
<style>
#home .mf-hero-meta {
display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem;
}
#home .mf-hero-meta .mf-pill { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.2); }
#home .mf-now-playing {
margin-top: 1.5rem;
display: flex; align-items: center; gap: .9rem;
padding: .9rem 1.1rem; border-radius: 16px;
background: rgba(0,0,0,0.35);
border: 1px solid rgba(255,255,255,0.12);
backdrop-filter: blur(10px);
max-width: 460px;
}
#home .mf-now-cover {
width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0;
background: linear-gradient(135deg, #ff4d4d, #ec4899);
display: flex; align-items: center; justify-content: center;
font-size: 28px;
}
#home .mf-now-track { font-weight: 800; font-size: .95rem; color: #fff; }
#home .mf-now-meta { font-size: .78rem; opacity: .8; color: #fff; margin-top: 2px; }
#home .mf-now-bars { display: flex; gap: 3px; align-items: flex-end; height: 22px; margin-left: auto; }
#home .mf-now-bars span {
width: 3px; background: linear-gradient(180deg, #ff7a59, #ff4d4d);
border-radius: 2px; animation: mfBar 0.9s ease-in-out infinite;
}
#home .mf-now-bars span:nth-child(1) { height: 50%; animation-delay: 0s; }
#home .mf-now-bars span:nth-child(2) { height: 90%; animation-delay: .1s; }
#home .mf-now-bars span:nth-child(3) { height: 40%; animation-delay: .2s; }
#home .mf-now-bars span:nth-child(4) { height: 70%; animation-delay: .3s; }
#home .mf-now-bars span:nth-child(5) { height: 55%; animation-delay: .4s; }
@keyframes mfBar { 0%,100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
#home .mf-marquee {
margin-top: 2.5rem;
display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center;
font-size: .8rem; font-weight: 700; opacity: .75;
letter-spacing: 1px; text-transform: uppercase;
}
#home .mf-marquee span::before { content: "/ "; opacity: .5; margin-right: .35rem; }
</style>
<div class="container">
<div class="hero-grid">
<div class="hero-content">
<h1 class="hero-title">
Music That<br/>
Understands Your<br/>
<span class="gradient-text" id="mfMoodCycle">Emotions</span>
</h1>
<p class="hero-subtitle">Three self-trained AI models read your mood from <strong>text</strong>, <strong>voice</strong>, or a <strong>selfie</strong>. A personalized Deezer playlist is generated, ranked by quality, and blended with your recent moods - in under two seconds, all open-source and privacy-first.</p>
<div class="hero-buttons">
<a href="https://moodify-app.vercel.app" class="btn btn-primary btn-large" target="_blank" rel="noopener">
<span>Launch Application</span>
<svg class="btn-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"></path></svg>
</a>
<a href="https://github.com/hoangsonww/Moodify-Emotion-Music-App" class="btn btn-secondary btn-large" target="_blank" rel="noopener">
<svg class="github-icon" fill="currentColor" viewBox="0 0 24 24"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/></svg>
<span>Star on GitHub</span>
</a>
</div>
<div class="hero-features">
<div class="feature-pill"><span class="pill-icon">🎯</span><span>95%+ Accuracy</span></div>
<div class="feature-pill"><span class="pill-icon">⚡</span><span><2s Cold Start</span></div>
<div class="feature-pill"><span class="pill-icon">🔒</span><span>JWT + Sliding-Window Limits</span></div>
<div class="feature-pill"><span class="pill-icon">🌍</span><span>Web + iOS + Android</span></div>
<div class="feature-pill"><span class="pill-icon">🎯</span><span>Thompson Sampling RL</span></div>
</div>
<div class="mf-now-playing" aria-label="Now playing preview">
<div class="mf-now-cover">🎵</div>
<div>
<div class="mf-now-track">Recommended for: <em>joy</em></div>
<div class="mf-now-meta">Deezer search · personalized blend · 60 tracks</div>
</div>
<div class="mf-now-bars" aria-hidden="true">
<span></span><span></span><span></span><span></span><span></span>
</div>
</div>
</div>
<div class="hero-visual">
<div class="visual-container">
<div class="emotion-circle">
<div class="emotion-item" style="--rotation: 0deg;">
<div class="emotion-card happy-card">
<div class="emotion-icon">😊</div>
<div class="emotion-name">Happy</div>
</div>
</div>
<div class="emotion-item" style="--rotation: 90deg;">
<div class="emotion-card sad-card">
<div class="emotion-icon">😢</div>
<div class="emotion-name">Sad</div>
</div>
</div>
<div class="emotion-item" style="--rotation: 180deg;">
<div class="emotion-card angry-card">
<div class="emotion-icon">😡</div>
<div class="emotion-name">Angry</div>
</div>
</div>
<div class="emotion-item" style="--rotation: 270deg;">
<div class="emotion-card surprise-card">
<div class="emotion-icon">😮</div>
<div class="emotion-name">Surprised</div>
</div>
</div>
<div class="center-logo">
<div class="logo-pulse"></div>
<span class="logo-text">AI</span>
</div>
</div>
</div>
</div>
</div>
<div class="hero-stats">
<div class="stat-card">
<div class="stat-icon">🤖</div>
<div class="stat-content">
<div class="stat-value" data-count-to="3">3</div>
<div class="stat-label">AI Models</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">✨</div>
<div class="stat-content">
<div class="stat-value" data-count-to="99.9" data-decimals="1" data-suffix="%">99.9%</div>
<div class="stat-label">Uptime Target</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">⚡</div>
<div class="stat-content">
<div class="stat-value" data-count-to="2" data-prefix="<" data-suffix="s"><2s</div>
<div class="stat-label">Cold-Start Time</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">💖</div>
<div class="stat-content">
<div class="stat-value" data-count-to="100" data-suffix="%">100%</div>
<div class="stat-label">Open Source</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">🧪</div>
<div class="stat-content">
<div class="stat-value" data-count-to="261" data-suffix="+">261+</div>
<div class="stat-label">Tests Passing</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">🛡️</div>
<div class="stat-content">
<div class="stat-value" data-count-to="30" data-suffix="+">30+</div>
<div class="stat-label">Technologies</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">🎵</div>
<div class="stat-content">
<div class="stat-value" data-count-to="60">60</div>
<div class="stat-label">Tracks per Analysis</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">🎤</div>
<div class="stat-content">
<div class="stat-value" data-count-to="13">13</div>
<div class="stat-label">Mood Palettes</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">🎮</div>
<div class="stat-content">
<div class="stat-value" data-count-to="19">19</div>
<div class="stat-label">Genre Filters</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon">🌍</div>
<div class="stat-content">
<div class="stat-value" data-count-to="17">17</div>
<div class="stat-label">Country Markets</div>
</div>
</div>
</div>
<div class="mf-marquee" aria-hidden="true">
<span>BERT</span><span>FER + MTCNN</span><span>SVC + MFCC</span><span>FastAPI on Modal</span><span>Django on Vercel</span><span>MongoDB Atlas</span><span>Deezer keyless</span><span>EWMA + Markov</span><span>Helm + Argo CD</span>
</div>
</div>
<script>
(function () {
var el = document.getElementById('mfMoodCycle');
if (!el) return;
var moods = ['Emotions', 'Joy', 'Sadness', 'Anger', 'Calm', 'Excitement', 'Nostalgia', 'Love', 'Focus'];
var i = 0;
setInterval(function () {
i = (i + 1) % moods.length;
el.style.opacity = '0';
setTimeout(function () { el.textContent = moods[i]; el.style.opacity = '1'; }, 220);
}, 2400);
el.style.transition = 'opacity 220ms ease';
})();
</script>
</header>
<!-- =========================================================
OVERVIEW
========================================================= -->
<section id="overview" class="section section-dark">
<div class="container">
<div class="section-header">
<span class="section-badge">About the Project</span>
<h2 class="section-title">What is Moodify?</h2>
<p class="section-subtitle">An intelligent music recommendation system that meets you where your mood is - typed, spoken, or photographed.</p>
</div>
<div class="overview-grid">
<div class="overview-card">
<div class="card-icon">🎯</div>
<h3>Mission</h3>
<p>Make music discovery feel like being understood. Detect mood from <strong>three modalities</strong> (text, voice, face), then surface tracks that match the moment - not the demographic.</p>
</div>
<div class="overview-card">
<div class="card-icon">🧠</div>
<h3>Why three models?</h3>
<p>People express mood differently across contexts. A short text rarely lies; a voice clip captures tone you cannot type; a photo catches the micro-expression you would not admit to. Moodify reads all three.</p>
</div>
<div class="overview-card">
<div class="card-icon">⚡</div>
<h3>Built for speed</h3>
<p>Memory-snapshot inference container restores in seconds, not minutes. From input to playlist averages under two seconds end-to-end, even on first request after idle.</p>
</div>
<div class="overview-card">
<div class="card-icon">🌍</div>
<h3>Open by default</h3>
<p>MIT license, public repo, public model weights on Hugging Face Hub. Every architectural decision is documented in the READMEs and condensed into the wiki below.</p>
</div>
<div class="overview-card">
<div class="card-icon">📱</div>
<h3>Web + iOS + Android</h3>
<p>One React 18 codebase for web (Vercel), one Expo SDK 51 codebase for mobile (EAS Build). The mobile app talks directly to the Modal inference service - the Django API stays out of the data path.</p>
</div>
<div class="overview-card">
<div class="card-icon">🔒</div>
<h3>Private by design</h3>
<p>Photos and voice clips are sent to the inference container for a single classification call and <strong>never persisted</strong>. Only the resulting mood label and saved track metadata land in your profile.</p>
</div>
<div class="overview-card">
<div class="card-icon">🎱</div>
<h3>Learns your taste - with real RL</h3>
<p>Every 馃憤, 馃憥 (and un-vote), plus open-in-Deezer, trains <strong>your</strong> playlist ranker - and your like/dislike state persists across reloads. A Thompson Sampling contextual bandit re-orders the list once you cross 20 events; a per-user calibration map even corrects mis-classified emotions. New & anonymous users see the rule-based pipeline untouched.</p>
</div>
<div class="overview-card">
<div class="card-icon">🎉</div>
<h3>Built in public</h3>
<p>Code, decisions, and tradeoffs are all on GitHub. Browse the issues, copy a pattern, file a PR. Moodify is a working reference for shipping AI products, not a black box.</p>
</div>
</div>
<div class="info-banner">
<div class="banner-icon">⚠️</div>
<div>
<strong>Notice:</strong> The official developer is <strong>Son Nguyen</strong> (<a href="https://github.com/hoangsonww" target="_blank" rel="noopener">@hoangsonww</a> on GitHub). Be aware of impersonation attempts - do not send money or personal information to anyone claiming to be associated with this project.
</div>
</div>
</div>
</section>
<!-- =========================================================
FEATURES
========================================================= -->
<section id="features" class="section section-dark">
<div class="container">
<div class="section-header">
<span class="section-badge">Capabilities</span>
<h2 class="section-title">Key Features</h2>
<p class="section-subtitle">A complete emotion detection and music recommendation system, surfaced through a clean, accessible UI.</p>
</div>
<div class="features-grid">
<div class="feature-card">
<div class="feature-icon">📝</div>
<h3>Text Emotion Analysis</h3>
<p>Fine-tuned BERT classifier reads tone, sentiment, and emotional vocabulary from typed input. Five labels: <em>sadness, joy, love, anger, fear</em>.</p>
<div class="feature-tags">
<span class="tag">NLP</span>
<span class="tag">BERT</span>
<span class="tag">Transformers</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🎤</div>
<h3>Speech Emotion Detection</h3>
<p>SVC classifier over librosa MFCC features. Eight labels: <em>calm, happy, sad, angry, fearful, disgust, surprised, neutral</em>. Sub-second inference, sub-second feature extract.</p>
<div class="feature-tags">
<span class="tag">SVC</span>
<span class="tag">MFCC</span>
<span class="tag">librosa</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">📸</div>
<h3>Facial Expression Recognition</h3>
<p>FER Keras model wrapped in MTCNN face detection. Seven labels (Ekman + neutral). Works on a single front-camera photo, no video stream required.</p>
<div class="feature-tags">
<span class="tag">FER</span>
<span class="tag">MTCNN</span>
<span class="tag">facenet-pytorch</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🎵</div>
<h3>Deezer Recommendations</h3>
<p>Keyless integration with Deezer's Search API. Returns track name, artist, album, 30s preview, cover art, popularity rank, and a deep link to the streamable web player.</p>
<div class="feature-tags">
<span class="tag">Deezer API</span>
<span class="tag">Keyless</span>
<span class="tag">30s Previews</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🎯</div>
<h3>Reinforcement Learning Loop</h3>
<p><strong>Thompson Sampling contextual bandit</strong> over a Beta-Bernoulli posterior. Every 馃憤 / 馃憥 / un-vote (clear) / open-in-Deezer tap updates a 22-dim posterior (emotion × decade × duration × popularity-quintile) that re-ranks the next list once you cross 20 logged events. Votes use set-semantics - a like ↔ dislike switch or a clear reconciles cleanly with no double-count - and your like/dislike buttons restore their state after a reload via <code class="mf-code-inline">GET /api/feedback/tracks/</code>.</p>
<div class="feature-tags">
<span class="tag">Thompson Sampling</span>
<span class="tag">Beta-Bernoulli</span>
<span class="tag">Contextual Bandit</span>
<span class="tag">Online RL</span>
<span class="tag">Persisted votes</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🔮</div>
<h3>Per-user Mood Calibration</h3>
<p>A "Was this right?" widget captures every disagreement with the BERT detector. After three same-direction corrections (e.g. <em>joy → love</em>), the inference path rewrites the predicted label for that user only - immediate, no retrain, anonymous callers untouched.</p>
<div class="feature-tags">
<span class="tag">Online Calibration</span>
<span class="tag">Per-user</span>
<span class="tag">No Retrain</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🧠</div>
<h3>Base Personalization (EWMA + Markov)</h3>
<p>Recency-weighted EWMA + first-order Markov chain + adaptive blend ratio produce the candidate list the bandit re-ranks. Recurring moods seep into the current playlist at a clamped, recency-decayed rate.</p>
<div class="feature-tags">
<span class="tag">EWMA</span>
<span class="tag">Markov</span>
<span class="tag">O(history+tracks)</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">👤</div>
<h3>User Management</h3>
<p>JWT auth (HS256, 7d access + 14d refresh) - sign in with <strong>username or email</strong>. Mongo-backed profile, append-only mood history, a <code class="mf-code-inline">listening_history</code> of full track dicts (rich profile cards), and saved recommendations with rich track objects.</p>
<div class="feature-tags">
<span class="tag">JWT</span>
<span class="tag">Username or Email</span>
<span class="tag">MongoDB</span>
<span class="tag">mongoengine</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🔐</div>
<h3>Passwordless Passkeys</h3>
<p>Sign in with Face ID, Touch ID, Windows Hello, or a hardware security key - no password. <strong>WebAuthn / FIDO2</strong> verified by py_webauthn. Users enroll multiple passkeys and manage them (add / rename / delete) on a dedicated Account → Passkeys page; a verified assertion mints the same JWT pair as password login.</p>
<div class="feature-tags">
<span class="tag">WebAuthn</span>
<span class="tag">FIDO2</span>
<span class="tag">Passwordless</span>
<span class="tag">py_webauthn</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">📱</div>
<h3>Mobile Application</h3>
<p>Expo SDK 51 + React Native 0.74 with Hermes engine. AsyncStorage for tokens, EAS Build for both stores, native camera + microphone for the three modalities.</p>
<div class="feature-tags">
<span class="tag">React Native</span>
<span class="tag">Expo</span>
<span class="tag">Hermes</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🛡️</div>
<h3>Cost Protection</h3>
<p>Two-tier sliding-window rate limit (general + media) keyed on JWT <code class="mf-code-inline">sub</code>, two-layer caches (text + Deezer + hash-of-bytes), and a hard <code class="mf-code-inline">MAX_CONTAINERS=5</code> ceiling at the Modal layer.</p>
<div class="feature-tags">
<span class="tag">Sliding-window</span>
<span class="tag">LRU+TTL</span>
<span class="tag">429 Retry-After</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">📊</div>
<h3>SRE Metrics</h3>
<p>Per-request observability into MongoDB time-series collections. Admin-only <code class="mf-code-inline">/api/metrics/</code> aggregator returns p50/p95/p99 latency, error rates, and status-code breakdown for any rolling window.</p>
<div class="feature-tags">
<span class="tag">Time-series</span>
<span class="tag">p95</span>
<span class="tag">Admin</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🌡️</div>
<h3>Resilient Fallbacks</h3>
<p>Deezer down? Curated 14-track fallback list. Speech model fails to load? Endpoint returns <code class="mf-code-inline">degraded:true</code> with neutral instead of 500. A failing model never takes down the others.</p>
<div class="feature-tags">
<span class="tag">Fallback</span>
<span class="tag">Degraded</span>
<span class="tag">Isolated</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🌙</div>
<h3>Dark + Light Themes</h3>
<p>Theme switch toggles a full set of CSS variables. Honors <code class="mf-code-inline">prefers-color-scheme</code> on first paint; persisted in <code class="mf-code-inline">localStorage</code> across sessions.</p>
<div class="feature-tags">
<span class="tag">CSS Vars</span>
<span class="tag">A11y</span>
<span class="tag">SSR-safe</span>
</div>
</div>
<div class="feature-card">
<div class="feature-icon">🌐</div>
<h3>Market & Genre Filters</h3>
<p>17 country markets (Global + 16) and 19 genre filters bias the Deezer search phrase before it leaves the inference container. Results stay culturally relevant.</p>
<div class="feature-tags">
<span class="tag">17 markets</span>
<span class="tag">19 genres</span>
<span class="tag">Server-side</span>
</div>
</div>
</div>
</div>
</section>
<!-- =========================================================
HOW IT WORKS (user-friendly)
========================================================= -->
<section id="how-it-works" class="section">
<style>
#how-it-works .mf-hiw {
display: grid; gap: 1.25rem; margin-top: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
#how-it-works .mf-hiw-card {
position: relative;
padding: 1.75rem 1.5rem 1.5rem;
border-radius: 18px;
background: var(--bg-secondary, #fafbfc);
border: 1px solid rgba(255, 77, 77, 0.18);
transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
#how-it-works .mf-hiw-card:hover {
transform: translateY(-4px);
box-shadow: 0 18px 40px rgba(255, 77, 77, 0.14);
border-color: rgba(255, 77, 77, 0.45);
}
#how-it-works .mf-hiw-step {
position: absolute; top: -14px; left: 20px;
width: 36px; height: 36px;
display: flex; align-items: center; justify-content: center;
font-weight: 900; font-size: 1rem;
background: linear-gradient(135deg, #ff4d4d, #ff7a59);
color: #fff;
border-radius: 50%;
box-shadow: 0 6px 16px rgba(255, 77, 77, 0.35);
}
#how-it-works .mf-hiw-emoji { font-size: 2rem; margin-bottom: .5rem; }
#how-it-works .mf-hiw-card h3 { font-size: 1.1rem; margin: 0 0 .5rem 0; }
#how-it-works .mf-hiw-card p { margin: 0; font-size: .95rem; line-height: 1.6; opacity: .85; }
</style>
<div class="container">
<div class="section-header">
<span class="section-badge">How It Works</span>
<h2 class="section-title">Three Steps. One Playlist.</h2>
<p class="section-subtitle">From "how do I feel" to a playlist on your phone in under two seconds.</p>
</div>
<div class="mf-hiw">
<div class="mf-hiw-card">
<div class="mf-hiw-step">1</div>
<div class="mf-hiw-emoji">💬</div>
<h3>Share a moment</h3>
<p>Type a few words about your day, record a few seconds of your voice, or snap a quick selfie. Pick whichever feels easiest in the moment.</p>
</div>
<div class="mf-hiw-card">
<div class="mf-hiw-step">2</div>
<div class="mf-hiw-emoji">🧠</div>
<h3>Moodify reads the mood</h3>
<p>Three small AI models work behind the scenes - one for text, one for voice, one for faces. They turn your input into a mood label like "calm" or "excited."</p>
</div>
<div class="mf-hiw-card">
<div class="mf-hiw-step">3</div>
<div class="mf-hiw-emoji">🎵</div>
<h3>Press play</h3>
<p>Up to 60 tracks tuned to that mood appear instantly - with 30-second previews and one-tap deep links to Deezer. Save the ones you love to your history.</p>
</div>
</div>
</div>
</section>
<!-- =========================================================
WHY YOU'LL LIKE IT (user-friendly value props)
========================================================= -->
<section id="why" class="section section-dark">
<style>
#why .mf-why {
display: grid; gap: 1.25rem; margin-top: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
#why .mf-why-card {
padding: 1.5rem;
border-radius: 18px;
background: rgba(255, 255, 255, 0.04);
border: 2px solid rgba(255, 122, 89, 0.35);
outline: 1px solid rgba(255, 255, 255, 0.06);
outline-offset: 2px;
transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
#why .mf-why-card:hover {
transform: translateY(-4px);
border-color: #ff7a59;
box-shadow: 0 18px 40px rgba(255, 122, 89, 0.25);
}
#why .mf-why-emoji { font-size: 1.75rem; margin-bottom: .5rem; }
#why .mf-why-card h3 { font-size: 1rem; margin: 0 0 .4rem 0; }
#why .mf-why-card p { margin: 0; font-size: .9rem; line-height: 1.6; opacity: .82; }
</style>
<div class="container">
<div class="section-header">
<span class="section-badge">Why Moodify</span>
<h2 class="section-title">Built for People, Not Algorithms</h2>
<p class="section-subtitle">A side project that ended up being the music app I actually use every day.</p>
</div>
<div class="mf-why">
<div class="mf-why-card">
<div class="mf-why-emoji">🎯</div>
<h3>It actually gets your mood</h3>
<p>No more endless scrolling for the right vibe. Three AI models read how you feel and skip straight to music that fits.</p>
</div>
<div class="mf-why-card">
<div class="mf-why-emoji">🔒</div>
<h3>Your photos stay yours</h3>
<p>Selfies and voice clips are used once to detect mood, then thrown away. Only the mood label is saved. No tracking, no resale.</p>
</div>
<div class="mf-why-card">
<div class="mf-why-emoji">⚡</div>
<h3>Instant playlists</h3>
<p>Under two seconds from input to a ranked, deduped 60-track playlist. No spinners, no waiting, no manual searching.</p>
</div>
<div class="mf-why-card">
<div class="mf-why-emoji">🚀</div>
<h3>Open source · MIT</h3>
<p>Every line of code is on GitHub. Read it, fork it, self-host it, contribute. Pull requests welcome.</p>
</div>
</div>
</div>
</section>
<!-- =========================================================
ARCHITECTURE TABS
========================================================= -->
<section id="architecture" class="section section-dark">
<div class="container">
<div class="section-header">
<span class="section-badge">System Design</span>
<h2 class="section-title">System Architecture</h2>
<p class="section-subtitle">Cloud-native, modular, and split along a clean service boundary. Pick a lens below.</p>
</div>
<div class="architecture-tabs">
<button class="tab-btn active" data-tab="overview">Overview</button>
<button class="tab-btn" data-tab="flow">Data Flow</button>
<button class="tab-btn" data-tab="deployment">Deployment</button>
<button class="tab-btn" data-tab="security">Security</button>
</div>
<div class="tab-content active" id="overview-tab">
<div class="mf-diagram">
<div class="mf-diagram-title">System Overview</div>
<div class="mf-flow" style="display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;">
<div class="mf-flow-col">
<div class="mf-flow-col-title">Clients</div>
<div class="mf-flow-node alt-b">Web (React 18)</div>
<div class="mf-flow-node alt-b">Mobile (Expo)</div>
</div>
<div class="mf-flow-col">
<div class="mf-flow-col-title">Edge (Vercel)</div>
<div class="mf-flow-node alt-k">Django + DRF</div>
<div class="mf-flow-node alt-k">Swagger / Redoc</div>
</div>
<div class="mf-flow-col">
<div class="mf-flow-col-title">ML (Modal)</div>
<div class="mf-flow-node">FastAPI ASGI</div>
<div class="mf-flow-node">BERT 路 SVC 路 FER</div>
<div class="mf-flow-node alt-y">Personalization</div>
</div>
<div class="mf-flow-col">
<div class="mf-flow-col-title">External</div>
<div class="mf-flow-node alt-y">Deezer Search</div>
<div class="mf-flow-node alt-b">Hugging Face Hub</div>
</div>
<div class="mf-flow-col">
<div class="mf-flow-col-title">Data</div>
<div class="mf-flow-node alt-g">MongoDB Atlas</div>
<div class="mf-flow-node alt-g">Metrics TS (30d)</div>
</div>
</div>
</div>
<div class="architecture-description">
<h3>Two services, one experience</h3>
<ul>
<li><strong>The web tier</strong> handles everything you see: sign-in, profile, mood history, app shell. Light and fast.</li>
<li><strong>The AI tier</strong> handles the heavy lifting: emotion detection, personalization, and finding tracks that fit your mood.</li>
<li><strong>Clean split</strong> means each side can grow on its own. The app stays snappy whether you have ten users or ten thousand.</li>
<li><strong>Direct uploads</strong> from your phone or browser go straight to the AI tier, so big files don't get stuck in the middle.</li>
<li><strong>Your data</strong> lives in a managed database. Mood history and saved tracks stay with you across visits and devices.</li>
<li><strong>Open architecture.</strong> Every piece of the stack is documented and replaceable - swap any service, keep the experience.</li>
</ul>
</div>
</div>
<div class="tab-content" id="flow-tab">
<div class="mf-diagram">
<div class="mf-diagram-title">Request Lifecycle</div>
<div class="mf-flow">
<div class="mf-flow-node alt-b">User input</div>
<span class="mf-flow-arrow">→</span>
<div class="mf-flow-node alt-k">Client capture</div>
<span class="mf-flow-arrow">→</span>
<div class="mf-flow-node">Modal /text|speech|facial_emotion</div>
<span class="mf-flow-arrow">→</span>
<div class="mf-flow-node alt-y">JWT verify</div>
<span class="mf-flow-arrow">→</span>
<div class="mf-flow-node">Model predict</div>
<span class="mf-flow-arrow">→</span>
<div class="mf-flow-node alt-y">Personalization</div>
<span class="mf-flow-arrow">→</span>
<div class="mf-flow-node alt-y">Deezer search</div>
<span class="mf-flow-arrow">→</span>