Architecture Visual

Complete production architecture for Pet Recipe App, from static frontend delivery through authentication, protected API routes, serverless compute, AI generation, and persistent storage.

Delivery and Frontend

BrowserUser BrowserLoads app and enters pet details
Amazon CloudFrontCloudFront CDNapp.joesparkman.com edge delivery
Amazon S3S3 Static Hostingindex.html, app.js, styles.css

Auth and API Routing

Amazon CognitoAmazon CognitoHosted UI + PKCE + JWT tokens
Amazon API GatewayAPI Gateway HTTP API/recipes, /saved-recipes, /pet-profiles
AWS LambdaLambda (Python)route dispatch and token-claim user mapping

Generation and Persistence

Google GeminiGemini APIgenerateContent for recipe output
AWS LambdaLambda Runtimeprompt builder + response formatting
Amazon DynamoDBDynamoDB TablesSavedRecipes and PetProfiles

Protected endpoints require Cognito bearer tokens. Recipe generation and saved data are user-scoped through JWT claim mapping in Lambda.

Hosting layer: CloudFront serves the app globally while S3 stores static frontend assets under the pet-recipe-app path.
Auth layer: Cognito handles sign-in and issues JWT tokens used as Bearer auth for protected save/list API routes.
Compute layer: API Gateway routes requests to Lambda for recipe generation and user-scoped persistence operations.
Data layer: DynamoDB stores saved recipes and pet profiles keyed by signed-in user identity from token claims.
AI layer: Lambda sends prompt content to Gemini and returns recipe text to the frontend response panel.
Security posture: Sensitive credentials stay server-side in environment/secret configuration, never in frontend code.
Read Build Story Back to App Back to Portfolio