Build Story

How the Pet Recipe App Works

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.

Challenge

Create a user-friendly experience for recipe generation while supporting secure sign-in and saved data across sessions.

Hosting Layer

The frontend is deployed to S3 and served through CloudFront at app.joesparkman.com/pet-recipe-app for global delivery and cache control.

Auth Layer

Amazon Cognito handles Hosted UI sign-in with PKCE. The browser stores tokens in session state and sends Bearer JWTs for protected routes.

API and Compute

API Gateway routes requests to Lambda: POST /recipes for generation and protected GET/POST routes for saved-recipes and pet-profiles.

Data Layer

DynamoDB persists user-scoped data in two tables: SavedRecipes and PetProfiles, keyed by identity claims from Cognito tokens.

AI Integration

Lambda builds recipe prompts and calls Gemini generateContent, then returns the generated recipe text back to the browser UI.

Security Model

Frontend never contains sensitive server credentials. Secret values stay in backend configuration and IAM access is scoped to required services.

Open Architecture Visual Back to App
Back to Portfolio