Giter Site home page Giter Site logo

amplify-nextjs-chat-app's Introduction

Modern Chat app Frontend

๐Ÿšจ Note that this project does not create our backend services via the Amplify CLI, but relies on exported values from the AWS CDK.

๐Ÿšจ This application is part of a blog post that explains both the frontend and the backend as a whole. The backend repo can be found here

ezgif-5-31ccf9d033

Overview

This repo is the frontend to building a fullstack chat app. The backend can be found here.

image

Tech Stack

  • React Framework: NextJS
  • UI Library: AWS Amplify UI primitives
  • API: GraphQL via AWS AppSync
  • File uploads: Sent to Amazon S3
  • Signup/SignIn: Managed with Cognito
  • Backend Binding: amplify-js

Steps to get started

Once the backend is deployed, it will output a set of values. The outputted values are what you'll need to get this project working.

  1. Run amplify init
  2. Run amplify add codegen --apiId YOUR_APPID (value generated from the backend)
  3. amplify codegen (accept the defaults, but set the max-depth to 4)
  4. Create a src/aws-exports.js file and bring over the values from your CDK backend and ensure your project looks like the sample.aws-exports.js file.
  5. Run the app and create 2 users
  6. Once signed in, create a room.
  7. You should now be able to view the rooms on the homepage. Click one and begin creating messages.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

amplify-nextjs-chat-app's People

Contributors

amazon-auto avatar dependabot[bot] avatar mtliendo avatar unirt avatar weisisheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

amplify-nextjs-chat-app's Issues

I cannot build because of 'module not found' error

I've built all the backend stacks via the CDK, and finished setting up graphql and amplify, but the npm run build doesn't run, which is preventing me from trying this project.
Does anyone know of a solution?

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-05-22 แ„‹แ…ฉแ„Œแ…ฅแ†ซ 8 06 30

I've already gone through the process of deleting package-lock.json file and node-modules directory and reinstalling via npm install, but got the same error.

Doesn't work on AWS Amplify because aws-exports.js overridden?

If appears that the .gitignore and other amplify workings means that you can't deploy this to aws amplify. The root cause, I think, is that aws-exports.js does not get copied and then parts get overridden. If it is not copied, then authorization doesn't work. If it is copied, the default amplify behavior causes AppSync not to work.

Can you fix and/or provide specific instructions to deploy to aws amplify. My patch was to create a copy of aws-exports.js as aws-exportsDev.js and then copy that in during build. But, I am unfamiliar with amplify and I might be doing it wrong.

I just assume that this should be easily deployable to AWS Amplify.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.