/graphql_books

mern app with graphql integration with a books directory

Primary LanguageJavaScript

GraphQL Books

This project is a full-stack application that allows users to manage a collection of books using a modern technology stack. It's designed for developers who want to explore the use of GraphQL, MongoDB Atlas, and Express-GraphQL in a real-world context, as well as book enthusiasts who want a flexible and powerful tool for managing their collections.

The application is divided into client and server components. The client is a user-friendly interface for viewing and managing the book collection. The server handles API requests, interacts with the MongoDB Atlas database, and provides data to the client through a GraphQL API.

The server uses Express-GraphQL to create a GraphQL server. This allows the client to request specific data as needed, rather than receiving a fixed set of data from a RESTful API. This can improve performance and flexibility, especially when dealing with large collections of books.

The application connects to a MongoDB Atlas database, providing a robust and scalable solution for data storage. This allows the application to handle large collections of books and serve multiple users without performance degradation.

Overall, this project provides a practical example of how to build a full-stack application using GraphQL, MongoDB Atlas, and Express-GraphQL. It's a great resource for developers looking to learn these technologies or build upon the project with additional features.

screenshot

Features

  • Client and Server applications
  • Connection to a MongoDB Atlas database using GraphQL
  • Express-GraphQL for creating GraphQL servers

Installation

Clone the repository:

git clone <repository-url>

Usage/Examples

Client

  1. Navigate to the client directory:
cd client
  1. Install the dependencies:
npm install
  1. Start the client:
npm start

The client runs on http://localhost:3000.

Server

  1. Navigate to the server directory:
cd server
  1. Install the dependencies:
npm install
  1. Add your MongoDB URI in .env file
MONGO_URI = mongodb+srv://<user>:<password>@<serverUrl>/?retryWrites=true&w=majority
  1. Start the server:
npm start

Special mention to @imshaunjp (Net Ninja) and his tutorial which this project was based from.