Skip to content

af4oz/suf-mern-gql-backend

Repository files navigation

Stack Underflow | Backend

Here's frontend repo

TODO:

  1. Use transactions in mutation resolvers that involve multiple mutating database requests.

Update 1: Migrated Server codebase to Typescript using type-graphql, typegoose.

Update 2: (27/10/2021) Automated Graphql Testing using jest, ts-jest, isomorphic-fetch.

Update 3: (29/10/2021) Replaced constant growing arrays with mongoose virtuals.

Update 4: (4/05/2022) Moving to Hybrid(poly repo + mono repo) structure to reduce code,build management issues, also I am not using tools like Nx,turborepo,bazel which would mitigate those issues.

Update 5: Improve code and data models.

Usage

Server:

Be sure check env.example and provide required .env files.

yarn install
yarn server start:dev

Built using

  • Node.js - Runtime environment for JS
  • Apollo Server - To build a self-documenting GraphQL API server
  • Type-graphql - For defining the Graphql schema using classes and decorators and additional features like dependency injection, validation and auth guards to embrace code reusability
  • MongoDB - Database to store document-based data
  • Mongoose - MongoDB object modeling for Node.js
  • Typegoose - Define Mongoose models using TypeScript classes
  • JSON Web Token - A standard to secure/authenticate HTTP requests
  • Bcrypt.js - For hashing passwords
  • Mongoose Unique Validator - Plugin for better error handling of unique fields within Mongoose schema.
  • Dotenv - To load environment variables from a .env file