An open API service indexing awesome lists of open source software.

https://github.com/pptik/quakezone-nest

QuakeZone GraphQL API Server powered by NestJS, Apollo, Fastify, and Typegoose/MongoDB
https://github.com/pptik/quakezone-nest

api apollo disaster earthquakes emergency fastify graphql iot mongodb mongoose nestjs nodejs open-source quakes quakezone smart-city tsunami typegoose

Last synced: 2 months ago
JSON representation

QuakeZone GraphQL API Server powered by NestJS, Apollo, Fastify, and Typegoose/MongoDB

Awesome Lists containing this project

README

          

# QuakeZone GraphQL API Service

## Tech Stack

* Base framework: [NestJS](https://nestjs.com/) + [Soluvas](https://soluvas.com/) [NestJS TypeScript Starter Kit](https://github.com/soluvas/nest-typescript-starter)
* Language: [TypeScript](http://www.typescriptlang.org/) on [Node.js](https://nodejs.org/en/)
* Web server framework: [Fastify](https://www.fastify.io/)
* GraphQL API Server: [Apollo Server](https://www.apollographql.com/docs/apollo-server/) + [`apollo-server-fastify`](https://www.npmjs.com/package/apollo-server-fastify) + [Relay Connections](https://relay.dev/graphql/connections.htm)
* Database: [MongoDB](https://www.mongodb.com/) + [Mongoose](https://mongoosejs.com/) + [Typegoose](https://typegoose.github.io/typegoose/) + [`nestjs-typegoose`](https://www.npmjs.com/package/nestjs-typegoose)
* Linting: [ESLint](https://eslint.org/) + [Prettier](https://prettier.io/) (NestJS stack)
* Unit Test: [Jest](https://jestjs.io/) + [Supertest](https://www.npmjs.com/package/supertest) (NestJS stack)
* Model/entity helpers: [`class-validator`](https://www.npmjs.com/package/class-validator)

## Setup

1. Configure `.env` using `.env.dev` as template.
2. Run `npm run start:dev`
3. Test by opening the GraphQL Playground at http://localhost:3001/graphql

```gql
{
hello
projects {
pageInfo { hasNextPage, hasPreviousPage, startCursor, endCursor }
edges {
node {
id, name, slug
}
cursor
}
aggregate {
count
}
}
project(slug: "quakezone") {name}
}
```

## Installation

```bash
$ npm install
```

## Running the app

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Test

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## Soluvas Open Source Low-Code Application Platform

For more information, check out [**Soluvas Open Source Low-Code Application Platform**](https://soluvas.com/).