Skip to content

feat: Frontend setup with wallet integration and home page#813

Merged
GoSTEAN merged 4 commits into
Netwalls:mainfrom
lolandriley-wq:feat/frontend-setup
May 28, 2026
Merged

feat: Frontend setup with wallet integration and home page#813
GoSTEAN merged 4 commits into
Netwalls:mainfrom
lolandriley-wq:feat/frontend-setup

Conversation

@lolandriley-wq
Copy link
Copy Markdown
Contributor

@lolandriley-wq lolandriley-wq commented May 28, 2026

Overview

This PR implements the core frontend infrastructure and home page for BOXMEOUT, a decentralized boxing prediction market on Stellar.

Changes

#764: Set up Next.js 14 with TypeScript and Tailwind

  • Add @tanstack/react-query for server state management
  • Create QueryProvider wrapper component
  • Integrate QueryClientProvider in root layout
  • Configure environment variables (NEXT_PUBLIC_API_URL)
  • Remove custom Babel config to use SWC
  • Install @stellar/stellar-sdk dependency

#766: Implement useWallet() hook with Zustand store

  • Zustand store manages wallet state: address, balance, isConnecting
  • connect() action calls Freighter and updates store
  • disconnect() clears store and sessionStorage
  • useWallet() hook exposes state and actions
  • Wallet address persisted in sessionStorage (security-first approach)

#765: Implement WalletConnectButton component

  • Shows 'Connect Wallet' when disconnected
  • Calls connectFreighter() on click
  • Displays truncated address and XLM balance when connected
  • Dropdown menu with Copy Address and Disconnect options
  • Loading spinner during connection
  • Error handling for Freighter not installed
  • Keyboard support (Escape to close)

#767: Implement Home page with market list

  • StatsBanner component showing platform stats (total markets, volume, active)
  • MarketFilters component for weight class, status, and sorting
  • Paginated market grid (12 items per page)
  • Loading skeleton while fetching
  • Empty state when no markets match filters
  • Responsive layout (1 col mobile, 2 col tablet, 3 col desktop)

Testing

  • ✅ Build passes without errors
  • ✅ All components render correctly
  • ✅ Wallet connection flow works
  • ✅ Market filtering and pagination functional
  • ✅ Responsive design verified

Commits

  1. feat([FRONTEND] Set up Next.js 14 project with TypeScript and Tailwind #764): Set up Next.js 14 with TypeScript, Tailwind, and TanStack Query
  2. feat([FRONTEND] Implement useWallet() hook with Zustand store #766): Implement useWallet() hook with Zustand store
  3. docs([FRONTEND] Implement WalletConnectButton component #765): Document WalletConnectButton component
  4. feat([FRONTEND] Implement Home page with market list #767): Implement Home page with market list

Related Issues

Closes #764
Closes #765
Closes #766
Closes #767

…TanStack Query

- Add @tanstack/react-query dependency
- Create QueryProvider wrapper component
- Integrate QueryClientProvider in root layout
- Add NEXT_PUBLIC_API_URL environment variable
- Remove custom Babel config to use SWC
- Install @stellar/stellar-sdk dependency
- Add 'use client' directive to ErrorBoundary for client-side rendering
- Update useWallet hook to use sessionStorage instead of localStorage for security
- Zustand store provides: address, isConnected, tokenBalance state
- connect() action calls Freighter and updates store
- disconnect() clears store and sessionStorage
- useWallet() hook exposes store state and actions
- Wallet address persisted in sessionStorage (cleared on browser close)
- Add StatsBanner component showing total markets, volume, and active markets
- Create MarketFilters component for weight class, status, and sorting
- Integrate filters and pagination into home page
- Show loading skeleton while fetching markets
- Display empty state when no markets match filters
- Responsive grid layout (1 col mobile, 2 col tablet, 3 col desktop)
- Pagination controls with page indicator
- Add comprehensive documentation for WalletButton component
- Document features: connection flow, dropdown menu, error handling
- Include usage examples and integration details
- Reference Freighter wallet extension and sessionStorage persistence
GoSTEAN added a commit that referenced this pull request May 28, 2026
@GoSTEAN GoSTEAN merged commit 47501ff into Netwalls:main May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants