Skip to content
/Rail Academy
Web AppWeb

Rail Academy

Railway-Themed Interactive Learning Platform

Internal
Users
8+
Screens
React.jsViteReact RouterCSS3SVG AnimationJavaScript

About the Project

Rail Academy is a railway-themed React + Vite web application built with a strong focus on visual identity, performance, and interactivity. The centrepiece is a custom RailwayScrollbar component — a fixed decorative sidebar that tracks scroll progress across all routes, moving an animated train along a track in proportion to how far the user has scrolled.

The train itself went through multiple visual iterations: starting as a flat 2D isometric SVG, then upgraded to a fully 3D polygon-rendered locomotive with proper top, right-side, and bottom faces, elliptical wheel shadows, and CSS drop shadows for depth. A final revision replaced the programmatic SVG with a static imported SVG image for simplified rendering without sacrificing visual quality.

Scroll behaviour is handled via a custom scroll direction detection hook that flips the train vertically when the user scrolls upward — giving a realistic sense of bidirectional movement with a smooth CSS transition to avoid abrupt snapping.

The layout is structured around a shared React Router layout that wraps all pages, persisting the scrollbar and navbar across routes. The navbar features hide-on-scroll-down / show-on-scroll-up behaviour, a frosted-glass background, and absolutely centred navigation links. A ScrollToTop button fades in after 300px of scroll.

Performance is optimised through lazy-loaded page sections, memoized components (RotatingDice), code-split routing, and a Vite build pipeline. The UI theme uses a vibrant navy and cyan palette with consistent hex casing, responsive breakpoints down to 360px, and landscape phone orientation support.

Key Highlights

Custom animated railway scrollbar — train moves in sync with scroll progress across all routes
3D polygon-rendered SVG locomotive with depth faces, wheel shadows, and CSS drop shadows
Scroll direction detection flips train on upward scroll for realistic bidirectional movement
Hide-on-scroll-down / show-on-scroll-up navbar with frosted-glass backdrop filter
Shared React Router layout persists scrollbar and navbar across all SPA routes
Lazy-loaded sections and memoized components for optimised render performance
Fully responsive down to 360px with landscape phone and small-screen breakpoints
ScrollToTop component with smooth scroll and fade-in after 300px

Technical Breakdown

Feature areas & implementation details

Architecture & Routing
React Router SPA with shared layout wrapping all pages — scrollbar and navbar persist across routes
404 not-found page for unmatched routes with proper UX fallback
Lazy-loaded page sections using React.lazy and Suspense for faster initial load
Vite build pipeline with code splitting for sub-second load times
Railway Scrollbar
Fixed decorative sidebar tracking full-page scroll percentage across all routes
Train position calculated from scroll progress — stops before Download section to avoid overlap
Scroll direction detection hook flips train sprite vertically on upward scroll
CSS transition smooths the flip animation, avoiding abrupt visual snap
Track and container widths tuned for decorative footprint without layout interference
Hidden on very small screens to prevent layout glitches
Train SVG Iterations
v1: Programmatic 2D isometric SVG locomotive and compartments built in JSX
v2: Full 3D polygon faces (top, right, bottom) with recalibrated wheel positions and elliptical drop shadows
v3: Static imported SVG image replacing programmatic SVG — simplified rendering, same visual quality
CSS drop shadows updated each iteration to reinforce 3D illusion with depth and directional side-light
Navbar & UI Polish
Hide-on-scroll-down / show-on-scroll-up behaviour for less obtrusive reading experience
Frosted-glass semi-transparent background with backdrop-filter blur
Absolutely centred navigation links maintaining visual balance as actions are added either side
Logo image in footer replacing icon-based brand mark, aligned with navbar branding
Global color palette refined to lighter, more vibrant navy and cyan tones
Responsiveness & Performance
Breakpoints covering 360px, landscape phones, tablets, and desktop
Horizontal overflow fix via hidden overflow on layout wrapper preventing scroll on small screens
Left padding offsets in hero and footer prevent content overlap with fixed railway scrollbar
overflow-y: clip and preserveAspectRatio=none on scrollbar SVG to stretch without clipping
Memoized RotatingDice component and consistent SectionCard styling for render efficiency

Other Projects

View All →
Arkmantra
Ayurvedic Cosmetics E-Commerce Storefront & Admin

A highly hardened, full-featured D2C storefront and admin control panel designed...

Soul33 – The Beacon
Spirituality, Meditation & Mindfulness Platform

A cross-platform spiritual wellness app live on iOS & Android with Free, Seeker ...

Yoke Yoga
Social Wellness, Live Yoga & Learning Platform

Production yoga social platform — TikTok-style Reels, ZEGOCLOUD live streaming +...