http://localhost:3000/explore-experts
- Search by name, category, or skill
- Filter by category
- Click expert card to view detailed profile
- Each profile shows: bio, skills, reviews, ratings
http://localhost:3000/explore-experts/1 (or 2, 3, 4)
- View full expert information
- See past reviews with ratings
- Check availability and response time
- Click "Book Session" button to start booking
http://localhost:3000/ui-demo/fund-session
- Click "Open Funding Modal" button
- Step 1: Select duration (30/60/90 min or custom)
- Step 2: Confirm amount and transaction details
- Step 3: See success state with session ID
http://localhost:3000/ui-demo/video-call
- Click "Enter Full Screen Video Demo"
- Test mute/video toggle buttons
- Toggle between full-screen and picture-in-picture
- See call duration timer
http://localhost:3000/ui-demo/transactions
- View session history table
- Click transaction hash links (opens Stellar.Expert)
- Copy hash to clipboard with button
- See network badges (Testnet/Mainnet)
http://localhost:3000/session/1 (or 2, 3, 4)
- Live video call interface
- Toggle between full-screen and PIP modes
- End call button redirects to dashboard
import FundSessionModal from '@/components/marketplace/FundSessionModal';
import { useState } from 'react';
import { useRouter } from 'next/navigation';
export default function BookingPage() {
const [isOpen, setIsOpen] = useState(false);
const router = useRouter();
const handleSuccess = (sessionId: string) => {
// Navigate to active session
router.push(`/session/${sessionId}`);
};
return (
<>
<button onClick={() => setIsOpen(true)}>
Start Session
</button>
<FundSessionModal
expertName="Sarah Chen"
expertHourlyRate="$50/hr"
isOpen={isOpen}
onClose={() => setIsOpen(false)}
onSuccess={handleSuccess}
/>
</>
);
}import VideoCall from '@/components/session/VideoCall';
import { useState } from 'react';
export default function SessionPage() {
const [isPIP, setIsPIP] = useState(false);
return (
<VideoCall
expertName="Alex Kumar"
seekerName="You"
expertAvatar="/assets/Avatar.svg"
seekerAvatar="/assets/Avatar.svg"
isPictureInPicture={isPIP}
onTogglePIP={() => setIsPIP(!isPIP)}
onEndCall={() => {
// Handle call ending
console.log('Call ended');
}}
/>
);
}import {
formatExplorerUrl,
shortenHash,
copyHashToClipboard
} from '@/utils/explorer';
import { ExternalLink, Copy } from 'lucide-react';
// Format URL for Stellar.Expert
const url = formatExplorerUrl(transactionHash, 'testnet');
// → https://testnet.stellar.expert/tx/a123456789...
// Shorten hash for display
const short = shortenHash(transactionHash);
// → a1234567...0abcd
// Copy to clipboard
<button onClick={() => copyHashToClipboard(hash)}>
<Copy size={16} />
</button>import SessionHistory from '@/components/dashboard/SessionHistory';
export default function DashboardPage() {
return (
<div className="max-w-4xl mx-auto p-8">
<SessionHistory />
</div>
);
}interface FundSessionModalProps {
expertName: string; // e.g., "Sarah Chen"
expertHourlyRate: string; // e.g., "$50/hr"
isOpen: boolean; // Modal visibility
onClose: () => void; // Close handler
onSuccess?: (sessionId: string) => void; // Success callback
}interface VideoCallProps {
expertName: string; // Expert's name
seekerName: string; // Seeker's name (usually "You")
expertAvatar?: string; // Expert's avatar URL
seekerAvatar?: string; // Seeker's avatar URL
onEndCall?: () => void; // End call handler
isPictureInPicture?: boolean; // PIP mode toggle
onTogglePIP?: () => void; // PIP toggle handler
}interface ExpertDetailsProps {
expert: Expert; // Expert object
onBookClick?: () => void; // Book button handler
}{
id: '1',
name: 'Sarah Chen',
avatar: '/assets/Avatar.svg',
category: 'Web Development',
rating: 4.8,
reviews: 127,
hourlyRate: '$50/hr',
availability: true,
bio: 'Senior Full-Stack Developer...',
skills: ['React', 'Next.js', 'Node.js', ...],
responseTime: '< 1 hour',
totalSessions: 342,
walletAddress: 'GBRPYHIL2CI27JTLZM3XYDNOH5Q5JQRQGCFBBZLT3JE5VPWLJ7JQWWZ',
pastReviews: [
{
id: '1',
reviewer: 'John Doe',
rating: 5,
comment: 'Excellent mentor!',
date: '2025-06-01'
}
]
}{
id: '2',
title: 'Blockchain Fundamentals',
expertName: 'Alex Kumar',
expertId: '2',
expertAvatar: '/assets/Avatar.svg',
seekerName: 'You',
seekerAvatar: '/assets/Avatar.svg',
date: '2025-06-10',
time: '10:30 AM',
duration: '90 mins',
status: 'active',
price: '$75',
category: 'Blockchain',
network: 'testnet',
transactionHash: 'b234567890abcdef...'
}{
id: '2',
hash: 'b234567890abcdef1234567890abcdef1234567890abcdef1234567890abce',
type: 'settlement',
amount: '75 XLM',
date: '2025-06-05',
status: 'completed',
network: 'testnet',
sessionId: '3'
}npm install simple-peer
# or
npm install peerjsThen replace placeholder video elements with actual WebRTC streams.
npm install @stellar/freighter-apiUpdate FundSessionModal to:
- Request public key from Freighter
- Sign transactions
- Submit to blockchain
- Update mock session creation to call contract
- Fetch real expert data from on-chain registry
- Stream real transaction hashes from ledger
- Replace mock data with API calls
- Store expert profiles in database
- Track sessions and transactions
- Add user login/signup
- Connect to Freighter for wallet auth
- Store user sessions
| File | Purpose |
|---|---|
src/utils/explorer.ts |
Stellar.Expert URL formatting |
src/types/types.ts |
TypeScript interfaces |
src/data/mock-data.ts |
Mock experts, sessions, transactions |
src/components/profile/ExpertDetails.tsx |
Expert profile display |
src/components/marketplace/ExpertCard.tsx |
Expert listing card |
src/components/marketplace/FundSessionModal.tsx |
Funding wizard |
src/components/session/VideoCall.tsx |
Video call interface |
src/components/dashboard/SessionHistory.tsx |
Transaction history |
import { mockExperts, mockSessions, mockTransactions } from '@/utils/data/mock-data';
console.log(mockExperts);import { formatExplorerUrl } from '@/utils/explorer';
const url = formatExplorerUrl('a123...', 'testnet');
window.open(url); // Opens Stellar.Expert// In session page
console.log('Session ID:', params.id);
console.log('Session found:', session);
console.log('Expert found:', expert);All components use Tailwind CSS and support theming. To customize:
-
Colors: Change gradient colors in component className
// From purple-600/pink-600 to your colors className="from-blue-600 to-cyan-600"
-
Sizing: Adjust responsive breakpoints
// md: (768px), lg: (1024px), etc. className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
-
Typography: Use custom font sizes
// text-xs, text-sm, text-base, text-lg, text-xl, etc. className="text-2xl font-bold"
| Component | Status | Notes |
|---|---|---|
| ExpertDetails | ✅ Complete | Ready for production |
| ExpertCard | ✅ Complete | Ready for production |
| FundSessionModal | ✅ Complete | Needs wallet integration |
| VideoCall | ✅ Complete | Needs WebRTC library |
| SessionHistory | ✅ Complete | Works with mock data |
| Explorer Utils | ✅ Complete | Ready for blockchain data |
All features are ready for testing and integration with real backend services!