Skip to content

Repository files navigation

Pinewood Robotics Website

This is the official website for Pinewood Robotics, FRC team 4765. Built with modern web technologies including Astro and React, featuring smooth animations, 3D graphics, and a responsive design.

πŸš€ Features

  • Modern Tech Stack: Built with Astro 7 and React 19
  • Smooth Animations: Lenis smooth scrolling and custom text animations
  • 3D Graphics: Three.js integration with React Three Fiber
  • Responsive Design: Mobile-first approach with Tailwind CSS
  • Performance Optimized: Static site generation with image optimization
  • Analytics: PostHog integration for user analytics
  • Authentication: Clerk integration for user management
  • Cloud Storage: AWS S3 integration for media assets
  • Background video: AV1/HEVC/H.264 MP4s served as static assets, no player library
  • Deployment Ready: Cloudflare Workers deployment configuration

πŸ› οΈ Tech Stack

Core Framework

  • Astro - Static site generator with islands architecture
  • React - UI component library
  • TypeScript - Type-safe JavaScript

Styling & UI

3D & Animation

Services & Integrations

Development Tools

  • PNPM - Fast, disk space efficient package manager
  • Wrangler - Cloudflare Workers CLI

πŸ“ Project Structure

pwrup-site/
β”œβ”€β”€ public/                 # Static assets
β”‚   β”œβ”€β”€ PWRUP_text.svg     # Logo and branding
β”‚   β”œβ”€β”€ Reefscape-Robot.webp # Robot images
β”‚   └── ...
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/        # React components
β”‚   β”‚   β”œβ”€β”€ ui/           # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ Welcome.tsx   # Main landing page component
β”‚   β”‚   β”œβ”€β”€ NavBar.tsx    # Navigation component
β”‚   β”‚   β”œβ”€β”€ AboutRobotics.tsx # About section
β”‚   β”‚   β”œβ”€β”€ Positions.tsx # Team positions
β”‚   β”‚   β”œβ”€β”€ Clips.tsx     # Video clips section
β”‚   β”‚   └── PEARL.tsx     # PEARL robot showcase
β”‚   β”œβ”€β”€ hooks/            # Custom React hooks
β”‚   β”‚   └── useLenis.ts   # Smooth scrolling hook
β”‚   β”œβ”€β”€ layouts/          # Astro layouts
β”‚   β”‚   └── Layout.astro  # Main page layout
β”‚   β”œβ”€β”€ lib/              # Utility libraries
β”‚   β”‚   β”œβ”€β”€ auth.ts       # Authentication utilities
β”‚   β”‚   β”œβ”€β”€ kv.ts         # Key-value store utilities
β”‚   β”‚   └── utils.ts      # General utilities
β”‚   β”œβ”€β”€ pages/            # Astro pages
β”‚   β”‚   β”œβ”€β”€ index.astro   # Home page
β”‚   β”‚   └── sign-up.astro # Registration page
β”‚   └── styles/           # Global styles
β”‚       └── global.css    # Global CSS
β”œβ”€β”€ astro.config.mjs      # Astro configuration
β”œβ”€β”€ tailwind.config.js    # Tailwind CSS configuration
β”œβ”€β”€ wrangler.toml         # Cloudflare Workers configuration
β”œβ”€β”€ deploy.sh             # Deployment script
└── package.json          # Dependencies and scripts

πŸš€ Getting Started

Prerequisites

  • Node.js (v22.12 or higher; Astro 7 requires >=22.12.0)
  • pnpm 9.12.3 or later (pinned via packageManager)

Installation

  1. Clone the repository

    git clone https://github.com/adamexu/pwrup-site.git
    cd pwrup-site
  2. Install dependencies

    pnpm install
  3. Start the development server

    pnpm dev
  4. Open your browser Navigate to http://localhost:4321 to see the site in action.

Available Scripts

  • pnpm dev - Start development server
  • pnpm build - Build for production
  • pnpm preview - Preview production build locally
  • pnpm deploy - Deploy to Cloudflare Workers

