Coder Social home page Coder Social logo

event-platform-gql's Introduction

Event Platform in GraphQL

This repository contains the event platform of the security engineering project implemented in GraphQL.

Setup

To run and build the project, you need to install:

After you have installed the tools necessary, you need to setup a database. For this, execute the following commands:

cd scripts
./db.ps1
./setup.ps1

Whenever you want to connect to the database, you can execute scripts/mongo.ps1 to open a mongodb shell.

To compile and start the server, you initially need to run npm install once. Then, you first need to start the database (scripts/start.ps1, might be necessary after rebooting, too) and then run one of the commands

  • npm run server (project part II)
  • npm run server-rbac (project part III)

Additionally, you can run tests by executing:

  • npm run test (project part II)
  • npm run test-rbac (project part III)

The Repository

To provide you with an overview of the repository, we list all important folders and files here. Respective folders contain another README detailing how they work.

File Explanation
index.ts Provides an API to create the GraphQL server
start.ts Script to run the server
datamodel/ Contains all datamodel definitions
permissions/ Contains access control rules written in graphql-shield for project part II
rb_permissions/ Contains role-based access control rules written in graphql-shield for project part III
resolvers/ Contains all GraphQL resolvers for the scheme datamodel/gql-schema.ts
scripts/ Contains database scripts
tests/ Contains test cases

Tooling

As stated earlier, we recommend Visual Studio Code to modify this project. Additionally, we recommend the extension ESLint for linting and optionally GraphQL for some additional syntax highlighting.

This project comes with debugging already configured. If you open the debugging pane (Ctrl+Shift+D), you can select one of two profiles for debugging:

  1. Test this file: debug the tests in the file that is currently opened and focused.
  2. Run: debug the server.
  3. Run (RBAC): debug the server using role-based permissions.

Additional Help

The following links can provide you with useful documentation:

event-platform-gql's People

Contributors

flmichel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.