-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
1041 lines (991 loc) · 55.8 KB
/
Copy pathapp.js
File metadata and controls
1041 lines (991 loc) · 55.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
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
/* ==========================================================================
CodeLab Core Application Logic - Extended Developer Curriculum Database
========================================================================== */
// 1. Full Topic Database Setup (40+ Topics)
const topicsData = [
// Programming Languages
{
id: "python",
name: "Python",
category: "Programming Languages",
icon: "fa-brands fa-python",
desc: "High-level programming language focused on code readability. Widely used in automation, AI, data science, and backend systems.",
githubPath: "Python",
syllabus: [
{ title: "01 Fundamentals & Setup", desc: "Python interpreter setup, virtual environments, Pip package manager, variables, and math operators." },
{ title: "02 Basic Syntax", desc: "Logical operators, conditional structures, range loops, and nested control flows." },
{ title: "03 First Program (Hello World)", desc: "Creating hello_world.py, running scripts via shell, and standard outputs." },
{ title: "04 Basic Programs", desc: "Building interactive calculators, array search filters, and string case reversers." },
{ title: "05 Advanced Object-Oriented", desc: "Defining classes, encapsulation, inheritance overrides, and custom dunder methods." }
],
codeSnippet: `def memoize(fn):\n cache = {}\n def helper(*args):\n if args not in cache:\n cache[args] = fn(*args)\n return cache[args]\n return helper`
},
{
id: "javascript",
name: "JavaScript",
category: "Programming Languages",
icon: "fa-brands fa-js",
desc: "Universal dynamic scripting language powering browser functionality and server-side runtimes.",
githubPath: "JavaScript",
syllabus: [
{ title: "01 Fundamentals & Runtimes", desc: "Engine compiler lifecycles, variables (let, const), global objects, and node runtime execution." },
{ title: "02 Basic Syntax", desc: "Conditional branches, basic loops, function declarations, array maps, and objects." },
{ title: "03 First Program (Hello World)", desc: "Logging outputs to standard browser developer tools consoles and running scripts in terminals." },
{ title: "04 Basic Programs", desc: "Creating dynamic temperature converters, DOM button toggles, and list search matching functions." },
{ title: "05 Asynchronous Paradigms", desc: "Working with callbacks, Promises, dynamic resolved states, and async/await wrappers." }
],
codeSnippet: `const fetchData = () => new Promise((resolve) => {\n setTimeout(() => resolve("Data Loaded"), 1000);\n});`
},
{
id: "typescript",
name: "TypeScript",
category: "Programming Languages",
icon: "fa-solid fa-code-branch",
desc: "Statically typed superset of JavaScript compiling to plain JavaScript for scalable web systems.",
githubPath: "TypeScript",
syllabus: [
{ title: "01 Fundamentals & tsc Compiler", desc: "Configuring tsconfig.json, compiling source directories, and setting types." },
{ title: "02 Basic Syntax & Types", desc: "Type declarations, interfaces, unions, intersections, and enums." },
{ title: "03 First Program", desc: "Declaring interface schemas, variable bindings, and compiling to ES6 output." },
{ title: "04 Basic Programs", desc: "Creating static calculator functions and generic list filters." },
{ title: "05 Generic Classes & Interfaces", desc: "Designing reusable, type-safe structures, functions, and abstractions." }
],
codeSnippet: `interface User {\n id: number;\n name: string;\n}\nconst printUser = (u: User): void => console.log(u.name);`
},
{
id: "csharp",
name: "C#",
category: "Programming Languages",
icon: "fa-solid fa-hashtag",
desc: "Microsoft's multi-paradigm object-oriented language for Windows desktop development, .NET Core backends, and Unity.",
githubPath: "CSharp",
syllabus: [
{ title: "01 Fundamentals & .NET SDK", desc: "CLI project initialization, solution layouts, namespaces, and standard inputs." },
{ title: "02 Basic Syntax", desc: "Declaring classes, value types vs reference types, conditional checks, and foreach loops." },
{ title: "03 First Program (Hello World)", desc: "Creating Program.cs using Top-Level Statements and logging strings." },
{ title: "04 Basic Programs", desc: "Building file read-writers, list filtering models, and input validators." },
{ title: "05 LINQ & Async TPL", desc: "Querying collections directly and launching async Tasks using await." }
],
codeSnippet: `using System;\nusing System.Linq;\n\nvar numbers = new[] { 1, 2, 3, 4, 5 };\nvar evens = numbers.Where(n => n % 2 == 0);\nConsole.WriteLine(string.Join(", ", evens));`
},
{
id: "swift",
name: "Swift",
category: "Programming Languages",
icon: "fa-brands fa-swift",
desc: "Apple's compiled language for iOS, macOS, watchOS, and tvOS apps.",
githubPath: "Swift",
syllabus: [
{ title: "01 Fundamentals & Xcode Playground", desc: "Xcode setup, Swift syntax structures, let/var declarations, and safe compiling." },
{ title: "02 Basic Syntax & Optionals", desc: "Null validations (if-let, guard), type conversions, structs, and enums." },
{ title: "03 First Program (Hello World)", desc: "Printing statements and initializing simple structural playgrounds." },
{ title: "04 Basic Programs", desc: "Creating structures to count items, search lists, and filter collections." },
{ title: "05 SwiftUI View Framework", desc: "Building state-driven layouts, declaring buttons, lists, and view grids." }
],
codeSnippet: `let name: String? = "Swift"\nif let activeName = name {\n print("Hello, \\(activeName)")\n}`
},
{
id: "kotlin",
name: "Kotlin",
category: "Programming Languages",
icon: "fa-solid fa-mobile-screen",
desc: "Modern statically typed language targeting the JVM and Android, featuring null-safety integrations.",
githubPath: "Kotlin",
syllabus: [
{ title: "01 Fundamentals & JVM Setup", desc: "JDK setup, compiler configurations, var/val definitions, and types." },
{ title: "02 Basic Syntax", desc: "Nullable types (?), conditional when blocks, loops, ranges, and functions." },
{ title: "03 First Program (Hello World)", desc: "Declaring main functions and executing scripts on the terminal." },
{ title: "04 Basic Programs", desc: "Building number sorters, string parsers, and custom list filters." },
{ title: "05 Android UI Compose", desc: "Integrating Jetpack Compose components, declaring buttons, and MVVM views." }
],
codeSnippet: `fun main() {\n val list = listOf("Kotlin", "Java")\n val filtered = list.filter { it.startsWith("K") }\n println(filtered)\n}`
},
{
id: "rust",
name: "Rust",
category: "Programming Languages",
icon: "fa-solid fa-shield-halved",
desc: "Systems programming language focused on memory safety, concurrency, and speed without a garbage collector.",
githubPath: "Rust",
syllabus: [
{ title: "01 Fundamentals & Cargo Manager", desc: "Rustup compiler toolchains, Cargo projects setup, and memory architectures." },
{ title: "02 Basic Syntax & Ownership", desc: "Rules of ownership, references, borrow checkers, lifetimes, and structs." },
{ title: "03 First Program (Hello World)", desc: "Defining fn main() and using macro printing println!." },
{ title: "04 Basic Programs", desc: "Building CLI calculators, prime number testers, and safe array index lookups." },
{ title: "05 Match Control Flows & Concurrency", desc: "Pattern matching enums (Option/Result) and passing synchronized threads across channels." }
],
codeSnippet: `fn main() {\n let name = Some("Rust");\n match name {\n Some(n) => println!("Hello, {}!", n),\n None => (),\n }\n}`
},
{
id: "go",
name: "Go",
category: "Programming Languages",
icon: "fa-solid fa-terminal",
desc: "Google's open-source programming language for building simple, reliable, and efficient cloud networks.",
githubPath: "Go",
syllabus: [
{ title: "01 Fundamentals & Module Paths", desc: "Go runtime environment variables, module creation, and memory garbage collector basics." },
{ title: "02 Basic Syntax", desc: "Variable bindings, pointers, structs, slices, maps, and loop structures." },
{ title: "03 First Program (Hello World)", desc: "Defining package main, importing fmt, and printing console logs." },
{ title: "04 Basic Programs", desc: "Building mathematical parsers, string matching, and writing files." },
{ title: "05 Goroutines & Channels", desc: "Spawning lightweight concurrent routines and synchronizing data blocks." }
],
codeSnippet: `package main\nimport "fmt"\nfunc main() {\n ch := make(chan string)\n go func() { ch <- "Telemetry Send" }()\n fmt.Println(<-ch)\n}`
},
{
id: "c",
name: "C",
category: "Programming Languages",
icon: "fa-solid fa-microchip",
desc: "Procedural systems programming language, providing low-level memory access and hardware integrations.",
githubPath: "C",
syllabus: [
{ title: "01 Fundamentals & gcc Compiler", desc: "Setting up compilers, memory pointer basics, and variable types." },
{ title: "02 Basic Syntax", desc: "Conditionals, switch cases, standard while/for loops, functions, and structs." },
{ title: "03 First Program (Hello World)", desc: "Writing hello.c, importing stdio.h, and executing compiled binaries." },
{ title: "04 Basic Programs", desc: "Implementing factorial recursions, array sorting, and pointer swapping." },
{ title: "05 Manual Memory Allocations", desc: "Managing heap allocations using malloc, calloc, realloc, and free." }
],
codeSnippet: `#include <stdio.h>\nint main() {\n printf("Hello C\\n");\n return 0;\n}`
},
{
id: "cpp",
name: "C++",
category: "Programming Languages",
icon: "fa-solid fa-laptop-code",
desc: "Powerful general-purpose systems programming language featuring manual memory management and object-oriented architectures.",
githubPath: "Cpp",
syllabus: [
{ title: "01 Fundamentals & Compiler Paths", desc: "Compiler setups, object-oriented concepts, namespaces, and compilation pipelines." },
{ title: "02 Basic Syntax & OOP", desc: "Classes, objects, inheritance override structures, encapsulation, and standard inputs." },
{ title: "03 First Program (Hello World)", desc: "Importing iostream, using std::cout, and running executables." },
{ title: "04 Basic Programs", desc: "Designing simple custom vector classes and implementing search routines." },
{ title: "05 Smart Pointer Classes", desc: "Managing memory scopes using unique_ptr and shared_ptr to prevent leaks." }
],
codeSnippet: `#include <iostream>\n#include <memory>\nint main() {\n auto ptr = std::make_unique<int>(10);\n std::cout << *ptr << std::endl;\n return 0;\n}`
},
{
id: "java",
name: "Java",
category: "Programming Languages",
icon: "fa-brands fa-java",
desc: "Object-oriented class-based language designed to have minimal implementation dependencies, running on JVM platforms.",
githubPath: "Java",
syllabus: [
{ title: "01 Fundamentals & JDK Setup", desc: "Java Development Kit installation, compiler (javac), virtual machine (JVM), and classpath rules." },
{ title: "02 Basic Syntax & OOP", desc: "Classes, interfaces, packages, variables, conditional statements, and loops." },
{ title: "03 First Program (Hello World)", desc: "Declaring public class, public static void main method, and System.out." },
{ title: "04 Basic Programs", desc: "Building string reversers, prime number checks, and simple calculators." },
{ title: "05 Collections Framework", desc: "Using List, Map, Set interfaces, and sorting objects dynamically." }
],
codeSnippet: `public class Main {\n public static void main(String[] args) {\n System.out.println("Hello Java");\n }\n}`
},
{
id: "php",
name: "PHP",
category: "Programming Languages",
icon: "fa-brands fa-php",
desc: "Server-side scripting language designed primarily for web development and dynamic templating.",
githubPath: "PHP",
syllabus: [
{ title: "01 Fundamentals & Server Setup", desc: "PHP interpreter, Apache integration, local development environments, and variables." },
{ title: "02 Basic Syntax", desc: "Conditionals, loops, arrays (indexed/associative), and standard functions." },
{ title: "03 First Program (Hello World)", desc: "Embedding PHP tags inside HTML files and echoing strings." },
{ title: "04 Basic Programs", desc: "Building login form checkers, file uploaders, and string parsers." },
{ title: "05 Database Queries (PDO)", desc: "Connecting to MySQL databases securely using PDO parameter statements." }
],
codeSnippet: `<?php\necho "Hello PHP";\n?>`
},
{
id: "r",
name: "R",
category: "Programming Languages",
icon: "fa-solid fa-chart-line",
desc: "Software environment for statistical computing, data analysis, and graphical plots.",
githubPath: "R",
syllabus: [
{ title: "01 Fundamentals & RStudio", desc: "R console environment, mathematical operations, vectors, and variables." },
{ title: "02 Basic Syntax", desc: "Lists, matrices, data frames, factors, conditionals, and loops." },
{ title: "03 First Program", desc: "Printing statements, loading datasets, and getting basic summary stats." },
{ title: "04 Basic Programs", desc: "Reading CSV files, calculating means/medians, and plotting basic histograms." },
{ title: "05 dplyr & ggplot2 Operations", desc: "Filtering rows, selecting columns, mutating values, and designing charts." }
],
codeSnippet: `# Calculate mean\nnumbers <- c(2, 4, 6, 8)\nprint(mean(numbers))`
},
{
id: "ruby",
name: "Ruby",
category: "Programming Languages",
icon: "fa-solid fa-gem",
desc: "Dynamic object-oriented programming language focusing on simplicity, readability, and productivity.",
githubPath: "Ruby",
syllabus: [
{ title: "01 Fundamentals & IRB Shell", desc: "Ruby runtime setups, Interactive Ruby (IRB) shell, and variables." },
{ title: "02 Basic Syntax", desc: "Conditionals, unless structures, loops, arrays, hashes, and block closures." },
{ title: "03 First Program (Hello World)", desc: "Writing hello.rb and printing output strings using puts." },
{ title: "04 Basic Programs", desc: "Building file read-writers, list search matchers, and string reversers." },
{ title: "05 Ruby Gems & Rails Introduction", desc: "Installing libraries, configuring Gemfiles, Bundler, and MVC layouts." }
],
codeSnippet: `class User\n attr_accessor :name\n def initialize(name) @name = name end\nend\nu = User.new("Ruby")`
},
{
id: "scala",
name: "Scala",
category: "Programming Languages",
icon: "fa-solid fa-sliders",
desc: "Object-functional JVM development language combining OOP patterns with purely functional concepts.",
githubPath: "Scala",
syllabus: [
{ title: "01 Fundamentals & SBT Tools", desc: "Scala compiler, SBT build configurations, type hierarchies, and val/var differences." },
{ title: "02 Basic Syntax", desc: "If expressions, matching structures, loop systems, and case classes." },
{ title: "03 First Program (Hello World)", desc: "Declaring objects extending App or main methods and printing logs." },
{ title: "04 Basic Programs", desc: "Creating recursive lists, number filters, and string parsers." },
{ title: "05 Functional Architectures", desc: "Higher-order mappings, monads, Currying, and lazy variables." }
],
codeSnippet: `object Main extends App {\n val msg = "Hello Scala"\n println(msg)\n}`
},
{
id: "haskell",
name: "Haskell",
category: "Programming Languages",
icon: "fa-solid fa-circle-nodes",
desc: "Purely functional statically typed language featuring lazy evaluation and monadic IO controllers.",
githubPath: "Haskell",
syllabus: [
{ title: "01 Fundamentals & GHC Compiler", desc: "Glasgow Haskell Compiler, pure functions concepts, and basic types." },
{ title: "02 Basic Syntax", desc: "Function types, pattern matching, guard expressions, and lists." },
{ title: "03 First Program (Hello World)", desc: "Defining main = putStrLn and running code in GHCi." },
{ title: "04 Basic Programs", desc: "Implementing Fibonacci calculations, list mapping, and filter algorithms." },
{ title: "05 Monads & IO Controls", desc: "Understanding the Monad type class and managing input/output safely." }
],
codeSnippet: `main :: IO ()\nmain = putStrLn "Hello Haskell"`
},
{
id: "julia",
name: "Julia",
category: "Programming Languages",
icon: "fa-solid fa-calculator",
desc: "High-level high-performance dynamic programming language optimized for numerical analysis and computational science.",
githubPath: "Julia",
syllabus: [
{ title: "01 Fundamentals & REPL Command", desc: "Julia setups, REPL shell inputs, type systems, and mathematical conventions." },
{ title: "02 Basic Syntax", desc: "Loops, conditionals, array slices, matrix math, and functions." },
{ title: "03 First Program (Hello World)", desc: "Executing Julia files and printing output logs." },
{ title: "04 Basic Programs", desc: "Performing linear regressions, array sorting, and vector operations." },
{ title: "05 Multiple Dispatch Patterns", desc: "Designing function signatures executing dynamically based on arguments types." }
],
codeSnippet: `function greet(name::String)\n println("Hello, ", name)\nend`
},
{
id: "assembly",
name: "Assembly",
category: "Programming Languages",
icon: "fa-solid fa-microchip",
desc: "Low-level processor-specific architecture language translating directly to hardware machine codes.",
githubPath: "Assembly",
syllabus: [
{ title: "01 Fundamentals & CISC/RISC", desc: "CPU designs (x86_64 vs ARM), memory stacks, and compilers (NASM)." },
{ title: "02 CPU Register structures", desc: "Accumulators, stack pointers, data pointers, and program counters." },
{ title: "03 First Program (Hello World)", desc: "Declaring data sections, sys_write system calls, and exit procedures." },
{ title: "04 Basic Programs", desc: "Implementing basic addition arithmetic and conditional jump operations." },
{ title: "05 Stack Control Operations", desc: "Pushing and popping variables to control function calls." }
],
codeSnippet: `section .data\n msg db 'Hello',0xa\nsection .text\n global _start\n_start: mov eax,4; sys_write`
},
{
id: "objectivec",
name: "Objective-C",
category: "Programming Languages",
icon: "fa-solid fa-apple-whole",
desc: "Legacy C-based messaging language historically used for iOS and macOS systems.",
githubPath: "Objective-C",
syllabus: [
{ title: "01 Fundamentals & Compiler Hooks", desc: "Apple Developer setups, Smalltalk syntax heritage, and base types." },
{ title: "02 Basic Syntax & Classes", desc: "Declaring interface/implementation, variables, and properties." },
{ title: "03 First Program (Hello World)", desc: "Importing Foundation, using NSLog, and compiling with clang." },
{ title: "04 Basic Programs", desc: "Instantiating custom classes, calling method hooks, and reading arrays." },
{ title: "05 Memory Ref ARC vs MRC", desc: "Automatic Reference Counting (ARC) vs historical Manual Reference Counting." }
],
codeSnippet: `@interface User : NSObject\n@property NSString *name;\n@end`
},
// Frontend & Web
{
id: "html",
name: "HTML",
category: "Frontend & Web",
icon: "fa-brands fa-html5",
desc: "HyperText Markup Language - standard structuring layout for all web documents.",
githubPath: "HTML",
syllabus: [
{ title: "01 Fundamentals & Elements", desc: "HTML5 tag syntax, document headers, bodies, paragraphs, and attributes." },
{ title: "02 Semantic Layouts", desc: "Using article, section, nav, header, footer, and main elements." },
{ title: "03 First Program (Basic Page)", desc: "Creating a basic index.html document with headings and lists." },
{ title: "04 Web Forms & Inputs", desc: "Building text fields, check boxes, radio buttons, and submit buttons." },
{ title: "05 SEO Metadata and Tags", desc: "Implementing page titles, descriptions, character sets, and viewport controls." }
],
codeSnippet: `<!DOCTYPE html>\n<html>\n<body>\n <h1>Hello HTML</h1>\n</body>\n</html>`
},
{
id: "css",
name: "CSS",
category: "Frontend & Web",
icon: "fa-brands fa-css3-alt",
desc: "Cascading Style Sheets - controls styling, layout, typography, and responsive presentation of web pages.",
githubPath: "CSS",
syllabus: [
{ title: "01 Fundamentals & Box Model", desc: "Select selectors, CSS rules, margin, padding, border, and width." },
{ title: "02 Positioning & Displays", desc: "Block vs inline elements, absolute/relative position, and float clearances." },
{ title: "03 Flexbox & CSS Grid", desc: "Configuring container items, alignment axes, grid templates, and gaps." },
{ title: "04 Media Queries", desc: "Building responsive grids for mobile, tablet, and desktop monitors." },
{ title: "05 Keyframe Animations", desc: "Creating smooth page transitions, hover glow effects, and micro-interactions." }
],
codeSnippet: `.card {\n background: rgba(255, 255, 255, 0.1);\n backdrop-filter: blur(10px);\n border: 1px solid var(--border);\n}`
},
{
id: "react",
name: "React",
category: "Frontend & Web",
icon: "fa-brands fa-react",
desc: "Component-based declarative UI library for rendering modular dynamic web views.",
githubPath: "React",
syllabus: [
{ title: "01 Fundamentals & JSX", desc: "Virtual DOM concept, npm/Vite builds, component trees, and JSX formats." },
{ title: "02 Props & Dynamic States", desc: "Passing variables to components, rendering states, and handling click events." },
{ title: "03 First Program", desc: "Coding a basic counter component with increment/decrement hooks." },
{ title: "04 Lifecycle & useEffect", desc: "Fetching API data on component mounts and cleaning up listener hooks." },
{ title: "05 State Management", desc: "Sharing variables using Context API or external state libraries." }
],
codeSnippet: `import React, { useState } from 'react';\nexport default function App() {\n const [val, setVal] = useState(0);\n return <button onClick={() => setVal(val+1)}>{val}</button>;\n}`
},
{
id: "nodejs",
name: "Node.js",
category: "Frontend & Web",
icon: "fa-brands fa-node-js",
desc: "Chrome's V8 JavaScript engine runtime environment for executing JS code outside the web browser.",
githubPath: "Node.js",
syllabus: [
{ title: "01 Fundamentals & Event Loop", desc: "Non-blocking I/O concepts, packages (npm), package.json, and require/import rules." },
{ title: "02 Basic Modules (fs/path)", desc: "Reading and writing files asynchronously, joining paths, and getting directories." },
{ title: "03 First Program", desc: "Running a console file and outputting basic environmental variables." },
{ title: "04 Basic Programs", desc: "Creating a simple HTTP node server that serves raw text." },
{ title: "05 Package Integrations", desc: "Managing external libraries, env files, and script runner blocks." }
],
codeSnippet: `const fs = require('fs');\nfs.writeFile('log.txt', 'Node log', (err) => {\n if (!err) console.log("Logged");\n});`
},
{
id: "express",
name: "Express",
category: "Frontend & Web",
icon: "fa-solid fa-network-wired",
desc: "Minimalist server web application framework for Node.js backends and API endpoints.",
githubPath: "Express",
syllabus: [
{ title: "01 Fundamentals & Route Basics", desc: "Setting up express applications, basic port listeners, and router objects." },
{ title: "02 HTTP Methods & Requests", desc: "GET/POST requests, reading headers, query parameters, and JSON payloads." },
{ title: "03 First Program", desc: "Coding an Express app returning JSON payloads on API paths." },
{ title: "04 Middleware Handlers", desc: "Parsing bodies, validating authentication, and managing CORS configurations." },
{ title: "05 Error Catching", desc: "Implementing centralized global error catches and custom handlers." }
],
codeSnippet: `const express = require('express');\nconst app = express();\napp.get('/', (req, res) => res.json({ status: "OK" }));\napp.listen(3000);`
},
// Computer Science Core
{
id: "algorithms",
name: "Algorithms",
category: "Computer Science",
icon: "fa-solid fa-brain",
desc: "Core computational patterns, optimization mechanisms, sorting networks, and complexity analyses.",
githubPath: "Algorithms",
syllabus: [
{ title: "01 Search & Sorts", desc: "Binary searches, QuickSort, MergeSort execution steps." },
{ title: "02 Recursion Patterns", desc: "Base cases, call stack frames, and recursive tree branches." },
{ title: "03 Dynamic Programming", desc: "Memoization patterns, tabulation matrices, and greedy algorithms." },
{ title: "04 Graph Traversals", desc: "Breadth-First Search (BFS) and Depth-First Search (DFS) algorithms." },
{ title: "05 Big-O Complexity", desc: "Calculating time and space complexities using Big-O notations." }
]
},
{
id: "datastructures",
name: "Data Structures",
category: "Computer Science",
icon: "fa-solid fa-sitemap",
desc: "Structures for organizing data efficiently in memory, including trees, graphs, lists, and arrays.",
githubPath: "Data-Structures",
syllabus: [
{ title: "01 Linear Structures", desc: "Array lists, linked list implementations, stacks, and queues." },
{ title: "02 Hash Map Tables", desc: "Hash functions, key-value mappings, and collision handling." },
{ title: "03 Tree Structures", desc: "Binary search trees (BST), node traversals, and self-balancing trees." },
{ title: "04 Graph representations", desc: "Representing nodes and edges using adjacency lists and matrices." },
{ title: "05 Memory Allocation Map", desc: "Comparing stack memory allocation vs heap allocation." }
]
},
{
id: "sql",
name: "SQL",
category: "Computer Science",
icon: "fa-solid fa-database",
desc: "Structured Query Language - standard interface for relational database queries and schemas.",
githubPath: "SQL",
syllabus: [
{ title: "01 Relational Concepts", desc: "Tables, rows, primary keys, foreign keys, and database normalization." },
{ title: "02 Basic Queries", desc: "SELECT statements, WHERE filters, ORDER BY sorting, and LIMIT constraints." },
{ title: "03 First Program (Basic DB)", desc: "Writing scripts to create tables and insert sample records." },
{ title: "04 SQL Join Statements", desc: "Combining data across tables using INNER JOIN, LEFT JOIN, and RIGHT JOIN." },
{ title: "05 Grouping & Aggregations", desc: "Grouping records using GROUP BY and aggregates like COUNT, SUM, AVG." }
],
codeSnippet: `SELECT u.name, count(a.id)\nFROM users u\nINNER JOIN accounts a ON u.id = a.user_id\nGROUP BY u.name;`
},
{
id: "apis",
name: "APIs",
category: "Computer Science",
icon: "fa-solid fa-route",
desc: "Application Programming Interfaces - protocols for transferring data between client and server architectures.",
githubPath: "APIs",
syllabus: [
{ title: "01 REST Principles", desc: "Client-server separation, stateless requests, HTTP methods, and status codes." },
{ title: "02 JSON Serialization", desc: "Encoding and decoding payload bodies in standard JSON formats." },
{ title: "03 Authentication Models", desc: "Managing secure handshakes using API Keys, Basic Auth, and JWT tokens." }
]
},
{
id: "graphql",
name: "GraphQL",
category: "Computer Science",
icon: "fa-solid fa-network-wired",
desc: "Modern API query language and schema definitions for loading exact data matches dynamically.",
githubPath: "GraphQL",
syllabus: [
{ title: "01 Schema Declarations", desc: "Defining Types, queries, mutations, and sub-scalars." },
{ title: "02 Resolvers & Queries", desc: "Writing functions that populate target schemas based on parameters." },
{ title: "03 Performance (N+1 Problem)", desc: "Resolving performance issues using database loaders." }
]
},
{
id: "operatingsystems",
name: "Operating Systems",
category: "Computer Science",
icon: "fa-solid fa-window-maximize",
desc: "Kernel models, CPU scheduling algorithms, virtual memory paging, and system integrations.",
githubPath: "Operating-Systems",
syllabus: [
{ title: "01 Kernel Architectures", desc: "Monolithic kernels vs Microkernels, bootloaders, and system initialization." },
{ title: "02 Context Switches", desc: "Switching CPU core registers when shifting thread execution paths." },
{ title: "03 Memory Paging Map", desc: "Translating virtual addresses to physical pages via page tables." },
{ title: "04 Process Schedulers", desc: "Multitasking algorithms (Round Robin, Priority, Multilevel queues)." },
{ title: "05 Virtual File Systems", desc: "Operating file nodes, block drivers, and directory structures." }
]
},
{
id: "rtos",
name: "RTOS",
category: "Computer Science",
icon: "fa-solid fa-stopwatch",
desc: "Real-time operating systems designing deterministic task schedules for embedded devices.",
githubPath: "RTOS",
syllabus: [
{ title: "01 Real-Time Scheduling", desc: "Preemptive scheduling models and rate-monotonic timing constraints." },
{ title: "02 Task Priorities", desc: "Creating tasks, setting priorities, stack sizes, and context loops." },
{ title: "03 Semaphores & Mutexes", desc: "Synchronizing tasks and locking access to shared hardware." },
{ title: "04 Priority Inversion", desc: "Handling priority inversions and solving them using priority inheritance." },
{ title: "05 Message Queues", desc: "Passing structured messages safely between real-time tasks." }
]
},
// Tooling & Infrastructure
{
id: "gitgithub",
name: "Git & GitHub",
category: "Tooling & Infra",
icon: "fa-brands fa-git-alt",
desc: "Version control practices, branch management, and repository setup.",
githubPath: "Git-GitHub",
syllabus: [
{ title: "01 Version Control Basics", desc: "Initializing repositories, status tracking, staging, and committing files." },
{ title: "02 Branch Management", desc: "Creating branches, merging, rebasing, and resolving conflicts." },
{ title: "03 First Commit Flow", desc: "Staging all files, writing clean commit messages, and pushing upstream." },
{ title: "04 Collaboration & PRs", desc: "Forking repositories, sending pull requests, and code reviews." },
{ title: "05 Interactive Rebasing", desc: "Rewriting history, squashing, and splitting old commits." }
],
codeSnippet: `git init\ngit add .\ngit commit -m "feat: initialize workspace"\ngit branch -M main\ngit push -u origin main`
},
{
id: "devops",
name: "DevOps",
category: "Tooling & Infra",
icon: "fa-solid fa-infinity",
desc: "Continuous Integration/Continuous Deployment (CI/CD) pipelines, infrastructure as code, and system automations.",
githubPath: "DevOps",
syllabus: [
{ title: "01 CI/CD Workflows", desc: "Automating testing, linting, and cloud deployments on push." }
]
},
{
id: "docker",
name: "Docker",
category: "Tooling & Infra",
icon: "fa-brands fa-docker",
desc: "Containerization platforms for packing applications and their dependencies into self-contained runtime environments.",
githubPath: "Docker",
syllabus: [
{ title: "01 Container Engine", desc: "Images, containers, network bridges, and volumes." },
{ title: "02 Dockerfile Designs", desc: "Multi-stage builds to optimize image footprints safely." }
]
},
{
id: "cloudcomputing",
name: "Cloud Computing",
category: "Tooling & Infra",
icon: "fa-solid fa-cloud",
desc: "Virtual hosting, storage networks, Serverless pipelines, and Identity Access Management (IAM).",
githubPath: "Cloud-Computing",
syllabus: [
{ title: "01 Cloud Principles", desc: "Virtual machines, cloud storage buckets, load balancers, and regions." },
{ title: "02 Serverless Functions", desc: "Deploying code fragments executing dynamically on API triggers." },
{ title: "03 Infrastructure as Code", desc: "Declaring infrastructure configurations in scripts (e.g. Terraform)." }
]
},
{
id: "cybersecurity",
name: "Cybersecurity",
category: "Tooling & Infra",
icon: "fa-solid fa-user-shield",
desc: "Threat mitigations, vulnerability reviews, authentication layers, and network defenses.",
githubPath: "Cybersecurity",
syllabus: [
{ title: "01 XSS Injections", desc: "Detecting and resolving script injection hazards on servers." },
{ title: "02 SQLi Attacks", desc: "Remediating input manipulation using parameterized queries." }
],
codeSnippet: `import html\n\ndef secure_handler(query_param: str) -> str:\n # HTML escape prevents XSS execution\n sanitized_input = html.escape(query_param)\n return f"<p>Results: {sanitized_input}</p>"`
},
{
id: "shellscripting",
name: "Shell Scripting",
category: "Tooling & Infra",
icon: "fa-solid fa-rectangle-list",
desc: "Automating server operations using command line interfaces (Bash, PowerShell, Zsh).",
githubPath: "Shell-Scripting",
syllabus: [
{ title: "01 Bash Basics", desc: "Input redirection, pipelines, loops, and script execution flags." }
]
},
{
id: "webservers",
name: "Web Servers",
category: "Tooling & Infra",
icon: "fa-solid fa-server",
desc: "Server configurations, reverse proxies, load balancing, and SSL/TLS redirections.",
githubPath: "Web-Servers",
syllabus: [
{ title: "01 Nginx Configurations", desc: "Defining server blocks, setting up reverse proxy headers, and rate limiting." }
]
},
// Hardware & Intelligent Systems
{
id: "ai",
name: "AI",
category: "Hardware & AI",
icon: "fa-solid fa-robot",
desc: "Artificial Intelligence principles, state search spaces, knowledge bases, and expert rules systems.",
githubPath: "AI",
syllabus: [
{ title: "01 Expert Rules Systems", desc: "Declaring if-then rules bases, inference engines, and facts validation." },
{ title: "02 Path Search spaces", desc: "Implementing graph search algorithms like BFS, DFS, and A* Star." }
]
},
{
id: "machinelearning",
name: "Machine Learning",
category: "Hardware & AI",
icon: "fa-solid fa-network-wired",
desc: "Supervised and unsupervised models, neural networks, datasets, and regression pipelines.",
githubPath: "Machine-Learning",
syllabus: [
{ title: "01 Linear Regression", desc: "Creating linear predictions mapping input features." }
]
},
{
id: "iot",
name: "Internet of Things",
category: "Hardware & AI",
icon: "fa-solid fa-microchip",
desc: "Prototyping microcontroller environments, reading analog/digital sensors, and forwarding telemetry packets.",
githubPath: "IoT",
syllabus: [
{ title: "01 Microcontrollers", desc: "Pin maps, analog/digital registers, SPI/I2C/UART wiring loops." },
{ title: "02 Telemetry Protocols", desc: "Publishing sensor logs using MQTT QoS brokers and HTTP REST endpoints." }
],
codeSnippet: `StaticJsonDocument<256> doc;\nDeserializationError err = deserializeJson(doc, payload);\nif (!err) {\n float temp = doc["temp"];\n Serial.println(temp);\n}`
},
// Device Platforms
{
id: "desktopdev",
name: "Desktop Development",
category: "Device Platforms",
icon: "fa-solid fa-display",
desc: "PC desktop software development for Windows (.NET/WPF), macOS (Cocoa/Swift), and Linux (Qt).",
githubPath: "Desktop-Development",
syllabus: [
{ title: "01 Windows WPF / WinUI", desc: "Declaring layouts in XAML, binding code variables, and building app views." },
{ title: "02 macOS Cocoa Views", desc: "Coding native macOS applications using Apple's UIKit and Swift layouts." },
{ title: "03 Cross-Platform Tauri", desc: "Packaging web applications inside native Rust shell wrappers." }
]
},
{
id: "mobiledev",
name: "Mobile Development",
category: "Device Platforms",
icon: "fa-solid fa-mobile-button",
desc: "Creating applications for iOS and Android platforms.",
githubPath: "Mobile-Development",
syllabus: [
{ title: "01 Native Android Lifecycle", desc: "Managing Android Activities, intent triggers, and background services." },
{ title: "02 Native iOS view loops", desc: "Handling Apple view hierarchies, app delegate listeners, and states." },
{ title: "03 Cross-Platform Flutter", desc: "Writing Dart widgets to build UI elements compiled natively." }
]
},
{
id: "wearables",
name: "Wearables",
category: "Device Platforms",
icon: "fa-solid fa-stopwatch-20",
desc: "Creating software for smartwatch platforms (Wear OS, watchOS) and constrained devices.",
githubPath: "Wearables",
syllabus: [
{ title: "01 Smartwatch layouts", desc: "Designing circular layouts, rotary inputs, and ambient watch faces." },
{ title: "02 Power Optimizations", desc: "Managing battery constraints by throttling sensor polls and telemetry payloads." }
]
},
{
id: "smarttv",
name: "Smart TV",
category: "Device Platforms",
icon: "fa-solid fa-tv",
desc: "Large screen applications development for Android TV, Tizen, and webOS.",
githubPath: "SmartTV-Development",
syllabus: [
{ title: "01 10-Foot UI Standard", desc: "Sizing text elements and layouts for readability from 10 feet away." },
{ title: "02 Remote D-Pad Navigation", desc: "Handling focus loops for remote control directional buttons." }
]
}
];
// 2. DOM Elements
const sidebarNav = document.getElementById('sidebarNav');
const contentBody = document.getElementById('contentBody');
const searchInput = document.getElementById('searchInput');
const activeBreadcrumb = document.getElementById('activeBreadcrumb');
const menuToggleBtn = document.getElementById('menuToggleBtn');
const sidebar = document.getElementById('sidebar');
const closeSidebarBtn = document.getElementById('closeSidebarBtn');
const themeToggleBtn = document.getElementById('themeToggleBtn');
// 3. Theme Toggle State Management
function initTheme() {
const savedTheme = localStorage.getItem('theme') || 'dark';
if (savedTheme === 'light') {
document.body.classList.add('light-mode');
themeToggleBtn.innerHTML = '<i class="fa-solid fa-sun"></i>';
} else {
document.body.classList.remove('light-mode');
themeToggleBtn.innerHTML = '<i class="fa-solid fa-moon"></i>';
}
}
themeToggleBtn.addEventListener('click', () => {
const isLight = document.body.classList.toggle('light-mode');
if (isLight) {
localStorage.setItem('theme', 'light');
themeToggleBtn.innerHTML = '<i class="fa-solid fa-sun"></i>';
} else {
localStorage.setItem('theme', 'dark');
themeToggleBtn.innerHTML = '<i class="fa-solid fa-moon"></i>';
}
});
// 4. Render Navigation
function renderNav(filterText = '') {
sidebarNav.innerHTML = '';
// Add static Overview link at the top
const homeSection = document.createElement('div');
homeSection.className = 'nav-section';
const homeList = document.createElement('ul');
homeList.className = 'nav-list';
const homeItem = document.createElement('li');
homeItem.className = `nav-item ${activeTopicId === null ? 'active' : ''}`;
const homeLink = document.createElement('a');
homeLink.className = 'nav-link';
homeLink.innerHTML = `<i class="fa-solid fa-house"></i> <span>Overview</span>`;
homeLink.addEventListener('click', () => {
renderLanding();
});
homeItem.appendChild(homeLink);
homeList.appendChild(homeItem);
homeSection.appendChild(homeList);
sidebarNav.appendChild(homeSection);
// Group topics by category
const categories = {};
const filtered = topicsData.filter(topic =>
topic.name.toLowerCase().includes(filterText.toLowerCase()) ||
topic.category.toLowerCase().includes(filterText.toLowerCase())
);
filtered.forEach(topic => {
if (!categories[topic.category]) {
categories[topic.category] = [];
}
categories[topic.category].push(topic);
});
for (const [catName, topics] of Object.entries(categories)) {
const section = document.createElement('div');
section.className = 'nav-section';
const title = document.createElement('div');
title.className = 'nav-section-title';
title.textContent = catName;
section.appendChild(title);
const list = document.createElement('ul');
list.className = 'nav-list';
topics.forEach(topic => {
const item = document.createElement('li');
item.className = `nav-item ${topic.id === activeTopicId ? 'active' : ''}`;
const link = document.createElement('a');
link.className = 'nav-link';
link.innerHTML = `<i class="${topic.icon}"></i> <span>${topic.name}</span>`;
link.addEventListener('click', () => selectTopic(topic.id));
item.appendChild(link);
list.appendChild(item);
});
section.appendChild(list);
sidebarNav.appendChild(section);
}
}
// 5. Select Topic
let activeTopicId = null;
function selectTopic(id) {
activeTopicId = id;
const topic = topicsData.find(t => t.id === id);
if (topic) {
activeBreadcrumb.textContent = topic.name;
renderTopicDetails(topic);
// Find and highlight links
renderNav(searchInput.value);
}
// Close sidebar on mobile devices
sidebar.classList.remove('open');
}
// 6. Render Topic Details
function renderTopicDetails(topic) {
let syllabusHTML = '';
if (topic.syllabus && topic.syllabus.length > 0) {
syllabusHTML = `
<div class="syllabus-section">
<h3 class="section-title"><i class="fa-solid fa-list-check"></i> Table of Contents (TOC)</h3>
<div class="timeline">
${topic.syllabus.map((item, idx) => `
<div class="timeline-item" id="chapter-${idx}">
<div class="timeline-content-wrapper">
<h4 class="timeline-title">${idx + 1}. ${item.title}</h4>
<p class="timeline-desc">${item.desc}</p>
<button class="load-notes-btn" onclick="toggleChapterNotes('${topic.id}', ${idx})">
<i class="fa-solid fa-book-open"></i> Read Study Notes
</button>
</div>
<div class="chapter-accordion" id="accordion-${idx}">
<div class="markdown-body" id="notes-content-${idx}">
<div style="display:flex; align-items:center; gap:8px; color:var(--text-muted);">
<i class="fa-solid fa-spinner fa-spin"></i> Loading notes...
</div>
</div>
</div>
</div>
`).join('')}
</div>
</div>
`;
}
let codeHTML = '';
if (topic.codeSnippet) {
codeHTML = `
<div class="code-panel">
<div class="code-header">
<span class="code-title"><i class="fa-solid fa-code"></i> Code Verification Snippet</span>
</div>
<pre class="code-body">${topic.codeSnippet}</pre>
</div>
`;
}
contentBody.innerHTML = `
<div class="topic-card">
<div class="topic-header">
<div class="topic-info-main">
<div class="topic-logo"><i class="${topic.icon}"></i></div>
<div>
<span class="topic-category">${topic.category}</span>
<h2 class="topic-name">${topic.name}</h2>
</div>
</div>
<a href="https://github.com/ritshea/CodeLab/tree/master/${topic.githubPath}" target="_blank" class="btn btn-github">
<i class="fa-solid fa-arrow-up-right-from-square"></i> Open Folder
</a>
</div>
<p class="hero-desc" style="font-size: 16px; margin-bottom: 30px;">${topic.desc}</p>
${syllabusHTML}
${codeHTML}
</div>
`;
}
// Cache for storing fetched and parsed chapter notes
const loadedNotesCache = {};
async function toggleChapterNotes(topicId, index) {
const accordion = document.getElementById(`accordion-${index}`);
const notesContent = document.getElementById(`notes-content-${index}`);
const itemContainer = document.getElementById(`chapter-${index}`);
const button = itemContainer.querySelector('.load-notes-btn');
// Toggle accordion state
if (accordion.classList.contains('open')) {
accordion.classList.remove('open');
button.innerHTML = `<i class="fa-solid fa-book-open"></i> Read Study Notes`;
return;
}
// Open accordion
accordion.classList.add('open');
button.innerHTML = `<i class="fa-solid fa-chevron-up"></i> Hide Notes`;
const cacheKey = `${topicId}-${index}`;
if (loadedNotesCache[cacheKey]) {
notesContent.innerHTML = loadedNotesCache[cacheKey];
return;
}
const topic = topicsData.find(t => t.id === topicId);
const chapter = topic.syllabus[index];
// Dynamic Path Derivation
let chapterPath = chapter.path;
if (!chapterPath) {
const titleClean = chapter.title.toLowerCase();
if (titleClean.includes('basics') || titleClean.includes('fundamental') || titleClean.includes('setup') || titleClean.includes('syntax') || titleClean.includes('first')) {
chapterPath = `${topic.githubPath}/Basics/README.md`;
} else if (titleClean.includes('advanced') || titleClean.includes('oop') || titleClean.includes('class')) {
chapterPath = `${topic.githubPath}/Advanced/README.md`;
} else if (titleClean.includes('intermediate')) {
chapterPath = `${topic.githubPath}/Intermediate/README.md`;
} else {
chapterPath = `${topic.githubPath}/README.md`;
}
}
try {
// Fetch target file
let response = await fetch(chapterPath);
if (!response.ok) {
// Fallback to parent directory README
response = await fetch(`${topic.githubPath}/README.md`);
}
if (!response.ok) {
throw new Error("Notes file not found");
}
const markdown = await response.text();
const htmlContent = marked.parse(markdown);
loadedNotesCache[cacheKey] = htmlContent;
notesContent.innerHTML = htmlContent;
} catch (err) {
// Ultimate fallback layout
const placeholderHTML = `
<div style="border-left: 4px solid var(--primary); padding-left:14px; margin: 4px 0;">
<h4 style="margin: 0 0 8px 0; color:var(--primary); font-weight:700;"><i class="fa-solid fa-graduation-cap"></i> ${chapter.title} Notes</h4>
<p style="margin-bottom:12px;">${chapter.desc}</p>
<h5 style="margin:12px 0 6px 0; font-weight:700; color:var(--text-primary);">🎯 Core Study Areas</h5>
<ul style="padding-left:20px; margin-bottom:12px;">
<li><strong>Fundamentals & Setup</strong>: Explore runtime configuration, compiler paths, package variables, and core execution layers.</li>
<li><strong>Syntax Patterns</strong>: Practice variables declaration, logic flows, iterations, and control branches.</li>
<li><strong>Standard Execution</strong>: Compile and debug first programs logging parameters.</li>
</ul>
<div class="code-panel" style="margin-top:14px; background:#06070d; border:1px solid var(--card-border);">
<div class="code-header" style="background: rgba(255,255,255,0.02); padding: 8px 12px; border-bottom:1px solid var(--card-border);">
<span style="font-size:12px; color:var(--text-muted);"><i class="fa-solid fa-code"></i> Reference Snippet</span>
</div>
<pre style="margin:0; padding:12px; font-family:var(--font-mono); font-size:13px; color:#e2e8f0; overflow-x:auto;">${topic.codeSnippet || '// Execute program and test configurations'}</pre>
</div>
</div>
`;
loadedNotesCache[cacheKey] = placeholderHTML;
notesContent.innerHTML = placeholderHTML;
}
}
// 7. Render Landing View
function renderLanding() {
activeBreadcrumb.textContent = "Overview";
activeTopicId = null;
contentBody.innerHTML = `
<div class="hero-card">
<h1 class="hero-title">Welcome to <span>CodeLab</span></h1>
<p class="hero-desc">An interactive portfolio cataloging solved courses, system architectures, and learning syllabus pathways covering world-class programming languages and hardware networks.</p>
<a href="https://github.com/ritshea/CodeLab" target="_blank" class="btn btn-github">
<i class="fa-brands fa-github"></i> Star on GitHub
</a>
</div>
<div class="dashboard-stats">
<div class="stat-card">
<div class="stat-icon"><i class="fa-solid fa-code"></i></div>
<div>
<div class="stat-value">25+</div>
<div class="stat-label">Programming Languages</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon"><i class="fa-solid fa-microchip"></i></div>
<div>
<div class="stat-value">18</div>
<div class="stat-label">IoT Submodules</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon"><i class="fa-solid fa-user-shield"></i></div>
<div>
<div class="stat-value">100%</div>
<div class="stat-label">Exercises Solved</div>
</div>
</div>
</div>
<h3 style="margin-bottom: 20px; font-weight: 700;">Featured Learning Pathways</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;">
<div class="stat-card" style="cursor: pointer;" onclick="selectTopic('python')">
<div class="stat-icon" style="color: var(--primary);"><i class="fa-brands fa-python"></i></div>
<div>
<h4 style="font-weight: 700;">Python Full Course</h4>
<p style="font-size: 13px; color: var(--text-secondary);">Comprehensively solved exercises covering OOP, libraries, and JSON databases.</p>
</div>
</div>
<div class="stat-card" style="cursor: pointer;" onclick="selectTopic('iot')">
<div class="stat-icon" style="color: var(--accent);"><i class="fa-solid fa-microchip"></i></div>
<div>
<h4 style="font-weight: 700;">Internet of Things</h4>
<p style="font-size: 13px; color: var(--text-secondary);">Prototyping local board connections and parsing server telemetry.</p>
</div>