Infrastructure
SYSTEMS

Shared Systems

Optimization/ (all files)

10 shared systems powering every desktop page — background animations, navbar with autohide, PWA service-worker, real-time GitHub sync, offline manager, update notifier, and custom scrollbar.

সব desktop page-এর পেছনে এই 10টি shared system কাজ করে। `Optimization/` folder-এ সব file থাকে — একবার বুঝলে পুরো site বোঝা সহজ।

background-system.css desktop-navbar.css service-worker.js realtime-github-sync.js update-notifier.js global-scrollbar.css navbar-autohide.js offline-content-manager.js pwa-init.js fullscreen-init.js
Optimization/
BG System
Navbar
PWA / SW
GitHub Sync
Notifier
Scrollbar
Autohide
Offline Mgr
Fullscreen
System 01

Background Animation System

The animated backdrop used on every single desktop page — layered CSS geometric shapes, radial gradient orbs, and a canvas-based particle system producing the signature dark-red atmosphere.

সব page-এ একই background system। CSS geometric shapes, gradient orb, আর canvas particle — সব একসাথে কাজ করে।

Two-wrapper structure
bg-system-containerbg-system-content wraps all page body content
Guide background
.guide-bg + .scan-line adds the moving grid scan-line over the background
CSS file
Optimization/Background/background-system.css — included on every desktop page via <link>
Canvas particles
Floating red-tinted dots generated by background-system.js — respects reduced-motion media query
Background/ folder structure
Optimization/Background/
background-system.css CSS
background-system.js JS
Optimization/navbar/
desktop-navbar.css CSS
desktop-navbar.html
Optimization/ (root)
navbar-autohide.js JS
global-scrollbar.css CSS
styles.css CSS
service-worker.js JS
manifest.json JSON
System 02

Desktop Navbar & Autohide

The fixed top navigation bar used on all desktop pages — 85px height, smooth autohide on scroll-down, reappears on scroll-up. Contains logo image, nav links, and CV download button.

Scroll করলে navbar hide হয়, উপরে scroll করলে আবার আসে। Height 85px — সব page-এ একই behavior।

Class + ID
class="desktop-navbar" + id="desktopNavbar" — required for autohide JS to target
Autohide logic
navbar-autohide.js listens to scroll events — hides on scroll-down > 80px, shows on scroll-up
85px offset rule
All sticky elements use top: 85px (guide.css: body { padding-top: 85px }) to clear the navbar
CV download button
Last nav item has class desktop-nav-cv-btn — red accent styling with download attribute
Navbar autohide states
System 03

PWA & Service Worker

The Progressive Web App layer — 5-tier cache strategy, offline support, install prompt, and automatic update notification when a new version is deployed.

Site PWA হিসেবে install করা যায়। 5 ধরনের cache, offline support, update notification — সব service-worker.js-এ defined।

5-tier cache
Pre-cache (install), Network-first (API), Cache-first (assets), Stale-while-revalidate (HTML), Offline fallback
Install prompt
pwa-install-prompt.js intercepts beforeinstallprompt, shows custom banner on desktop Chrome/Edge
Update notifier
update-notifier.js polls for new version.json, shows toast on new deploy with "Reload" CTA
Offline content manager
offline-content-manager.js caches selected PDFs/videos for offline access on next visit
5-tier cache strategy
Cache NameStrategyUsed For
pre-cachePre-cacheCore assets at install
network-firstNetwork FirstJSON data files
cache-firstCache FirstImages, fonts, CSS
swr-cacheStale-While-RevalidateHTML pages
offline-fallbackOfflineFallback page
System 04

Real-time GitHub Sync

Pulls live version data from GitHub API to compare against the local `version.json` — drives the update notifier and tracks deployment state without needing a backend.

GitHub থেকে live version check করে। নতুন version deploy হলে update-notifier.js toast দেখায়। কোনো backend দরকার নেই।

GitHub API fetch
realtime-github-sync.js fetches the raw version.json from the public GitHub repo
Version comparison
Compares local.version vs remote.version — triggers update toast if mismatch
Polling interval
Checks every 5 minutes via setInterval — debounced to avoid rate limiting
Sync flow
1
Page loads → realtime-github-sync.js starts
2
Fetch version.json from GitHub raw URL
3
Compare remote.version vs localStorage value
4
If mismatch → update-notifier.js fires toast
5
User clicks "Reload" → Service Worker clears cache + hard refresh
All 10 Shared Systems
#FileTypePurposeUsed In
01Background/background-system.cssCSSAnimated background: grid, orbs, particles, scan-lineAll pages
02navbar/desktop-navbar.cssCSSTop navbar styles — logo, links, CV button, active stateAll pages
03navbar-autohide.jsJSHides navbar on scroll-down >80px, shows on scroll-upAll pages
04global-scrollbar.cssCSSRed-on-black 6px webkit scrollbar with rounded thumbAll pages
05service-worker.jsSW5-tier PWA cache strategy — offline fallbackAll pages via PWA
06pwa-init.jsJSRegisters service worker on load, handles SW lifecycleAll pages
07pwa-install-prompt.jsJSIntercepts beforeinstallprompt, shows custom install bannerHome, About
08realtime-github-sync.jsJSPolls GitHub API for version.json, detects new deploysAll pages
09update-notifier.jsJSShows update toast + "Reload" CTA on new version detectedAll pages
10fullscreen-init.jsJSFirst-click fullscreen trigger — session-persist, nav-exclusionAll pages