A timeline based on https://tlb.betteroff.studio/. The following is a summary of its contents and behaviour.
- Cinematic Horizontal Timeline - Smooth scrolling archive of visual memories
- Premium Typography - Bold editorial design with mix-blend-mode color inversion
- Physics-Based Scrolling - Lenis smooth scroll with momentum and inertia
- Interactive Sound Effects - High-quality audio feedback with Howler.js
- Video Support - Autoplay/pause video cards with viewport detection
- Music Player - Fully functional audio playback with Howler.js
- Sticky Notes - Draggable notes with paper textures, deletion animations, and optional realtime sync across users
- Timeline Ruler - Synced date ruler with animated tick sounds
- Responsive Design - Optimized for desktop, tablet, and mobile
- Accessibility - WCAG AA compliant with keyboard navigation
- Performance - 60fps animations, lazy loading, optimized images
- Node.js 18+ and npm/pnpm/yarn
- Modern browser (Chrome, Firefox, Safari, Edge)
-
Clone and navigate to the project:
-
Install dependencies:
npm install-
Add sound effects (optional): See SOUND_SETUP.md for detailed instructions on adding high-quality sound files.
-
Run the development server:
npm run dev-
Open your browser: Navigate to http://localhost:3000
-
Validate timeline media mappings (recommended):
npm run validate:timelinenpm run build
npm starthiromix/
โโโ src/
โ โโโ app/
โ โ โโโ layout.tsx # Root layout with fonts and metadata
โ โ โโโ page.tsx # Homepage with all components
โ โ โโโ globals.css # Global styles and Tailwind
โ โโโ components/
โ โ โโโ Navigation.tsx # Top navigation menu
โ โ โโโ HeroHeader.tsx # Fixed central header with inversion
โ โ โโโ TimelineCarousel.tsx # Main horizontal carousel
โ โ โโโ TimelineCard.tsx # Image card component
โ โ โโโ VideoCard.tsx # Video card with autoplay
โ โ โโโ TimelineRuler.tsx # Bottom timeline ruler
โ โ โโโ MusicPlayer.tsx # Music widget with Howler.js
โ โ โโโ QueueDropdown.tsx # Expandable music queue
โ โโโ data/
โ โ โโโ timeline.ts # Timeline items mock data
โ โ โโโ music.ts # Music tracks mock data
โ โโโ types/
โ โ โโโ index.ts # TypeScript interfaces
โ โโโ lib/
โ โโโ utils.ts # Utility functions
โโโ public/ # Static assets
โโโ next.config.mjs # Next.js configuration
โโโ tailwind.config.ts # Tailwind theme customization
โโโ tsconfig.json # TypeScript configuration
โโโ package.json # Dependencies and scripts
- Framework: Next.js 14+ (App Router)
- Language: TypeScript 5+
- Styling: Tailwind CSS 3+
- Animation: Framer Motion 12+
- Smooth Scroll: Lenis 1.0+
- Audio: Howler.js 2.2+
- Images: Unsplash API (via Next.js Image)
- Icons: Lucide React
๐ See CONTENT_GUIDE.md for complete instructions on adding your images and videos!
The timeline automatically positions content based on dates and adjusts spacing dynamically:
- Expands when photos are sparse (more space between items)
- Contracts to minimum spacing when photos are dense
- Date-based positioning ensures chronological accuracy
Quick Start:
- Create folders:
public/media/images/andpublic/media/videos/ - Add your media files
- Edit
src/data/timeline.tswith your content and dates
Timeline Items:
{
id: "unique-id",
title: "Project Title",
date: "2024-06-15T00:00:00.000Z", // ISO 8601 format required
type: "image" | "video",
src: "/media/images/photo.jpg",
width: "portrait" | "square" | "landscape",
category: "Category Name",
videoSrc: "/media/videos/clip.mp4" // for video type
}Music Tracks:
{
id: "unique-id",
title: "Song Title",
artist: "Artist Name",
album: "Album Name",
albumArt: "cover-art-url",
audioSrc: "audio-file-url",
duration: 263 // in seconds
}Edit tailwind.config.ts to modify:
- Colors (currently monochrome)
- Typography scale
- Animation timing
- Breakpoints
Edit the header text in src/components/HeroHeader.tsx:
<span>YOUR BRANDยฎ</span>
<span>YOUR TAGLINE</span>
<span>(YEAR)</span>The homepage now includes a loading screen on every full page load/reload with:
- A pond background image
- A centered loading GIF
- A time-based percentage counter (default ~3 seconds)
- Place your assets in:
public/assets/loading/pond-background.jpgpublic/assets/loading/loading.gif
- Edit settings in
src/lib/loadingScreenConfig.ts:durationMs(loading length)pondBackgroundSrcandloadingGifSrc(asset paths)heading(loading label text)
- Load behavior:
- The loader replays each time the website is reloaded.
The website includes interactive sound effects:
- Timeline Ticks - Mechanical clicks as you scroll through time (velocity-based)
- Paper Sounds - Realistic foley for note interactions (pickup, place, crumple, fall)
- Sound Controls - Toggle and volume control in bottom-right corner
Sound files need to be added separately. See SOUND_SETUP.md for:
- Required sound files and formats
- Free sources (Freesound, Zapsplat, BBC)
- Conversion instructions
- Audio specifications
The sound system works gracefully without audio files - it will display console warnings but won't break functionality.
Tab- Navigate through interactive elementsArrow Keys- Scroll timeline (when focused)Space/Enter- Activate buttonsEsc- Close dropdowns
- Lazy Loading - Images and videos load on demand
- Code Splitting - Dynamic imports for optimal bundles
- GPU Acceleration - Transform-based animations
- Responsive Images - WebP/AVIF with Next.js Image
- Reduced Motion - Respects user preferences
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Push to GitHub
- Import project in Vercel
- Deploy automatically
- Add
NEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEYfor shared realtime sticky notes
Build the static export:
npm run buildDeploy the .next folder to your hosting provider.
Create a .env.local file for custom configuration:
# Optional: Custom Unsplash API key for higher rate limits
NEXT_PUBLIC_UNSPLASH_ACCESS_KEY=your_key_here
# Optional: Supabase realtime sticky notes
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Optional: feature flag (default true)
NEXT_PUBLIC_STICKY_NOTES_REALTIME=trueTo share sticky note changes instantly between multiple visitors, configure Supabase:
- Create a Supabase project.
- Run
supabase/sticky_notes_schema.sqlin the Supabase SQL editor. - Copy your project URL and anon key into
.env.local(and Vercel env vars). - Redeploy your site on Vercel.
When Supabase vars are not configured (or when NEXT_PUBLIC_STICKY_NOTES_REALTIME=false), sticky notes automatically fall back to localStorage-only behavior.
- Design Inspiration: Museum archives, editorial design, luxury fashion websites
- Images: Unsplash API
- Sample Audio: SoundHelix (royalty-free)
This project is for portfolio/educational use. Replace all placeholder content with your own before production deployment.
Built with โค๏ธ using Next.js, TypeScript, and Framer Motion