Install Next.js Project

Prepare the Environment

In this step, you will create a new Next.js project and install required UI libraries that will be used later in the authentication interface.


1. Create a New Next.js Project

If you are starting from scratch, run the following command:

npx create-next-app@latest my-cognito-app

When prompted: Ok to proceed? (y)

Choose y, then navigate into the project directory:

cd my-cognito-app

2. Install shadcn/ui (UI Component Library)

You will use shadcn/ui to build the authentication UI later.

Initialize shadcn:

npx shadcn@latest init

This will set up the component generator for your project.

Your environment is now ready for the next steps, where you will install Amplify SDK and configure the AWS Cognito integration.


Navigation: