2025-12-05 17:21:55 +01:00
|
|
|
import { Link, useNavigate } from 'react-router-dom';
|
|
|
|
|
import { Video, Users, Zap, Shield, Camera, MessageCircle, Star, LogOut, LayoutDashboard } from 'lucide-react';
|
|
|
|
|
import { useAuth } from '../contexts/AuthContext';
|
2025-11-15 16:36:55 +01:00
|
|
|
|
|
|
|
|
const HomePage = () => {
|
2025-12-05 17:21:55 +01:00
|
|
|
const { user, logout } = useAuth();
|
|
|
|
|
const navigate = useNavigate();
|
|
|
|
|
|
|
|
|
|
const handleLogout = () => {
|
|
|
|
|
logout();
|
|
|
|
|
navigate('/login');
|
|
|
|
|
};
|
|
|
|
|
|
2025-11-15 16:36:55 +01:00
|
|
|
return (
|
|
|
|
|
<div className="min-h-screen bg-white">
|
|
|
|
|
{/* Hero Section */}
|
|
|
|
|
<header className="bg-gradient-to-br from-primary-600 to-primary-800">
|
|
|
|
|
<nav className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
|
|
|
|
|
<div className="flex justify-between items-center">
|
|
|
|
|
<div className="flex items-center space-x-2">
|
2025-12-05 18:42:52 +01:00
|
|
|
<Video className="w-6 h-6 sm:w-8 sm:h-8 text-white" />
|
|
|
|
|
<span className="text-xl sm:text-2xl font-bold text-white">spotlight.cam</span>
|
2025-11-15 16:36:55 +01:00
|
|
|
</div>
|
2025-12-05 18:42:52 +01:00
|
|
|
<div className="flex space-x-2 sm:space-x-4">
|
2025-12-05 17:21:55 +01:00
|
|
|
{user ? (
|
|
|
|
|
<>
|
|
|
|
|
<Link
|
|
|
|
|
to="/dashboard"
|
2025-12-05 18:42:52 +01:00
|
|
|
className="flex items-center space-x-1 sm:space-x-2 px-2 sm:px-4 py-2 text-white hover:text-primary-100 transition text-sm sm:text-base"
|
2025-12-05 17:21:55 +01:00
|
|
|
>
|
|
|
|
|
<LayoutDashboard className="w-4 h-4" />
|
2025-12-05 18:42:52 +01:00
|
|
|
<span className="hidden sm:inline">Dashboard</span>
|
2025-12-05 17:21:55 +01:00
|
|
|
</Link>
|
|
|
|
|
<button
|
|
|
|
|
onClick={handleLogout}
|
2025-12-05 18:42:52 +01:00
|
|
|
className="flex items-center space-x-1 sm:space-x-2 px-3 sm:px-6 py-2 bg-white text-primary-600 rounded-lg font-medium hover:bg-primary-50 transition text-sm sm:text-base"
|
2025-12-05 17:21:55 +01:00
|
|
|
>
|
|
|
|
|
<LogOut className="w-4 h-4" />
|
|
|
|
|
<span>Logout</span>
|
|
|
|
|
</button>
|
|
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
<>
|
|
|
|
|
<Link
|
|
|
|
|
to="/login"
|
2025-12-05 18:42:52 +01:00
|
|
|
className="px-3 sm:px-4 py-2 text-white hover:text-primary-100 transition text-sm sm:text-base"
|
2025-12-05 17:21:55 +01:00
|
|
|
>
|
|
|
|
|
Sign in
|
|
|
|
|
</Link>
|
|
|
|
|
<Link
|
|
|
|
|
to="/register"
|
2025-12-05 18:42:52 +01:00
|
|
|
className="px-4 sm:px-6 py-2 bg-white text-primary-600 rounded-lg font-medium hover:bg-primary-50 transition text-sm sm:text-base whitespace-nowrap"
|
2025-12-05 17:21:55 +01:00
|
|
|
>
|
|
|
|
|
Get Started
|
|
|
|
|
</Link>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
2025-11-15 16:36:55 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
|
2025-12-05 18:42:52 +01:00
|
|
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 sm:py-16 md:py-20 text-center">
|
|
|
|
|
<h1 className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-white mb-4 sm:mb-6">
|
2025-12-06 16:53:10 +01:00
|
|
|
Capture Every Dance Together
|
2025-11-15 16:36:55 +01:00
|
|
|
</h1>
|
2025-12-05 18:42:52 +01:00
|
|
|
<p className="text-base sm:text-lg md:text-xl lg:text-2xl text-primary-100 mb-8 sm:mb-10 max-w-3xl mx-auto px-4">
|
2025-12-06 16:53:10 +01:00
|
|
|
Connect with other competitors, record each other's dances, and exchange videos in seconds.
|
2025-11-15 16:36:55 +01:00
|
|
|
</p>
|
2025-12-05 17:21:55 +01:00
|
|
|
<div className="flex justify-center">
|
2025-11-15 16:36:55 +01:00
|
|
|
<Link
|
2025-12-05 17:21:55 +01:00
|
|
|
to={user ? "/dashboard" : "/register"}
|
2025-12-05 18:42:52 +01:00
|
|
|
className="px-6 sm:px-8 py-3 sm:py-4 bg-white text-primary-600 rounded-lg text-base sm:text-lg font-semibold hover:bg-primary-50 transition shadow-lg"
|
2025-11-15 16:36:55 +01:00
|
|
|
>
|
2025-12-05 17:21:55 +01:00
|
|
|
{user ? "Go to Dashboard" : "Start Collaborating"}
|
2025-11-15 16:36:55 +01:00
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
{/* Features Section */}
|
|
|
|
|
<section className="py-20 bg-gray-50">
|
|
|
|
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
|
|
|
<div className="text-center mb-16">
|
|
|
|
|
<h2 className="text-4xl font-bold text-gray-900 mb-4">
|
|
|
|
|
Everything you need to succeed
|
|
|
|
|
</h2>
|
|
|
|
|
<p className="text-xl text-gray-600 max-w-2xl mx-auto">
|
2025-12-06 16:53:10 +01:00
|
|
|
This app is specifically built for West Coast Swing dancers and competition enthusiasts
|
2025-11-15 16:36:55 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="grid md:grid-cols-3 gap-8">
|
|
|
|
|
<div className="bg-white p-8 rounded-xl shadow-md hover:shadow-xl transition">
|
|
|
|
|
<div className="w-12 h-12 bg-primary-100 rounded-lg flex items-center justify-center mb-4">
|
2025-12-06 17:05:35 +01:00
|
|
|
<Users className="w-6 h-6 text-primary-600" />
|
2025-11-15 16:36:55 +01:00
|
|
|
</div>
|
|
|
|
|
<h3 className="text-xl font-semibold text-gray-900 mb-3">
|
2025-12-06 17:05:35 +01:00
|
|
|
Smart Matching
|
2025-11-15 16:36:55 +01:00
|
|
|
</h3>
|
|
|
|
|
<p className="text-gray-600">
|
2025-12-06 17:05:35 +01:00
|
|
|
Find the perfect collaboration partner based on division, role, and heat
|
|
|
|
|
assignments at your event.
|
2025-11-15 16:36:55 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="bg-white p-8 rounded-xl shadow-md hover:shadow-xl transition">
|
|
|
|
|
<div className="w-12 h-12 bg-primary-100 rounded-lg flex items-center justify-center mb-4">
|
2025-12-06 17:05:35 +01:00
|
|
|
<MessageCircle className="w-6 h-6 text-primary-600" />
|
2025-11-15 16:36:55 +01:00
|
|
|
</div>
|
|
|
|
|
<h3 className="text-xl font-semibold text-gray-900 mb-3">
|
2025-12-06 17:05:35 +01:00
|
|
|
Real-time Chat
|
2025-11-15 16:36:55 +01:00
|
|
|
</h3>
|
|
|
|
|
<p className="text-gray-600">
|
2025-12-06 17:05:35 +01:00
|
|
|
Communicate instantly with event participants and your collaboration
|
|
|
|
|
partners through integrated chat.
|
2025-11-15 16:36:55 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="bg-white p-8 rounded-xl shadow-md hover:shadow-xl transition">
|
|
|
|
|
<div className="w-12 h-12 bg-primary-100 rounded-lg flex items-center justify-center mb-4">
|
2025-12-06 17:05:35 +01:00
|
|
|
<Camera className="w-6 h-6 text-primary-600" />
|
2025-11-15 16:36:55 +01:00
|
|
|
</div>
|
|
|
|
|
<h3 className="text-xl font-semibold text-gray-900 mb-3">
|
2025-12-06 17:05:35 +01:00
|
|
|
P2P Video Sharing
|
2025-11-15 16:36:55 +01:00
|
|
|
</h3>
|
|
|
|
|
<p className="text-gray-600">
|
2025-12-06 17:05:35 +01:00
|
|
|
Share videos directly with your partners using secure peer-to-peer WebRTC
|
|
|
|
|
technology. Fast, private, and encrypted.
|
2025-11-15 16:36:55 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="bg-white p-8 rounded-xl shadow-md hover:shadow-xl transition">
|
|
|
|
|
<div className="w-12 h-12 bg-primary-100 rounded-lg flex items-center justify-center mb-4">
|
|
|
|
|
<Shield className="w-6 h-6 text-primary-600" />
|
|
|
|
|
</div>
|
|
|
|
|
<h3 className="text-xl font-semibold text-gray-900 mb-3">
|
|
|
|
|
Secure & Private
|
|
|
|
|
</h3>
|
|
|
|
|
<p className="text-gray-600">
|
2025-12-06 17:05:35 +01:00
|
|
|
Your video transfers run P2P with encryption in transit. Chats stay private to your
|
|
|
|
|
event room or match partner.
|
2025-11-15 16:36:55 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="bg-white p-8 rounded-xl shadow-md hover:shadow-xl transition">
|
|
|
|
|
<div className="w-12 h-12 bg-primary-100 rounded-lg flex items-center justify-center mb-4">
|
|
|
|
|
<Zap className="w-6 h-6 text-primary-600" />
|
|
|
|
|
</div>
|
|
|
|
|
<h3 className="text-xl font-semibold text-gray-900 mb-3">
|
|
|
|
|
Lightning Fast
|
|
|
|
|
</h3>
|
|
|
|
|
<p className="text-gray-600">
|
|
|
|
|
No upload delays or waiting. Direct peer-to-peer connections mean instant
|
|
|
|
|
video transfers, even for large files.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="bg-white p-8 rounded-xl shadow-md hover:shadow-xl transition">
|
|
|
|
|
<div className="w-12 h-12 bg-primary-100 rounded-lg flex items-center justify-center mb-4">
|
|
|
|
|
<Star className="w-6 h-6 text-primary-600" />
|
|
|
|
|
</div>
|
|
|
|
|
<h3 className="text-xl font-semibold text-gray-900 mb-3">
|
|
|
|
|
Competition Ready
|
|
|
|
|
</h3>
|
|
|
|
|
<p className="text-gray-600">
|
|
|
|
|
Integrated with WSDC events. Automatic heat tracking and partner
|
|
|
|
|
suggestions based on competition divisions.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{/* How It Works Section */}
|
|
|
|
|
<section className="py-20">
|
|
|
|
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
|
|
|
<div className="text-center mb-16">
|
|
|
|
|
<h2 className="text-4xl font-bold text-gray-900 mb-4">
|
|
|
|
|
How It Works
|
|
|
|
|
</h2>
|
|
|
|
|
<p className="text-xl text-gray-600">
|
|
|
|
|
Get started in three simple steps
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="grid md:grid-cols-3 gap-12">
|
|
|
|
|
<div className="text-center">
|
|
|
|
|
<div className="w-16 h-16 bg-primary-600 text-white rounded-full flex items-center justify-center text-2xl font-bold mx-auto mb-6">
|
|
|
|
|
1
|
|
|
|
|
</div>
|
|
|
|
|
<h3 className="text-xl font-semibold text-gray-900 mb-3">
|
2025-12-06 16:53:10 +01:00
|
|
|
Join your event
|
2025-11-15 16:36:55 +01:00
|
|
|
</h3>
|
|
|
|
|
<p className="text-gray-600">
|
|
|
|
|
Check in to your West Coast Swing competition using the event's QR code
|
|
|
|
|
or check-in link.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="text-center">
|
|
|
|
|
<div className="w-16 h-16 bg-primary-600 text-white rounded-full flex items-center justify-center text-2xl font-bold mx-auto mb-6">
|
|
|
|
|
2
|
|
|
|
|
</div>
|
|
|
|
|
<h3 className="text-xl font-semibold text-gray-900 mb-3">
|
|
|
|
|
Find Partners
|
|
|
|
|
</h3>
|
|
|
|
|
<p className="text-gray-600">
|
2025-12-06 16:53:10 +01:00
|
|
|
Browse other people on your event's chat and send collaboration requests to
|
|
|
|
|
potential recording partners.
|
2025-11-15 16:36:55 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="text-center">
|
|
|
|
|
<div className="w-16 h-16 bg-primary-600 text-white rounded-full flex items-center justify-center text-2xl font-bold mx-auto mb-6">
|
|
|
|
|
3
|
|
|
|
|
</div>
|
|
|
|
|
<h3 className="text-xl font-semibold text-gray-900 mb-3">
|
|
|
|
|
Share & Create
|
|
|
|
|
</h3>
|
|
|
|
|
<p className="text-gray-600">
|
2025-12-06 16:53:10 +01:00
|
|
|
Exchange videos securely, chat in real-time, and reward your recording partner with
|
|
|
|
|
a star-rating system.
|
2025-11-15 16:36:55 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{/* CTA Section */}
|
2025-12-05 17:21:55 +01:00
|
|
|
{!user && (
|
|
|
|
|
<section className="py-20 bg-gradient-to-br from-primary-600 to-primary-800">
|
|
|
|
|
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
|
|
|
|
|
<h2 className="text-4xl font-bold text-white mb-6">
|
2025-12-06 16:53:10 +01:00
|
|
|
Ready to maximize your competition experience?
|
2025-12-05 17:21:55 +01:00
|
|
|
</h2>
|
|
|
|
|
<p className="text-xl text-primary-100 mb-10">
|
2025-12-06 16:53:10 +01:00
|
|
|
Join dancers from around the world who are already participating in spotlight.cam
|
2025-12-05 17:21:55 +01:00
|
|
|
</p>
|
|
|
|
|
<Link
|
|
|
|
|
to="/register"
|
|
|
|
|
className="inline-block px-8 py-4 bg-white text-primary-600 rounded-lg text-lg font-semibold hover:bg-primary-50 transition shadow-lg"
|
|
|
|
|
>
|
|
|
|
|
Create Your Free Account
|
|
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
)}
|
2025-11-15 16:36:55 +01:00
|
|
|
|
|
|
|
|
{/* Footer */}
|
|
|
|
|
<footer className="bg-gray-900 text-gray-300 py-12">
|
|
|
|
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
|
|
|
<div className="grid md:grid-cols-4 gap-8">
|
|
|
|
|
<div>
|
|
|
|
|
<div className="flex items-center space-x-2 mb-4">
|
|
|
|
|
<Video className="w-6 h-6 text-primary-400" />
|
|
|
|
|
<span className="text-xl font-bold text-white">spotlight.cam</span>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="text-sm text-gray-400">
|
2025-12-06 17:08:08 +01:00
|
|
|
Built for West Coast Swing dancers who record and compete together.
|
2025-11-15 16:36:55 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<h3 className="text-white font-semibold mb-4">Product</h3>
|
|
|
|
|
<ul className="space-y-2 text-sm">
|
2025-12-05 18:33:25 +01:00
|
|
|
<li>
|
|
|
|
|
<Link to="/how-it-works" className="hover:text-primary-400 transition">
|
|
|
|
|
How It Works
|
|
|
|
|
</Link>
|
|
|
|
|
</li>
|
2025-11-15 16:36:55 +01:00
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
2025-12-05 17:21:55 +01:00
|
|
|
<h3 className="text-white font-semibold mb-4">Support</h3>
|
2025-11-15 16:36:55 +01:00
|
|
|
<ul className="space-y-2 text-sm">
|
2025-12-05 18:30:44 +01:00
|
|
|
<li>
|
|
|
|
|
<Link to="/about-us" className="hover:text-primary-400 transition">
|
|
|
|
|
About Us
|
|
|
|
|
</Link>
|
|
|
|
|
</li>
|
2025-11-15 16:36:55 +01:00
|
|
|
<li>
|
2025-12-05 17:21:55 +01:00
|
|
|
<Link to="/contact" className="hover:text-primary-400 transition">
|
|
|
|
|
Contact Us
|
|
|
|
|
</Link>
|
2025-11-15 16:36:55 +01:00
|
|
|
</li>
|
feat(beta): add beta testing features and privacy policy page
Implemented comprehensive beta testing system with tier badges and
reorganized environment configuration for better maintainability.
Beta Testing Features:
- Beta banner component with dismissible state (localStorage)
- Auto-assign SUPPORTER tier to new registrations (env controlled)
- TierBadge component with SUPPORTER/COMFORT tier display
- Badge shown in Navbar, ProfilePage, and PublicProfilePage
- Environment variables: VITE_BETA_MODE, BETA_AUTO_SUPPORTER
Environment Configuration Reorganization:
- Moved .env files from root to frontend/ and backend/ directories
- Created .env.{development,production}{,.example} structure
- Updated docker-compose.yml to use env_file for frontend
- All env vars properly namespaced and documented
Privacy Policy Implementation:
- New /privacy route with dedicated PrivacyPage component
- Comprehensive GDPR/RODO compliant privacy policy (privacy.html)
- Updated CookieConsent banner to link to /privacy
- Added Privacy Policy links to all footers (HomePage, PublicFooter)
- Removed privacy section from About Us page
HTML Content System:
- Replaced react-markdown dependency with simple HTML loader
- New HtmlContentPage component for rendering .html files
- Converted about-us.md and how-it-works.md to .html format
- Inline CSS support for full styling control
- Easier content editing without React knowledge
Backend Changes:
- Registration auto-assigns SUPPORTER tier when BETA_AUTO_SUPPORTER=true
- Added accountTier to auth middleware and user routes
- Updated public profile endpoint to include accountTier
Files:
- Added: frontend/.env.{development,production}{,.example}
- Added: backend/.env variables for BETA_AUTO_SUPPORTER
- Added: components/BetaBanner.jsx, TierBadge.jsx, HtmlContentPage.jsx
- Added: pages/PrivacyPage.jsx
- Added: public/content/{about-us,how-it-works,privacy}.html
- Modified: docker-compose.yml (env_file configuration)
- Modified: App.jsx (privacy route, beta banner)
- Modified: auth.js (auto SUPPORTER tier logic)
2025-12-06 11:50:28 +01:00
|
|
|
<li>
|
|
|
|
|
<Link to="/privacy" className="hover:text-primary-400 transition">
|
|
|
|
|
Privacy Policy
|
|
|
|
|
</Link>
|
|
|
|
|
</li>
|
2025-11-15 16:36:55 +01:00
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
2025-12-05 17:21:55 +01:00
|
|
|
<h3 className="text-white font-semibold mb-4">Account</h3>
|
2025-11-15 16:36:55 +01:00
|
|
|
<ul className="space-y-2 text-sm">
|
2025-12-05 17:21:55 +01:00
|
|
|
{user ? (
|
|
|
|
|
<>
|
|
|
|
|
<li>
|
|
|
|
|
<Link to="/dashboard" className="hover:text-primary-400 transition">
|
|
|
|
|
Dashboard
|
|
|
|
|
</Link>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<button onClick={handleLogout} className="hover:text-primary-400 transition text-left">
|
|
|
|
|
Logout
|
|
|
|
|
</button>
|
|
|
|
|
</li>
|
|
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
<>
|
|
|
|
|
<li>
|
|
|
|
|
<Link to="/login" className="hover:text-primary-400 transition">
|
|
|
|
|
Sign In
|
|
|
|
|
</Link>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Link to="/register" className="hover:text-primary-400 transition">
|
|
|
|
|
Register
|
|
|
|
|
</Link>
|
|
|
|
|
</li>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
2025-11-15 16:36:55 +01:00
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="border-t border-gray-800 mt-12 pt-8 text-center text-sm text-gray-400">
|
|
|
|
|
<p>© {new Date().getFullYear()} spotlight.cam. All rights reserved.</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</footer>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default HomePage;
|