🏍️ 007

Bike Touring PWA

PWABedrockAstroGPS

Overview

Three-step pipeline: GPS → Open-Meteo → Bedrock Claude Haiku. Three routes (short/mid/long) displayed as swipeable cards with per-course landscape silhouettes (green hills / blue sea / purple mountains), route summary line, and destination weather badge. Detail view: Wikipedia photos, current↔destination weather comparison, 7-day forecast with high/low temps, outbound/return stop separation, return-route suggestions, and Google Maps navigation (unified https:// URL across all devices, waypoints as geocoded coordinates). URL shortening via POST /api/share stores data in DynamoDB; Lambda serves /s/{id} as OGP-tagged HTML for SNS previews. IP-based daily rate limiting via DynamoDB (3 requests/day). Serverless Astro static + CloudFront + S3 + Lambda + DynamoDB at just $0.40/month.

Architecture

Key Implementation Points

  • Real-time 3-step loading indicator (GPS → weather → AI) reduces perceived wait time
  • Claude Haiku generates feature tags, route summary, one-way/round-trip times, outbound/return stops, and return-route suggestions in one call
  • Astro static PWA + CloudFront + S3 + Lambda: ~$0.40/month, ~$0.005 per request
  • URL shortening + OGP via Lambda /s/{id} for SNS previews; DynamoDB IP-based rate limiting; Nominatim waypoint geocoding with direction filter

Tech Stack

Lambda
API Gateway
Amazon Bedrock
CloudFront
S3
DynamoDB
CloudFormation