-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(liveness): move liveness example app to its own app (#4451) #4462
Closed
Closed
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
84ddc0d
chore(liveness): move liveness example app to its own app (#4451)
thaddmt cb52163
fix tests
thaddmt 97faf06
chore: fix workflow
thaddmt fa8ba70
fix ts build
thaddmt b52f5e6
update yarn lock
thaddmt e3087b5
fix build
thaddmt a159931
fix build for liveness app
thaddmt 90b8e60
fix stuff
thaddmt 327dea6
upgrade next in both apps
thaddmt 127019e
Merge branch 'main' into migrate-liveness-app
thaddmt b4cac00
Merge branch 'main' into migrate-liveness-app
thaddmt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Set this .env to the beta/gamma endpoints to test locally | ||
NEXT_PUBLIC_STREAMING_API_URL= | ||
NEXT_PUBLIC_BACKEND_API_REGION= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["next", "next/babel", "next/core-web-vitals"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Next.js + Amplify UI Example | ||
|
||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. e.g. Authenticator Sign In With Email is at "http://localhost:3000/ui/components/authenticator/sign-in-with-email". | ||
|
||
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](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](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const path = require('path'); | ||
const { patchWebpackConfig } = require('next-global-css'); | ||
|
||
module.exports = { | ||
reactStrictMode: true, | ||
/** | ||
* Setting trailingSlash to true to resolve known bug with federated sign in redirect + next.js | ||
* https://github.com/aws-amplify/amplify-cli/issues/7359#issuecomment-812821315 | ||
*/ | ||
trailingSlash: true, | ||
pageExtensions: ['page.tsx'], | ||
webpack: (config, options) => { | ||
// allows importing of css files inside modules | ||
patchWebpackConfig(config, options); | ||
|
||
// resolve react and react-dom from project node_modules | ||
config.resolve.alias = { | ||
...config.resolve.alias, | ||
react: path.resolve(__dirname, 'node_modules/react'), | ||
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'), | ||
'react-map-gl': path.resolve(__dirname, 'node_modules/react-map-gl'), | ||
}; | ||
|
||
return config; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "@aws-amplify/ui-next-example-liveness", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"clean": "rimraf node_modules .next", | ||
"start": "next start", | ||
"lint": "next lint" | ||
}, | ||
"dependencies": { | ||
"@aws-amplify/ui-react": "5.2.0", | ||
"@aws-amplify/ui-react-liveness": "^2.0.6", | ||
"@aws-sdk/credential-providers": "^3.370.0", | ||
"aws-amplify": "5", | ||
"next": "^13.4.19", | ||
"next-global-css": "^1.1.1", | ||
"react": "18", | ||
"react-copy-to-clipboard": "^5.1.0", | ||
"react-dom": "18", | ||
"react-icons": "^4.4.0", | ||
"react-map-gl": "7.0.23", | ||
"swr": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^15.12.4", | ||
"@types/react": "^18.2.22", | ||
"eslint": "^8.44.0", | ||
"eslint-config-next": "11.0.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Think the plugin major version might be meant to align with the major version of NextJS |
||
"rimraf": "^3.0.2" | ||
}, | ||
"workspaces": { | ||
"nohoist": [ | ||
"aws-amplify", | ||
"**/aws-amplify/**", | ||
"**/react/", | ||
"**/react/**", | ||
"react-dom", | ||
"**/react-dom/**" | ||
] | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need react-map-gl for testing Liveness?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope good catch, will remove