Giter Club home page Giter Club logo

hsg-membership-server's Introduction

Hackerspace Membership Server

This is the operating backend of a Hackerspace membership management server. It includes feature like user registration, user login and event management.

Both the server and client is needed. They should sit in a folder structure like this:

- somefolder/
    - hsg-membership-client/
        - src/
        - dist/
        - ...
    - hsg-membership-server/
        - src/
        - ...

Installation

npm install

Configuration

A sample configuration file named .env.sample is given in the main directory. It needs to be copied and renamed as .env for environment variables to work.

Running

You should build the production client first.

npm run start

Space Events

If the user isn't a member, they would require a proxy-host that is a member to host their events. Members who organize events will have their events automagically approved.

License

This software is licensed under AGPLv3. More details can be found in the LICENSE file.

API Documentation

API documentation is provided via Swagger UI. However, there are some things that must be noted in order to understand what is going on.

Guards

There are 3 guards in-place that checks the user's state. The 3 guards are [UserGuard], [MemberGuard] and [AdminGuard].

User Guard

If user possesses a valid, not expired login token, they will pass the guard.

Member Guard

If user possesses a valid, not expired login token, and the user has is_member set to true, they will pass the guard.

Admin Guard

If user possesses a valid, not expired login token, and the user has is_admin set to true, they will pass the guard.

Endpoints

Make sure you have configured your application.

Run the following commands:

npm run start

Thereafter, go to localhost:<APP_PORT>/api to view the swagger interface.

hsg-membership-server's People

Contributors

giantcrab avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.