A social media link share site utilizing Authentication using Amazon Cognito, Database using DynamoDB, GraphQL API using Amazon AppSync, Storage for data using S3 Buckets, Next.JS, Static Site Generation, Incremental Static Regeneration, Server-side Render, Next.JS Image Component, React Hook Form. An extremely quick optimized website utilizing modern technologies to deliver a smooth user experience.
NuSpeak
npx create-next-app {name}
cd {name}
npm run dev
create tsconfig.json file
npm install --save-dev typescript @types/react @types/node @types/node
npm run dev
npm install eslint --save-dev
npx eslint --init
npm install --save-dev prettier eslint-config-prettier
Add prettier to .eslintrc.json extends
create .prettierrc & .prettierignore & .eslintignore
Create _document.tsx, createEmotionCache.ts & theme.ts - import code from Next.JS material UI example to _app.tsx, _document.tsx, createEmotionCache.ts, & theme.ts
npm install @material-ui/core @material-ui/icons @mui/material @mui/icons-material @emotion/react @emotion/styled @emotion/cache @emotion/server prop-types
npm install -g @aws-amplify/cli
npm install react-hook-form
npm install aws-amplify
amplify configure
amplify init
amplify add api
amplify push
amplify console
Follow prompts and setup enviroment to your liking.
Extra troubleshooting commands:
amplify checkout env {env}
amplify env list
amplify status
amplify update api
ampliify remove api/auth
amplify api gql-compile
amplify codegen
Additional:
React Hook Form - Getting started
Amplify Authentication - Sign up, Sign in & Sign out
Amplify API - Fetch Data GraphQl
Next.JS - Data Fetching Overview
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.js
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!