This project has been converted from static HTML to Next.js 14 with TypeScript and SCSS, following the architecture patterns defined in agent.md.
The conversion includes:
β Completed:
- Next.js 14 project structure with App Router
- TypeScript configuration with path aliases
- SCSS variables and mixins system
- Custom React hooks (useScroll, useNavbar, useCursor, useReveal, useTournamentTabs, useButtonRipple)
- Reusable components (Header, Footer, Layout, BackToTop, CustomCursor)
- SEO configuration and metadata
- Data files for navigation, matches, news, benefits
- Root layout with global styles
- Home, Tournament, and Article page structures
- Sitemap and Robots.txt generation
- Security headers configuration
-
Install dependencies:
yarn install # or npm install -
Start the development server:
yarn dev # or npm run dev -
Open your browser: Navigate to http://localhost:3000
tournament-website/
βββ public/
β βββ assets/
β β βββ css/
β β βββ images/
β β βββ js/
β βββ favicon.svg
βββ src/
β βββ app/
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page
β β βββ robots.ts # Dynamic robots.txt
β β βββ sitemap.ts # Dynamic sitemap
β β βββ article/
β β β βββ page.tsx
β β βββ tournament/
β β βββ page.tsx
β βββ components/
β β βββ Header.tsx
β β βββ Header.scss
β β βββ Footer.tsx
β β βββ Footer.scss
β β βββ Layout.tsx
β β βββ BackToTop.tsx
β β βββ BackToTop.scss
β β βββ CustomCursor.tsx
β β βββ CustomCursor.scss
β β βββ sections/
β β βββ HeroSection.tsx
β β βββ HeroSection.scss
β βββ config/
β β βββ seo.ts # SEO configuration
β βββ data/
β β βββ navigation.ts
β β βββ matches.ts
β β βββ news.ts
β β βββ benefits.ts
β βββ hooks/
β β βββ useScroll.ts
β β βββ useNavbar.ts
β β βββ useCursor.ts
β β βββ useReveal.ts
β β βββ useTournamentTabs.ts
β β βββ useButtonRipple.ts
β βββ styles/
β β βββ globals.scss
β β βββ _variables.scss
β β βββ _mixins.scss
β βββ types/
β βββ index.ts
β βββ ion-icon.d.ts
βββ next.config.js
βββ tsconfig.json
βββ package.json
βββ .env.local
βββ README.md
All pages are server-rendered by default for optimal SEO and performance.
Full type safety throughout the application with custom types for all data structures.
- Variables: All colors, fonts, and sizes in
_variables.scss - Mixins: Responsive breakpoints and reusable patterns in
_mixins.scss - Component Scoping: Each component has its own SCSS file
useScroll: Tracks scroll position for header and back-to-top buttonuseNavbar: Manages mobile navigation stateuseCursor: Custom cursor effectsuseReveal: Scroll-based animationsuseTournamentTabs: Tournament bracket tab switchinguseButtonRipple: Button ripple hover effects
- Dynamic metadata for each page
- Automatic sitemap generation
- Robots.txt configuration
- Open Graph and Twitter Card support
- Semantic HTML structure
- Comprehensive security headers (CSP, HSTS, X-Frame-Options, etc.)
- No
X-Powered-Byheader - Secure cookie settings
You need to complete the remaining sections for the home page:
Join Section (src/components/sections/JoinSection.tsx):
- Form with validation using React Hook Form + Zod
- Benefits list
- Form submission handling
Upcoming Matches Section (src/components/sections/UpcomingSection.tsx):
- Match cards with team logos
- Date/time display
- Social media links
News Section (src/components/sections/NewsSection.tsx):
- News cards grid
- Dynamic content from data
- Link to article pages
The tournament page needs:
- Tournament tabs component (Valorant, Apex, League)
- Bracket visualization
- Match results display
- Tab switching logic using
useTournamentTabshook
The article page needs:
- Article content layout
- Sidebar with latest posts
- Reading time calculation
- Social sharing buttons
Install and configure:
yarn add react-hook-form zod @hookform/resolversThen implement form validation in Join section.
Convert the remaining CSS from assets/css/style.css to component-specific SCSS files.
- Test all interactive features (navigation, forms, animations)
- Verify responsive design on all breakpoints
- Check SEO metadata on all pages
- Test performance with Lighthouse
yarn dev- Start development serveryarn build- Build for productionyarn start- Start production serveryarn lint- Run ESLintyarn lint:fix- Fix linting errorsyarn type-check- Run TypeScript compiler checkyarn format- Format code with Prettieryarn analyze- Analyze bundle size
Create .env.local:
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_SITE_NAME=TournamentFor production, update with your actual domain.
Each page has custom metadata exported for optimal SEO:
export const metadata: Metadata = {
title: "Page Title",
description: "Page description",
// ...other metadata
};- Mobile: β€ 574px
- Mobile Up: β₯ 575px
- Tablet Up: β₯ 768px
- Laptop Up: β₯ 992px
- Desktop Up: β₯ 1200px
- XL Desktop Up: β₯ 1400px
- β Mobile-first responsive design
- β Component-based architecture
- β Type-safe TypeScript
- β SCSS with BEM-like naming
- β Server-side rendering for SEO
- β Proper semantic HTML
- β Accessibility attributes
- β Security headers
- β Image optimization
- β Code splitting
Follow the conventions in agent.md for consistent code style and architecture.
Note: All TypeScript errors shown during file creation are expected and will resolve once you run yarn install to install the dependencies.