Giter VIP home page Giter VIP logo

nextjs-strapi-boilerplate's Introduction

Logo

Twitter: Nirmalya Ghosh

This is a boilerplate for building applications using Strapi and Next.js. This boilerplate consists of the following:

  1. frontend: Next.js application
  2. backend: Dockerized Strapi application

Overview

This boilerplate is built using the following technologies:

  1. Chakra UI
  2. Emotion
  3. GraphQL
  4. Apollo
  5. NextAuth
  6. TypeScript

It supports GraphQL Query and Mutation out of the box.

Requirements

  1. Node.js
  2. npm
  3. Docker

Packages

1. Frontend: Next.js application

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

2. Backend: Dockerized Strapi application

Strapi is the leading open-source headless CMS. It’s 100% Javascript, fully customizable and developer-first.

Installation

1. Clone the application

git clone https://github.com/ghoshnirmalya/nextjs-strapi-boilerplate

2. Install necessary dependencies for the frontend application

cd frontend && yarn install

3. Create a .env file and copy the contents from .env.example (present in frontend directory)

We might need to run the following command:

source .env

4. Create and copy the Google client credentials

Create a new Google OAuth Client and copy the credentials (Client ID and Client Secret) in your .env file.

5. Start the frontend application

From the frontend directory, we can run the following command to start our Next.js frontend application:

yarn dev

The above command will start the frontend application on http://localhost:3000/.

6. Go inside the directory of the backend package on another terminal window

cd backend

7. Start docker-compose

docker-compose up

We need to start Docker and then run the above command which will change the current directory to the backend package’s directory and then start the backend package. If everything goes well, it’ll be up and running on http://localhost:1337/graphql.

8. Configure Strapi

a. Allow permissions for all operations on the Feed content-type for Authenticated users.

Authenticated user role

Allow permissions for all operations on the Feed content-type for Authenticated users

b. Allow permissions for all operations on the Feed content-type for Authenticated users as well.

Allow permissions for all operations on the Feed content-type for Authenticated users as well

c. Enable the Google provider.

Enable the Google provider

Enable informations for the Google provider

d. Click on the "Done" button and now we can log into our Next.js application using our Google account.

Deployment

Frontend application

Click on the button below to deploy the frontend application on Vercel. You'll need to sign up for a free Vercel account.

Deploy with Vercel

Backend application

We're still working on it.

Other interesting repositories

  1. Hasura Next.js Boilerplate
  2. Hasura Next.js Trello Clone
  3. React Search Box
  4. LinkedIn Clone using Create React App

License

This project is licensed under the MIT License.

nextjs-strapi-boilerplate's People

Contributors

alfieqashwa avatar dependabot-preview[bot] avatar dependabot[bot] avatar ghoshnirmalya 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.