Challenge
Create a user-friendly experience for recipe generation while supporting secure sign-in and saved data across sessions.
Build Story
This app helps pet owners generate recipe ideas quickly while still using a production-ready AWS architecture. It combines static hosting, secure authentication, serverless APIs, and cloud persistence for saved recipes and pet profiles.
Create a user-friendly experience for recipe generation while supporting secure sign-in and saved data across sessions.
The frontend is deployed to S3 and served through CloudFront at app.joesparkman.com/pet-recipe-app for global delivery and cache control.
Amazon Cognito handles Hosted UI sign-in with PKCE. The browser stores tokens in session state and sends Bearer JWTs for protected routes.
API Gateway routes requests to Lambda: POST /recipes for generation and protected GET/POST routes for saved-recipes and pet-profiles.
DynamoDB persists user-scoped data in two tables: SavedRecipes and PetProfiles, keyed by identity claims from Cognito tokens.
Lambda builds recipe prompts and calls Gemini generateContent, then returns the generated recipe text back to the browser UI.
Frontend never contains sensitive server credentials. Secret values stay in backend configuration and IAM access is scoped to required services.