How saimadan8/movie-mood-ai-app works
What this project is (type + purpose)
This repo is a full-stack starter template for a React SPA (Vite) backed by AWS Amplify. The “backend” is not a traditional server you run; instead it’s managed AWS services provisioned via Amplify:
• Auth: Amazon Cognito
• API: AppSync (GraphQL)
• Database: DynamoDB
• Plus typical Amplify deployment scaffolding (hosting/CI) via amplify.yml.
• A static web frontend (React/Vite) running in the browser
• AWS-managed backend services (Cognito, AppSync, DynamoDB)
• Amplify as the provisioning/configuration layer and (often) the hosting/deployment layer
How the file tree maps to architecture
Frontend (client)
• index.html, vite.config.ts, src/main.tsx, src/App.tsx, src/assets/*, src/*.css
• This is the browser-delivered SPA.
• package.json (root): frontend build + dependencies.
Amplify backend definition / IaC
• amplify/backend.ts: top-level Amplify backend composition/entry.
• amplify/auth/resource.ts: declares auth resources (Cognito User Pool, etc.).
• amplify/data/resource.ts: declares data/API resources (AppSync + DynamoDB).
• amplify/package.json, amplify/tsconfig.json: backend definition toolchain.
Deployment / CI
• amplify.yml: build/deploy pipeline definition (commonly for Amplify Hosting).
• aws/* and aws/install, awscliv2.zip: helper assets for AWS CLI setup (not runtime, but relevant to “how it gets deployed/provisioned”).
React + Vite SPA
• built artifacts served as static files
Authentication: Amazon Cognito
• user sign-up/sign-in
• JWT issuance (ID/Access tokens)
API: AWS AppSync (GraphQL)
• receives GraphQL queries/mutations/subscriptions
• validates auth (often using Cognito)
Database: Amazon DynamoDB
• stores application data
Provisioning/Deployment: AWS Amplify
• maps to amplify/* + amplify.yml
• creates/updates Cognito/AppSync/DynamoDB and deploys frontend (if using Amplify Hosting)
• Amplify Hosting / CDN (CloudFront): where the SPA is served from (commonly part of Amplify Hosting). Even if not explicitly shown in files, amplify.yml strongly suggests hosted deployments.
Architectural patterns/design principles visible here
• Serverless / managed services: no custom backend server present in the repo.
• Frontend-driven integration: SPA calls Cognito/AppSync directly.
• GraphQL BFF-like API: AppSync is the API façade over DynamoDB (and potentially other sources later).
• IaC / backend-as-code: backend defined in amplify/*/resource.ts and composed in amplify/backend.ts.
Don’t overthink it: maximize component separation (while staying accurate)
Because this is a template meant to be extended, it’s better to “split” components rather than lump them:
• Separate Auth (Cognito) from API (AppSync) from Data (DynamoDB).
• Separate runtime path (browser calls) from control plane (Amplify provisioning).
That level of separation is the “most accurate” representation of what exists here and what will evolve as the project grows.