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
- Host: GitHub
- URL: https://github.com/pptik/quakezone-nest
- Owner: pptik
- Created: 2020-04-05T13:44:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-08T03:16:01.000Z (over 3 years ago)
- Last Synced: 2024-04-14T21:48:34.160Z (about 2 years ago)
- Topics: api, apollo, disaster, earthquakes, emergency, fastify, graphql, iot, mongodb, mongoose, nestjs, nodejs, open-source, quakes, quakezone, smart-city, tsunami, typegoose
- Language: TypeScript
- Homepage: https://disaster.pptik.id/
- Size: 433 KB
- Stars: 2
- Watchers: 6
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
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/).