In this example, we rely on the following libraries:
- Next.js - the React framework for production.
- NextAuth.js - a complete open source authentication solution for Next.js applications. It is designed from the ground up to support Next.js and Serverless.
- Apollo is a GraphQL client that allows you to easily query the exact data you need from a GraphQL server.
- Docker provides a simple and powerful developer experience, workflows and collaboration for creating applications.
In this simple example, we have the following folders -
- myauth-client (frontend): we integrate Apollo seamlessly with Next.js data fetching methods to fetch queries in the server and hydrate them in the browser. We leverage NextAuth for the authentication process.
- myauth-server (backend): we use ApolloGraphql server along with Postgres DB running in a Docker container
TBD