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

User BrowserLoads app and enters pet details
CloudFront CDNapp.joesparkman.com edge delivery
S3 Static Hostingindex.html, app.js, styles.css

Auth and API Routing

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

Generation and Persistence

Gemini APIgenerateContent for recipe output
Lambda Runtimeprompt builder + response formatting
DynamoDB 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