How avizway1/amplify-vite-react-template works
Project Type and Purpose
• Full-stack, serverless web application starter
• Frontend: React + Vite for UI
• Backend: AWS Amplify–driven services (Cognito, AppSync, DynamoDB)
File Structure
• Top-level files: package.json, vite.config.ts → Frontend build
• “amplify/” folder: AWS resource definitions
– amplify/auth/resource.ts → Cognito User Pool config
– amplify/data/resource.ts → AppSync + DynamoDB config
– amplify/backend.ts → Central backend stack
– amplify.yml → CI/CD pipeline for Amplify Console
• “src/” folder: React application entry (main.tsx), components (App.tsx), assets, CSS.
README for Insights
• Authentication via Amazon Cognito
• API via AWS AppSync (GraphQL)
• Database via DynamoDB (real––time)
• Deployment instructions pointing at Amplify Console.
Main Components
a. User’s Web Browser (React + Vite SPA)
b. Hosting & CI/CD: AWS Amplify Console (amplify.yml)
c. Authentication Service: Amazon Cognito
d. GraphQL API: AWS AppSync
e. Data Store: Amazon DynamoDB
f. (Optional) AWS S3 & CloudFront for static asset hosting
Relationships & Interactions
1. User → Browser loads SPA from Amplify Console (backed by S3/CloudFront).
2. SPA ↔ Cognito User Pool for sign-up/sign-in (Amplify Auth lib).
3. Authenticated SPA ↔ AppSync GraphQL endpoint (Amplify API lib).
4. AppSync resolvers ↔ DynamoDB tables for CRUD operations.
5. Git repo (GitHub/CodeCommit) → Amplify Console CI/CD → auto-deploy new builds.
Architectural Patterns & Principles
• Serverless backend (no dedicated server instances)
• SPA frontend decoupled from backend services
• Infrastructure as code (amplify/ directory)
• Eventual consistency in data layer (DynamoDB + AppSync real-time subscriptions)
Relevant Technologies & Frameworks
• Frontend: React, Vite, TypeScript
• AWS Amplify Framework (CLI + libraries)
• Cognito (User Pools)
• AppSync (GraphQL API)
• DynamoDB (NoSQL DB)
• CI/CD: Amplify Console, amplify.yml