Overview
The@hyperscape/website package is the official marketing website for Hyperscape, featuring a modern landing page with 3D effects, responsive design, and the $GOLD token page.
Tech Stack:
- Next.js 15: React framework with static export
- React 19: UI framework
- Three.js: 3D rendering and effects
- React Three Fiber: Declarative Three.js
- Tailwind CSS 4: Utility-first styling
- Framer Motion: Animations
- GSAP: Advanced animations
- Lenis: Smooth scrolling
Package Structure
Development
Commands
Port Allocation
The website runs on port 3334 to avoid conflicts with the game client (3333) and other services.
Configuration
Next.js Config
Location:packages/website/next.config.ts
Environment Variables
Location:packages/website/.env.example
.env.example to .env.local and fill in values.
Pages
Landing Page (/)
Components:
- Header - Navigation with logo and links
- Hero - Main hero section with logo, tagline, and CTA
- Features - Feature cards with icons
- CTA - Call-to-action banner
- Footer - Links and social media
- Background - Gradient background with image overlay
- Responsive layout (mobile, tablet, desktop)
- Staggered animations with Framer Motion
- Smooth scrolling with Lenis
- Dark fantasy theme with gold accents
$GOLD Token Page (/gold)
Components:
- GoldToken - Complete token page with scroll design
- Two-column hero - Token image and description
- Token details - Contract address with copy-to-clipboard
- Features - Token utility and benefits
- How it works - Token mechanics
- CTA - Call-to-action with banner
- 1 $GOLD = 1 gold in-game
- Be the richest player at launch
- Exclusive items for top holders
Styling
Theme Configuration
Location:packages/website/src/app/globals.css
Custom CSS variables for consistent theming:
Utility Classes
Responsive Container Padding
Components
Background
Location:packages/website/src/components/Background.tsx
Reusable background with gradient overlay:
- Fixed positioning (stays in place during scroll)
- Horizontal gradient with dark center, gold-tinted edges
- Customizable background image
- Adjustable opacity
Hero
Location:packages/website/src/components/Hero/Hero.tsx
Landing page hero section:
Features:
- Responsive layout (stacks on mobile)
- Logo with glow effect
- Tagline with gradient text
- CTA button with hover effects
- Staggered animations (logo → tagline → button)
Features
Location:packages/website/src/components/Features/Features.tsx
Feature cards section:
Features:
- Grid layout (1 column mobile, 2 columns desktop)
- Icon + title + description
- Hover effects
- Responsive sizing
CTA
Location:packages/website/src/components/CTA/CTA.tsx
Call-to-action section:
Features:
- Banner background image
- Gradient overlay
- Centered text and button
- Responsive padding
GoldToken
Location:packages/website/src/components/GoldToken/GoldToken.tsx
Complete $GOLD token page:
Sections:
- Two-column hero (token image + description)
- Token details with contract address
- Features grid
- How it works
- CTA section
- Scroll-style design
- Copy-to-clipboard for contract address
- Responsive layout
- Gold theme throughout
Fonts
Font Configuration
Location:packages/website/src/lib/fonts.ts
- Cinzel: Display font for headings
- Rubik: Body font for content
SEO & Metadata
Root Layout Metadata
Location:packages/website/src/app/layout.tsx
Page-Specific Metadata
Deployment
Static Export
The website builds to a static site for deployment:- HTML files for each page
- Optimized CSS and JavaScript
- Static assets (images, fonts)
- No server-side rendering required
Deployment Targets
Compatible with:- Vercel (recommended)
- Netlify
- Cloudflare Pages
- GitHub Pages
- Any static hosting
Dependencies
Core Dependencies
Dev Dependencies
Performance Optimizations
Image Optimization
Images are unoptimized for static export:- Pre-optimizing images with Sharp
- Using WebP format
- Responsive image sizes
GPU Detection
Location: Usesdetect-gpu package
Reduced Motion
Respects user preferences:Accessibility
Features
- Semantic HTML structure
- ARIA labels on interactive elements
- Keyboard navigation support
- Focus visible states
- Reduced motion support
- High contrast text (WCAG AA compliant)
Color Contrast
All text meets WCAG AA standards:- Primary text:
#f5f0e8on#0a0a0c(17.8:1) - Secondary text:
#c4b896on#0a0a0c(10.2:1) - Muted text:
#7d7460on#0a0a0c(4.8:1)
Customization
Adding a New Page
- Create page file in
src/app/:
- Add link to Header component
Customizing Theme
Edit CSS variables insrc/app/globals.css:
Assets
Images
Location:packages/website/public/images/
Fonts
Location:packages/website/public/fonts/
rubik.woff2- Body font (self-hosted for performance)
Build Output
Static Export
Bundle Size
Optimized for performance:- Tailwind CSS purged (only used classes)
- Three.js tree-shaken
- Code splitting by route
- Static generation (no runtime overhead)
Integration with Monorepo
Workspace Configuration
Turbo Configuration
Troubleshooting
TypeScript Errors
Issue: R3F types conflict with Next.js Solution: Build errors are ignored in config. If you need strict type checking:Image Optimization
Issue: Images not optimized in static export Solution: Pre-optimize images before adding:Font Loading
Issue: FOUT (Flash of Unstyled Text) Solution: Fonts usedisplay: swap for better UX. Consider preloading:
Related Documentation
Package Overview
All packages in the monorepo
Development Setup
Local development workflow
Deployment
Production deployment guide