Skip to content

zeshhaan/wrp-astro

Repository files navigation

WRP Detailing - Official Website

Premium car detailing studio website for WRP (Wrap, Reinforce, Protect) based in Dubai, UAE.

This project was migrated from Next.js 16 to Astro 5 and is deployed on Cloudflare Workers with server-side rendering.

πŸš€ Tech Stack

  • Framework: Astro 5 with SSR (server output mode)
  • Adapter: Cloudflare with platformProxy enabled
  • React: v19.2.0 (for interactive components)
  • Alpine.js: v3.x (for lightweight client-side interactivity)
  • TypeScript: Strict mode enabled
  • Styling: Tailwind CSS v4
  • UI Components: shadcn/ui (Radix UI primitives)
  • Fonts: Playfair Display (serif), Inter (sans), Montserrat (logo)
  • Package Manager: bun
  • Deployment: Cloudflare Workers + D1 Database

πŸ“‹ Prerequisites

  • Bun installed
  • Cloudflare account (for deployment)
  • Wrangler CLI (installed via dev dependencies)

🧞 Commands

All commands are run from the root of the project:

# Install dependencies
bun install

# Start development server (localhost:4321)
bun dev

# Build for production
bun build

# Preview build locally with Wrangler
bun preview

# Deploy to Cloudflare Workers
bun deploy

# Generate Cloudflare types
bun cf-typegen

# Run Astro CLI commands
bun astro ...

πŸ—οΈ Project Structure

wrp-astro/
β”œβ”€β”€ public/                     # Static assets (images, favicon)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ui/                 # shadcn/ui React components
β”‚   β”‚   β”œβ”€β”€ Navigation.astro    # Main navigation
β”‚   β”‚   β”œβ”€β”€ WRPFooter.astro     # Footer component
β”‚   β”‚   └── BaseHead.astro      # SEO/meta tags
β”‚   β”œβ”€β”€ content/
β”‚   β”‚   β”œβ”€β”€ blog/               # Blog posts (Markdown/MDX)
β”‚   β”‚   └── services/           # Service content (Markdown/MDX)
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   β”œβ”€β”€ BaseLayout.astro    # Main layout with nav/footer
β”‚   β”‚   β”œβ”€β”€ BlogPost.astro      # Blog post layout
β”‚   β”‚   └── ServiceLayout.astro # Service page layout
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   └── utils.ts            # Utility functions
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   └── contact.ts      # Contact form API (POST)
β”‚   β”‚   β”œβ”€β”€ blog/
β”‚   β”‚   β”‚   └── [...slug].astro # Dynamic blog routes
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── [slug].astro    # Dynamic service routes
β”‚   β”‚   β”œβ”€β”€ index.astro         # Homepage
β”‚   β”‚   β”œβ”€β”€ about.astro         # About page
β”‚   β”‚   β”œβ”€β”€ more-about-wrp.astro# Extended about page
β”‚   β”‚   β”œβ”€β”€ contact-us.astro    # Contact form page
β”‚   β”‚   └── rss.xml.js          # RSS feed
β”‚   β”œβ”€β”€ consts.ts               # Site constants
β”‚   β”œβ”€β”€ content.config.ts       # Content collection schemas
β”‚   └── env.d.ts                # Cloudflare runtime types
β”œβ”€β”€ astro.config.mjs            # Astro configuration
β”œβ”€β”€ wrangler.jsonc              # Cloudflare Workers config
β”œβ”€β”€ tailwind.config.mjs         # Tailwind CSS config
└── tsconfig.json               # TypeScript config

πŸ—„οΈ Cloudflare Integration

D1 Database

  • Database name: wrp-contact-forms
  • Binding: DB
  • Purpose: Stores contact form submissions
  • Access: locals.runtime.env.DB in API routes

Wrangler Configuration

  • Worker entry: ./dist/_worker.js/index.js
  • Compatibility date: 2025-10-29
  • Custom domains: wrpdetailing.ae, www.wrpdetailing.ae
  • Email service binding for contact form notifications
  • Static assets served via ASSETS binding

πŸ“ Content Collections

Services Collection

Located in src/content/services/, each service includes:

  • Title, subtitle, description, hero image, price
  • Package details (name, price, duration, features)
  • Benefits list
  • Step-by-step process
  • FAQs

Blog Collection

Located in src/content/blog/ (for reference/future use):

  • Title, description, publication date
  • Hero image support
  • MDX support for rich content

🎨 Design System

  • Brand Colors: Black & white luxury aesthetic
  • Typography:
    • Headings: Playfair Display (serif)
    • Body: Inter (sans-serif)
    • Logo: Montserrat 900 italic
  • Responsive: Mobile-first approach
  • UI Framework: Tailwind CSS v4 with shadcn/ui components

🚒 Deployment

The site is deployed on Cloudflare Workers:

  1. Build: bun build
  2. Deploy: bun deploy
  3. Preview: bun preview

Live domains:

πŸ”„ Migration Notes

This project was migrated from Next.js to Astro:

  • Converted App Router pages β†’ Astro pages
  • Migrated API routes β†’ Astro API routes
  • Replaced Next.js Image β†’ Astro image service
  • Converted "use client" components β†’ Alpine.js (where possible)
  • Kept complex UI (shadcn/ui) as React islands
  • Replaced Vercel β†’ Cloudflare Workers
  • Added D1 database for form persistence

πŸ“ž Contact Information

  • Phone: +971 54 717 3000
  • Email: info@wrpdetailing.ae
  • Instagram: @wrp_ae
  • Location: Al Qusais Industrial Area 1, Dubai, UAE

πŸ“„ License

Β© 2025 WRP Detailing. All rights reserved.

πŸ› οΈ Development

For detailed development instructions and architecture notes, see CLAUDE.md.

About

Premium car detailing studio website - Astro 5 + Cloudflare Workers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors