A curated interactive timeline and visual experience celebrating several major historical empires. The Maharajas presents elegantly animated storytelling with a focus on immersive visuals, typographic character, and modular UI components to render timelines, highlights, and details for each empire.
the Maharajas is a modern web application built with Vite and React that showcases historical empires through a combination of polished UI, animations, and carefully structured content. The project emphasizes interactive storytelling using parallax, motion, and 3D-friendly components.
Key highlights:
- Smooth scroll interactions and parallax effects
- Animations and motion using GSAP and Framer Motion
- A timeline UI to browse empires and a detail view for each
- Tailwind CSS-based styling with custom fonts and iconography
- Vite — super-fast build tooling and dev server
- React — UI library (JSX) with functional components
- Tailwind CSS — utility-first styling approach
- GSAP — advanced animations and parallax effects
- Framer Motion — interactive UI motion support
- Lenis — smooth scrolling utility
- React Three packages & postprocessing — 3D and postprocessing capability available (present in dependencies)
- Lucide React — icons
- Slugify — friendly URL slug generation
- Split Type — utilities for text splitting/animation
- ESLint — code linting
- Node.js / npm — development and build toolchain
Reference versions are taken from the project's
package.jsonand may evolve over time.
Prerequisites: Node.js (recommended 18.x or newer).
Windows (PowerShell) commands to setup and run:
# install dependencies
npm install
# start development server
npm run dev
# build bundle (generates `dist`)
npm run build
# preview the built app locally
npm run preview
# lint the codebase
npm run lintOpen your browser and go to the address shown (Vite typically runs on http://localhost:5173).
This is a concise overview of the most important source files and directories:
index.html— App entry point.src/main.jsx— React entry / router wrapper.src/App.jsx— Application routing and global features (Lenis, Navigation, Footer).src/pages— Page-level route components:Home,Empires,EmpireDetail,About.src/components— Reusable UI components (Navigation, Timeline, Badge, Logo, etc.).src/components/home— Home-specific components likeHero,Intro,FinalHomeandFooter.src/assets— Static data (example:empires.js) and other runtime assets.public— Static files served as-is: fonts, images, and other assets.vite.config.js— Vite configuration and plugins (React and Tailwind integration).eslint.config.js— ESLint configuration.
- Empire data:
src/assets/empires.jsincludes a dataset representing the empires and related metadata. Each record exposes fields such asid,name,date,thumbnail,images,highlighted,short_desc,long_desc,capital, andnotable_rulers. - The timeline and detail routes read that dataset and render appropriate UI components.
Tip: Add a new empire entry in src/assets/empires.js to have it automatically show up in the UI list.
- The app uses Tailwind CSS for styling. Styles are located in
src/index.csswith utility classes spread across components. - Custom fonts and icon-related assets are placed under
public/fontsandpublicrespectively. - Images, thumbnails, and hero graphics are served from the
publicdirectory and referenced using absolute paths in components (e.g.,/king.png).
- Parallax and dynamic motion: GSAP is used in pages like
Empiresand in parts of the UI for smooth, performant parallax effects. - Motion UI: Framer Motion enables animations during route transitions and interactive states.
- Scroll behavior: Lenis improves the smoothness and responsiveness of scrolling throughout the app.
Routing is handled via react-router.
/— Home/about— About page/empires— Empires timeline and interactive view/empires/:empire— Empire detail page (dynamic path based onidfrom dataset)
Want to add a new empire or a new section?
- Add a new object to
src/assets/empires.jswith a uniqueid. - Add associated images to the
publicdirectory and reference them via theimagesorthumbnailfields. - The
TimelineandEmpirescomponents will pick up the new entry automatically (no additional route changes required).
For a new page or feature:
- Create a new component/page under
src/pagesorsrc/components. - Add a new route in
src/App.jsxif needed. - Keep the styling consistent by using Tailwind utilities or existing component classes.
- Use the
devscript to run the Vite dev server for fast iteration. - Keep components modular; pages render smaller components so the UI is easier to test and reuse.
- Ensure accessibility by using alt attributes in
imgtags and semantic HTML when possible.
- If modules fail to resolve, run
npm installagain and confirm Node.js is a suitable version. - If Tailwind styles are not applied, verify that
index.cssimports Tailwind directives and that the Vite plugin for Tailwind is configured invite.config.js. - For runtime console issues, check that assets referenced in
publicexist at the specified paths.
- Fonts and assets included in
publicare credited where applicable — the project references several visual and typeface resources for stylistic choices. - The repository relies on many excellent open-source libraries which have been cited in
package.json.