Skip to content

GraphQL server based on NodeJs to give back-end support a web client based on React

License

Notifications You must be signed in to change notification settings

NicolasOmar/my-pets-api

Repository files navigation

My Pets API

GraphQL server based on NodeJs to give back-end support a web client based on React.

Table of contents

Status

Project version Code Coverage Quality Gate Status Maintainability Rating Security Rating Technical Debt Known Vulnerabilities GitHub Repo stars GitHub commit activity GitHub last commit

Dependencies

express dependency graphql dependency apollo-server dependency mongoose dependency bcryptjs dependency crypto-js dependency babel-node dependency jest dependency eslint dependency prettier dependency nodemon dependency

What do I need?

Before cloning this repo, I recommend installing the following software:

  • Node >=12.16.1 to install packages
  • MongoDB >=4.2.3 to have a local database
  • Robo 3T to visualize data on your Mongo Database

Setup

After cloning the repo, go to the created folder and install the node packages.

git clone https://github.com/NicolasOmar/my-pets-api.git
cd my-pets-api
npm install

How to run it

To run it correctly (as a non-stopping server using local environment variables), I modified the start command by adding nodemon and env-cmd. So just run the following line:

npm start

After start the server, you can access the GraphQL Plauground through the local link.

Folder structure

Once you have cloned the repo, it will show you the following folders:

  • .github: Github Actions files used to run post-merge.
  • env: Environment variables.
  • public: Contains only a css folder for specific home page styling.
  • scripts: Location of the update-version.js file, responsible of update package's version on each push.
  • src
    • constants: JSON files used for static values.
    • db: Connection to the Mongo database trough Mongoose as well as its Model declarations.
    • functions: Helper methods related to encryption and data parsing.
    • graphql: Server configuration based on Apollo GraphQl connection with its Schemas and Resolver declarations.
  • templates: Structure dedicated to show a start page based in Moustache.js. Shows links of other useful sites related to the project.
  • tests: Specific Jest configurations to test using a custom Mongoose connection.

Find out more

Project Status Storybook site React Repo
Project board for project status tracking Site dedicated to show and test all the created front-end components React front-end repository

License

MIT