Integrate a NextJS frontend with an AWS CDK backend, offering a simple solution for handling image uploads and downloads.
This project is structured into two main parts:
- Frontend: A NextJS application at the root of the project.
- Backend: An AWS CDK backend located in the
_backend
directory.
- Amazon Cognito Authentication: Secure user authentication process.
- Amazon S3 Integration: Handles file uploads and downloads.
- AWS Amplify Libraries: Allow the frontend to communicate with AWS
- Navigate to Backend Directory: Change to the
_backend
directory. - Install Dependencies: Run
npm i
to install necessary packages.
- Root Directory: Stay at the root of the project.
- Install Dependencies: Run
npm i
to set up the NextJS application.
- The UI is intentionally basic!
- Uses
withAuthenticator
for straightforward authentication. StorageManager
andStorageImage
for handling image files.
- Navigate to Backend Directory: Ensure you're in the
_backend
directory. - Deploy Resources: Execute
npx aws-cdk deploy --outputs-file output.json
.- This command deploys necessary resources and generates an
output.json
file.
- This command deploys necessary resources and generates an
- The frontend's
awsconfig.ts
file reads theoutput.json
to create a configuration for AWS Amplify.
Your contributions are highly appreciated. Whether it's suggesting new features, improving documentation, or fixing bugs, your input helps make this project better.
For any questions or issues, please feel free to open an issue in the repository.