Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swap76/apollo-graphql-mongo-boilerplate
Apollo GraphQL MongoDB Boilerplate
https://github.com/swap76/apollo-graphql-mongo-boilerplate
apollo-graphql boilerplate graphql mongodb nodejs
Last synced: 22 days ago
JSON representation
Apollo GraphQL MongoDB Boilerplate
- Host: GitHub
- URL: https://github.com/swap76/apollo-graphql-mongo-boilerplate
- Owner: Swap76
- License: agpl-3.0
- Created: 2020-02-14T18:15:40.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T02:27:22.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T13:14:09.394Z (about 1 month ago)
- Topics: apollo-graphql, boilerplate, graphql, mongodb, nodejs
- Language: JavaScript
- Size: 1.21 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Apollo GraphQL with MongoDB Boilerplate
### Documentation: [https://swap76.github.io/Apollo-GraphQL-Mongo-Boilerplate/](https://swap76.github.io/Apollo-GraphQL-Mongo-Boilerplate/#/)
## This boilerplate includes following things:-
- Apollo GraphQL server creation & configuration
- MongoDB setup & Model Examples
- GraphQL schema examples
- JWT Authorization Middlewear
- REST API Configuration## Project Structure
Our project has the following structure:
* docs
* node_modules
* src
* config
* controllers
* graphql
* middleware
* models
* routes
* utils
* test### 1. Docs
This contains all the markdown files for the documentation of the project, which is visualized on Docsify.
### 2. Node Modules
Contains project dependencies.### 3. Config
This contains all the configuration files; like database connectivity, winston setup, etc.### 4. Controllers
This contains all the REST API end-points.### 5. GraphQL
This contains schema files, queries and mutations for GraphQL API.### 6. Middleware
This contains all the middleware functions of the request-response pipeline.### 7. Models
This contains all the mongoDB schema.### 8. Routes
This contains all the routes for REST API.### 9. Utils
This contains all the helper functions associated with other endpoints.
### 10. Tests
This contains basic setup for chai, mocha testing which can be integrated with Travis CI easily or any other CI## Getting Started
These instructions will get you a copy of the project up and running o# Apollo GraphQL with MongoDB Boilerplate
## This boilerplate includes following things:-
- Apollo GraphQL server creation & configuration
- MongoDB setup & Model Examples
- GraphQL schema examples
- JWT Authorization Middlewear
- REST API Configuration
- Tests using Chai & Mocha## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
### Prerequisites
Following are the softwares requried to get arena up and running.
* [Node.js](https://nodejs.org) - Chrome's V8 Javascript Engine
* [MongoDB](https://mongodb.org) - NoSQL Database
* [Redis](https://redis.io/) - Redis Cache### Installing
- Install the packages mentioned in package.json file for getting all dependencies of the project.
```
npm install --save
```
- Getting the configuration ready
```
cp .env.example .env
```
- Starting the application
```
npm run dev
```- Setting the pre-push hook
```
./hooks.sh
```## Linting the Code
- For linting the code
```
npm run lint -s
```- For fixing the linting mistakes in code
```
npm run fix -s
```## Issues
Issues are managed via GitHub Issues [here](https://github.com/Swap76/Apollo-GraphQL-Mongo-Boilerplate/issues).
## Developers
* **Swapnil Shinde** - [Swap76](https://github.com/Swap76)
## License
This project is licensed under the Apache License. See the [LICENSE.md](https://github.com/Swap76/Apollo-GraphQL-Mongo-Boilerplate/blob/master/LICENSE) file for details.
n your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.