Skip to content

A demo application using AWS Appsync, DynamoDB, and NextJS

Notifications You must be signed in to change notification settings

dmcd/app-sync-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppSync Demo

A demo application using AWS AppSync, DynamoDB, and NextJS

It allows you to have full control of how your AWS resources are deployed and supports DynamoDB single table design unlike AWS Amplify (at the time of writing).

Backend

  1. Install dependencies
cd backend
npm install
  1. Copy DynamoDB simulator into your home directory
rsync -ahp node_modules/amplify-dynamodb-simulator ~/.amplify/lib/amplify-dynamodb-simulator
  1. Create a .env.dev
PRIMARY_TABLE=Primary
AWS_ACCESS_KEY_ID=fake
AWS_SECRET_ACCESS_KEY=fake
DYNAMODB_PATH=/tmp/app-sync-demo-dev-dynamodb
  1. Start the backend (doesn't yet support hot reloading)
npm run dev

Frontend

  1. Install dependencies
cd frontend
npm install
  1. Create a .env.local
NEXT_PUBLIC_GRAPHQL_ENDPOINT=http://192.168.1.103:8900/graphql
NEXT_PUBLIC_AWS_REGION=us-fake-1
NEXT_PUBLIC_APPSYNC_AUTHENTICATION_TYPE=API_KEY
NEXT_PUBLIC_APPSYNC_API_KEY=fake-api-key
  1. Start the app
npm run dev

Testing

Backend

cd backend
npm run test
npm run e2e

Deployment

The app currently uses an AppSync API key which will be exposed to the internet. This should be changed to use AWS Cognito before deploying a permanent environment.

See .github/workflows/main.yml

About

A demo application using AWS Appsync, DynamoDB, and NextJS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published