Tale of DDH Backend ArchitectureClient LayerWeb/Mobile ClientsAPI Gateway Layer (Regional)Auth API/authBlog API/blogGallery API/galleryCore API/coreRequest API/requestEmail API/emailLink API/linkOrg API/orgAdmin API/adminLambda Functions (Node.js 22.x)AuthfindIdentityBlogfindBlogGalleryfindAlbumCorefindMenuRequestcreateRequestEmailsendEmailLinkfindLinkOrgfindAboutUsAdminprocessMsgIntegrationsendEmailMsgData Storage LayerDynamoDB Tables:AuthuserProfileBlogblog, commentGallerygallery, photoRequestrequest, subLinklink, countryOrgpeople, menuAdmininboxS3 Buckets:taleofddh-blogstaleofddh-mediataleofddh-datataleofddh-docstaleofddh-messagesCloudFront CDNmedia-protectedSecrets ManagerAPI Keys, CredsMessaging & Notification LayerSQS Queuetaleofddh-messageSNS TopicwhatsappSNS Topicgoogle-driveAmazon SESEmail ServiceExternal Integrations & InfrastructureGmail APIEmail ProcessingGoogle DriveFile StorageWhatsApp APIMessagingRoute 53DNSACMSSL/TLSSecurity & Access ControlIAMRoles & PoliciesIAM AuthorizerAPI Gateway AuthKMSEncryptionCloudWatchMonitoringCloudFormationIaCX-RayTracingArchitecture Legend & Key FeaturesMicroservices Architecture:• 9 Independent API Services (Auth, Blog, Gallery, Core, Request, Email, Link, Org, Admin)• Each service has dedicated Lambda functions, DynamoDB tables, and API Gateway endpoints• Serverless Framework v4 for deployment automation• Event-driven architecture with SQS and SNS for asynchronous processingKey Features:• Regional API Gateway with custom domain (api.taleofddh.com) and TLS 1.2• Node.js 22.x runtime for all Lambda functions• Multi-bucket S3 strategy: blogs, media, data, documents, messagesIntegration Patterns:• External integrations: Gmail API, Google Drive API, WhatsApp API• SES for transactional email delivery• SNS topics for fan-out messaging patterns• SQS queues for reliable message processingSecurity:• IAM-based API authorization for protected endpoints• KMS encryption for sensitive data at rest• Secrets Manager for API keys and credentialsTale of DDH Frontend ArchitectureGlobal UsersAmericasEuropeAsia PacificDNS & Security LayerRoute 53taleofddh.comCertificate ManagerSSL/TLSCDN & Content Delivery LayerCloudFrontGlobal CDNAmericas EdgeEurope EdgeAsia EdgeCaching Strategy:Static Assets: 1 year TTLDynamic Content: 5 min TTLGlobal latency: <100msFrontend Hosting LayerAWS AmplifyHosting PlatformCI/CD PipelineNext.js ApplicationReact 18.3.1 | Next.js 15.5.6 | Node.js 22App Structure📁 pages/📁 components/📁 styles/📁 public/📁 common/Build Features✓ Static Generation✓ Server-Side Rendering✓ Image Optimization✓ Code Splitting✓ Bundle AnalysisAuthentication & API Integration LayerAmazon CognitoUser AuthenticationUser Pools & IdentityAPI GatewayREST & GraphQL APIsBackend Services🔗 Lambda Functions🔗 DynamoDB Tables🔗 S3 Storage🔗 See Backend ArchitectureAPI Endpoints🔓 Public APIs🔒 Authenticated APIs🔐 Admin APIs📊 Analytics APIsAuth Features✓ Sign Up/Sign In✓ Password Reset✓ Social Login✓ JWT TokensStatic Assets & Media Delivery LayerS3 Media BucketImages & VideosGallery AssetsS3 DocumentsPDFs & FilesUser UploadsS3 BlogsBlog ContentMarkdown FilesPublic Assets📁 /public/images/📁 /public/fonts/🎨 Icons & Logos⚡ Served via AmplifyImage Optimization🖼️ Next.js Image Component📐 Responsive Sizing🗜️ WebP/AVIF Conversion⚡ Lazy LoadingPerformance📊 CDN Cache: 1 year🚀 Edge Optimization📱 Mobile Optimized🔄 Auto Format SelectionLegend & Key FeaturesService Icons LegendAWS Amplify - Frontend HostingCloudFront - Global CDNRoute 53 - DNS ManagementCognito - User AuthenticationAPI Gateway - API ManagementS3 - Object StorageACM - SSL/TLS CertificatesNext.js - React FrameworkEdge LocationsGlobal User RegionsKey Architecture Features🌐 Global Distribution• Multi-region CDN with edge locations• Sub-100ms latency worldwide🔒 Security & Authentication• SSL/TLS encryption via ACM• JWT-based authentication with Cognito⚡ Performance Optimization• Static generation & SSR• Image optimization & lazy loading• Intelligent caching strategiesTechnology StackFrontend Framework• React 18.3.1 with Next.js 15.5.6• Node.js 22 runtime• TypeScript supportAWS Infrastructure• Amplify for CI/CD & hosting• CloudFront for global delivery• S3 for static asset storageDevelopment Features• Hot reloading & fast refresh• Bundle analysis & optimizationData Flow PatternsUser Request Flow1. DNS resolution via Route 532. CDN routing via CloudFront3. App delivery from AmplifyAPI Communication• Authentication via Cognito• API calls through Gateway• Backend service integrationAsset Delivery• Static assets via S3 + CDN• Dynamic optimization