Code Monkey home page Code Monkey logo

nextjs-hasura-oauth-boilerplate's Introduction

Features

This boilerplate is built on top of Next.js and Hasura. So, you get all the benefits and features that these two softwares provide. However, the following features are the most important ones:

  1. Automatic compilation and bundling of Next.js which ensures optimized code during production builds.
  2. Pre-rendering of pages at build time (SSG) or request time (SSR).
  3. Support for TypeScript.
  4. File-system routing which helps in adding new routes to your application.
  5. Support for optimized images out of the box.
  6. Instant real-time GraphQL APIs.
  7. Built-in authorization and authentication.

Overview

This boilerplate is built using the following technologies:

It supports GraphQL Query, Mutation and Subscription out of the box.

Requirements

Packages

This application is the primary user-facing application. Once it’s up and running (see Development section), it’s available on http://localhost:3000.

  • Backend: Dockerized Hasura application

Hasura is an open source engine that connects to our databases & micro-services and auto-generates a production-ready GraphQL backend. It’s very easy to get Hasura up and running on our local system. All the migrations are set up in the migrations directory.

Installation

  1. Run the bootstrap script by running the following command from the root of your project:

    cd nextjs-hasura-boilerplate && yarn bootstrap
  2. Create a Google OAuth Client from https://console.developers.google.com/apis/credentials/oauthclient and copy the credentials to GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in your .env file inside the frontend directory.

  3. Start Docker and run both the applications by running the following command from the root of your project:

    yarn dev

We need to start Docker and then run the above command. The Hasura console will be available at http://localhost:8080/console. The Hasura GraphQL endpoint will be up and running on http://localhost:8080/v1/graphql. The Next.js application will be available at http://localhost:3000/.

License

This project is licensed under the MIT License.

nextjs-hasura-oauth-boilerplate's People

Contributors

masterial avatar

Stargazers

Washington Collective avatar

Watchers

 avatar

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.