🎨 Key Components

Welcome Component

The main landing page featuring:

  • Animated typewriter effect
  • Smooth reveal animations
  • Background video integration
  • Call-to-action buttons

Navigation Bar

Responsive navigation with:

  • Auto-hide on scroll down
  • Smooth backdrop blur effect
  • Logo and registration link

About Robotics

Information section highlighting:

  • Team benefits and opportunities
  • Robot showcase with custom arrow graphics
  • Responsive layout for mobile and desktop

Positions

Team roles and opportunities with:

  • Interactive position cards
  • Detailed descriptions
  • Application links

πŸ”§ Configuration

Environment Variables

Create a .env file in the root directory:

# Clerk Authentication
PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_key
CLERK_SECRET_KEY=your_clerk_secret

# PostHog Analytics
PUBLIC_POSTHOG_KEY=your_posthog_key

# AWS S3 (if using)
AWS_ACCESS_KEY_ID=your_aws_key
AWS_SECRET_ACCESS_KEY=your_aws_secret
AWS_REGION=your_aws_region

# Upstash Redis (if using)
UPSTASH_REDIS_REST_URL=your_redis_url
UPSTASH_REDIS_REST_TOKEN=your_redis_token

Customization

Fonts

The site uses custom fonts defined in tailwind.config.js:

  • Jost - Primary font family
  • Red Hat Display - Secondary font family

Colors & Theming

Brand colors and theming can be customized in:

  • tailwind.config.js - Tailwind theme configuration
  • src/styles/global.css - Global CSS variables

Animation Configuration

Text reveal animations can be customized in src/components/Welcome.tsx:

const REVEAL_CONFIG = {
    textAlign: "right" as "left" | "center" | "right",
    text: "Pinewood Robotics",
};

πŸš€ Deployment

Cloudflare Workers (Recommended)

  1. Install Wrangler CLI

    npm install -g wrangler
  2. Login to Cloudflare

    wrangler login
  3. Deploy

    pnpm deploy

The site is configured for static deployment. Cloudflare Workers Builds must use Node.js 22.12 or later (.nvmrc and package.json engines.node). Cache headers for hashed assets live in public/_headers. Production custom domains (pinewoodrobotics.org) are under [env.production] in wrangler.toml.

Alternative Deployment Options

  • Vercel: Connect your GitHub repository to Vercel for automatic deployments
  • Netlify: Deploy directly from GitHub with build command pnpm build
  • GitHub Pages: Use GitHub Actions for automated deployment

πŸ§ͺ Testing

Browser Testing

The project includes Playwright configuration for end-to-end testing:

# Install Playwright
npx playwright install

# Run tests
npx playwright test

Performance Testing

Test compression and optimization:

node test-compression.js https://your-site.workers.dev

πŸ“± Mobile Optimization

The site is fully responsive with:

  • Mobile-first design approach
  • Touch-friendly navigation
  • Optimized images and assets
  • Smooth scrolling on mobile devices

πŸ” SEO & Analytics

SEO Features

  • Meta tags and Open Graph integration
  • Structured data markup
  • Sitemap generation
  • Image optimization with alt text

Analytics

  • PostHog integration for user behavior tracking
  • Custom event tracking for interactions
  • Performance monitoring

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Commit your changes
    git commit -m 'Add some amazing feature'
  4. Push to the branch
    git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ† About Pinewood Robotics

Pinewood Robotics (FRC Team 4765) is a competitive robotics team from Pinewood School. We participate in the FIRST Robotics Competition (FRC), building robots to compete in annual challenges while fostering STEM education and teamwork.

Team Highlights

  • Established: FRC Team 4765
  • School: Pinewood School
  • Competition: FIRST Robotics Competition
  • Focus: Engineering, programming, design, and outreach

πŸ“ž Contact


Built with ❀️ by the Pinewood Robotics team

Contributors

Languages