A modern, responsive, professional website for the Hill Country Cricket Association built with Next.js, Tailwind CSS, and Contentful CMS, deployed on Vercel.
- Modern Tech Stack: Next.js 14, TypeScript, Tailwind CSS
- Headless CMS: Contentful integration for dynamic content management
- Responsive Design: Mobile-first approach with cricket-themed styling
- Youth Cricket Programs: U10, U13, U15 age groups with dedicated pages
- Adult Cricket Leagues: APCL Plate and APCL Elite competitive leagues
- Dynamic Team Management: Scalable team pages with no maximum limits
- Contact & Registration Forms: Built-in form handling with validation
- SEO Optimized: Dynamic metadata and Open Graph tags
- Performance Focused: Static generation with on-demand revalidation
/app
/layout.tsx # Root layout with global styles
/page.tsx # Home page
/globals.css # Tailwind + global styles
/(pages) # Page routes
/contact-registration # Contact & registration forms
/youth-cricket # Youth program pages
/facilities
/infrastructure
/curriculums
/coaches
/[ageGroup] # Dynamic pages (U10, U13, U15)
/teams # Youth teams listing
/adult-cricket # Adult program pages
/apcl-plate # APCL Plate league
/teams
/apcl-elite # APCL Elite league
/teams
/teams # Global teams listing
/[teamId] # Individual team pages
/components
/Header.tsx # Navigation header
/Footer.tsx # Footer with social links
/Hero.tsx # Hero section component
/TeamCard.tsx # Team card component
/ContactForm.tsx # Contact form
/RegistrationForm.tsx # Registration form
/lib
/cms.ts # Contentful API client
/types.ts # TypeScript types
/utils.ts # Helper functions
/public
/images # Images and assets
/fonts # Custom fonts
/api
/contact # Contact form API route
/register # Registration form API route
- Node.js 18+ and npm
- Contentful account and space
- Vercel account (for deployment)
- Clone the repository:
git clone <repository-url>
cd hill-country-cricket-association- Install dependencies:
npm install- Set up environment variables:
cp .env.local.example .env.local- Add your Contentful credentials to
.env.local:
CONTENTFUL_SPACE_ID=your_space_id_here
CONTENTFUL_ACCESS_TOKEN=your_access_token_here
CONTENTFUL_PREVIEW_ACCESS_TOKEN=your_preview_token_here
- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
Create the following content models in your Contentful space:
- name (Short text) - Team name
- league (Short text) - League name
- leagueTier (Short text) - "APCL Plate" or "APCL Elite"
- level (Short text) - Competition level
- ageGroup (Short text) - "U10", "U13", or "U15" (for youth teams)
- description (Long text) - Team description
- playersList (Short text, list) - Array of player names
- teamImage (Media) - Team photo
- schedule (Long text) - Match schedule (optional)
- programType (Short text) - "Youth" or "Adult"
- name (Short text) - League name
- tier (Short text) - League tier
- description (Long text) - League description
- overview (Long text) - Detailed overview
- rules (Long text) - League rules (optional)
- format (Long text) - Competition format (optional)
- parentProgram (Short text) - "Youth" or "Adult"
- title (Short text) - Program title
- type (Short text) - "Youth" or "Adult"
- description (Long text) - Program description
- image (Media) - Program image (optional)
- content (Rich text) - Detailed content
- role (Short text) - Coach role/title
- qualifications (Long text) - Coach qualifications
- bio (Long text) - Coach bio
- programType (Short text) - "Youth" or "Adult"
- name (Short text) - Facility name
- type (Short text) - Facility type
- location (Short text) - Location
- description (Long text) - Facility description
- title (Short text) - Page title
- slug (Short text) - URL slug
- content (Rich text) - Page content
- heroImage (Media) - Hero image (optional)
- metadata (JSON) - SEO metadata (optional)
- Cricket Blue:
#003f5c(Primary) - Cricket Gold:
#ffa600(Accent) - Cricket Green:
#2f9e44(Youth programs) - APCL Plate: Blue palette (Intermediate)
- APCL Elite: Purple palette (Premier)
- Headlines: Bold, 32-48px (desktop)
- Subheadings: 24-32px
- Body: 16-18px with 1.5-1.6 line height
- sm: 640px
- md: 768px
- lg: 1024px
- xl: 1280px
- 2xl: 1536px
Handles general inquiry form submissions.
Request Body:
{
"name": "string",
"email": "string",
"phone": "string",
"inquiryType": "string",
"message": "string"
}Handles player registration form submissions.
Request Body:
{
"name": "string",
"email": "string",
"phone": "string",
"dob": "string",
"program": "Youth" | "Adult",
"ageGroup": "U10" | "U13" | "U15" (if Youth),
"league": "APCL Plate" | "APCL Elite" (if Adult),
"agreeToTerms": boolean
}-
Push your code to GitHub, GitLab, or Bitbucket
-
Import project in Vercel:
- Go to vercel.com
- Click "New Project"
- Import your Git repository
-
Configure environment variables in Vercel:
- Add
CONTENTFUL_SPACE_ID - Add
CONTENTFUL_ACCESS_TOKEN - Add
CONTENTFUL_PREVIEW_ACCESS_TOKEN(optional)
- Add
-
Deploy:
- Vercel will automatically build and deploy
- Get your production URL
- Set up custom domain (optional)
- Go to your Contentful space
- Navigate to Content
- Click "Add entry" → "Team"
- Fill in team details:
- Name, league, tier, level
- Age group (for youth)
- Description
- Players list (comma-separated)
- Upload team image
- Set program type
- Publish the entry
- Team will appear on the website within an hour (or on next deployment)
- All content can be managed through Contentful
- Changes are reflected on the website after revalidation period (1 hour)
- For immediate updates, trigger a new deployment in Vercel
- No team limits: Add unlimited teams to any league
- Dynamic routing: All team pages generated automatically
- CMS-driven: Non-technical content updates via Contentful
- Pagination ready: Can be added for large team lists
- WCAG AA compliant: Proper color contrast and semantic HTML
- Keyboard navigation: Full keyboard support
- Screen reader friendly: Proper ARIA labels and alt text
- Responsive: Works on all devices and screen sizes
- Static generation: Fast page loads with SSG
- Image optimization: Next.js Image component
- Code splitting: Automatic route-based splitting
- Lighthouse 90+: Optimized for performance
- Create a new file in
app/(pages)/your-page/page.tsx - Import Hero and other components
- Add to navigation in
components/Header.tsx - Update sitemap if needed
- Global styles:
app/globals.css - Tailwind config:
tailwind.config.js - Component styles: Use Tailwind utility classes
Forms use React Hook Form for validation and submission. To integrate with email services:
- Install email service SDK (e.g., SendGrid)
- Add API key to environment variables
- Update API routes in
/api/contactand/api/register - Configure email templates
- Check Contentful credentials in
.env.local - Verify content model fields match code
- Check team entries are published in Contentful
- Run
npm installto ensure dependencies are installed - Check TypeScript errors with
npm run lint - Verify environment variables are set
- Clear
.nextcache:rm -rf .next - Rebuild:
npm run build - Check Tailwind configuration
© 2024 Hill Country Cricket Association. All rights reserved.
For support or questions, please contact:
- Email: info@hillcountrycricket.com
- Phone: (512) 555-0100
Built with ❤️ and 🏏 by the HCCA team