Git Product home page Git Product logo

next.js_graphql_express_apollo_boilerplate's Introduction

Anurag Garg

Next.js React GraphQL Express Apollo Boilerplate

Performance oriented Next.js and React.js application boilerplate with Typescript, Express.js, GraphQL, Apollo and Sass

build build build build

Table of Contents

Installation

Clone this repo to your local machine using https://github.com/garganurag893/Next.js_GraphQL_Express_Apollo_Boilerplate

Step 1: Set up the Development Environment

You need to set up your development environment before you can do anything.

Install Node.js and NPM

Install yarn globally

yarn global add yarn

NOTE : If you work with a mac, we recommend to use homebrew for the installation.

Install MongoDB Once Brew is installed, it is time to install MongoDB by issuing the following command on the Terminal:

brew install mongodb

Step 2: Set up Env

Open .env file in a editor and add your configuration for database and other required fields.

NODE_ENV = development;
JWT_SECRET = "somesuperkey";
DB =
  "mongodb://localhost/nextjs_graphql_express_apollo_boilerplate_development";
PORT = 4020;

Step 3: Install dependencies

Navigate to the server, nextjs and react app directories and run the below command:

$ yarn

Step 4: Running Locally

Navigate to the Express Server directory and run the below command in your terminal :

$ yarn start

Now navigate to Nextjs App directory and run the below command in your terminal :

$ yarn dev

Now navigate to React App directory and run the below command in your terminal :

$ yarn start

Step 5: Deployment

To deploy with ZEIT Now through your terminal, you will need to install Now CLI, a frequently updated, and open-source, command-line interface.

You can get Now CLI from either npm or Yarn. Using npm, run the following command from your terminal:

$ npm i -g now

To verify that you have installed Now CLI, try running now help from your terminal.

With Now CLI installed, you can now login using the following command:

$ now login

Navigate to Nextjs App directory and run the below commands in order :

$ now

Once deployed, you will get a preview URL that is assigned on each deployment to share the latest changes under the same address.

Features

GraphQL

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

Express

Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.

Next.js

Next.js extends React to provide a powerful method for loading a page's initial data, no matter where it is coming from. With a single place to prepopulate page context, server-side rendering with Next.js seamlessly integrates with any existing data-fetching strategy.

React

React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.

React Apollo

React Apollo allows you to fetch data from your GraphQL server and use it in building complex and reactive UIs using the React framework. React Apollo may be used in any context that React may be used. In the browser, in React Native, or in Node.js when you want to do server-side rendering.

Typescript

TypeScript is an open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, and adds optional static typing to the language. TypeScript is designed for development of large applications and transcompiles to JavaScript.

JsonWebToken

JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties.

TSLint

TSLint is an extensible static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors

Husky

Husky can prevent bad git commit, git push and more ๐Ÿถ woof!

Bluebird

Bluebird is a fully featured promise library with focus on innovative features and performance.

Cors

Cross-origin resource sharing is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain from which the first resource was served

Contributing

To get started...

Step 1

  • Option 1

    • ๐Ÿด Fork this repo!
  • Option 2

    • ๐Ÿ‘ฏ Clone this repo to your local machine using https://github.com/garganurag893/Next.js_GraphQL_Express_Apollo_Boilerplate

Step 2

  • HACK AWAY! ๐Ÿ”จ๐Ÿ”จ๐Ÿ”จ

Step 3

Support

Reach out to me at one of the following places!

Donations

If this boilerplate help save your valuable time and you feel to help me donate now to help me create more amazing stuff.

Support via Paypal

Support via GooglePay

+919468026011

License

License

next.js_graphql_express_apollo_boilerplate's People

Contributors

garganurag893 avatar

Watchers

James Cloos 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.